// 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 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 SetScaleY<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 `scrollFactorX` and `scrollFactorY`
         * 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: `SetScrollFactor(group.getChildren(), scrollFactorX, scrollFactorY, stepX, stepY)`
         * @param items The array of items to be updated by this action.
         * @param scrollFactorX The amount to set the `scrollFactorX` property to.
         * @param scrollFactorY The amount to set the `scrollFactorY` property to. If `undefined` or `null` it uses the `scrollFactorX` value.
         * @param stepX This is added to the `scrollFactorX` amount, multiplied by the iteration counter. Default 0.
         * @param stepY This is added to the `scrollFactorY` 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 SetScrollFactor<G extends Phaser.GameObjects.GameObject[]>(items: G, scrollFactorX: number, scrollFactorY?: number, stepX?: number, stepY?: number, index?: number, direction?: number): G;

        /**
         * Takes an array of Game Objects, or any objects that have the public property `scrollFactorX`
         * 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: `SetScrollFactorX(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.
         * @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 SetScrollFactorX<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 `scrollFactorY`
         * 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: `SetScrollFactorY(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.
         * @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 SetScrollFactorY<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 method setTint(), and then updates the tint of each to the given value(s). You can specify a tint color per corner or provide only one color value for the `topLeft` parameter, in which case the whole item will be tinted with that color.
         * @param items An array of Game Objects. The contents of this array are updated by this Action.
         * @param topLeft The tint to be applied to the top-left corner of each item. If the other parameters are omitted, this tint will be applied to the whole item.
         * @param topRight The tint to be applied to top-right corner of item.
         * @param bottomLeft The tint to be applied to the bottom-left corner of item.
         * @param bottomRight The tint to be applied to the bottom-right corner of item.
         * @returns The array of Game Objects that was passed to this Action.
         */
        function SetTint<G extends Phaser.GameObjects.GameObject[]>(items: G, topLeft: number, topRight?: number, bottomLeft?: number, bottomRight?: number): G;

        /**
         * Takes an array of Game Objects, or any objects that have the public property `visible`
         * and then sets it to the given value.
         * 
         * To use this with a Group: `SetVisible(group.getChildren(), value)`
         * @param items The array of items to be updated by this action.
         * @param value The visible state to set on each item. Set to `true` to make items visible, or `false` to hide them.
         * @param index An optional offset to start iterating 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 SetVisible<G extends Phaser.GameObjects.GameObject[]>(items: G, value: boolean, index?: number, direction?: number): G;

        /**
         * Takes an array of Game Objects, or any objects that have the public property `x`
         * 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: `SetX(group.getChildren(), value, step)`
         * @param items The array of items to be updated by this action.
         * @param value The x coordinate, in pixels, to set on each item.
         * @param step This is added to the `value` amount, multiplied by the iteration index, so that each item receives a progressively increasing x offset. 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 SetX<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 `x` and `y`
         * 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: `SetXY(group.getChildren(), x, y, stepX, stepY)`
         * @param items The array of items to be updated by this action.
         * @param x The amount to set the `x` property to.
         * @param y The amount to set the `y` property to. 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 SetXY<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 the public property `y`
         * 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: `SetY(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.
         * @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 SetY<G extends Phaser.GameObjects.GameObject[]>(items: G, value: number, step?: number, index?: number, direction?: number): G;

        /**
         * Takes an array of items, such as Game Objects, or any objects with public `x` and
         * `y` properties and then iterates through them. As this function iterates, it moves
         * the position of the current element to be that of the previous entry in the array.
         * This repeats until all items have been moved.
         * 
         * The direction controls the order of iteration. A value of 0 (the default) assumes
         * that the final item in the array is the 'head' item.
         * 
         * A direction value of 1 assumes that the first item in the array is the 'head' item.
         * 
         * The position of the 'head' item is set to the x/y values given to this function.
         * Every other item in the array is then updated, in sequence, to be that of the
         * previous (or next) entry in the array.
         * 
         * The final x/y coords are returned, or set in the 'output' Vector2.
         * 
         * Think of it as being like the game Snake, where the 'head' is moved and then
         * each body piece is moved into the space of the previous piece.
         * @param items An array of Game Objects, or objects with public x and y positions. The contents of this array are updated by this Action.
         * @param x The x coordinate to place the head item at.
         * @param y The y coordinate to place the head item at.
         * @param direction The iteration direction. 0 = last to first and 1 = first to last. Default 0.
         * @param output An optional Vec2Like object to store the final position in.
         * @returns The output vector.
         */
        function ShiftPosition<G extends Phaser.GameObjects.GameObject[], O extends Phaser.Math.Vector2>(items: G, x: number, y: number, direction?: number, output?: O): O;

        /**
         * Shuffles the array in place. The shuffled array is both modified and returned.
         * @param items An array of Game Objects. The contents of this array are updated by this Action.
         * @returns The array of Game Objects that was passed to this Action.
         */
        function Shuffle<G extends Phaser.GameObjects.GameObject[]>(items: G): G;

        /**
         * Takes an array of Game Objects and distributes values across the specified property using
         * smoothstep interpolation. Each item in the array is assigned a smoothstep-interpolated value
         * based on its position, creating a smooth ease-in/ease-out transition across the items.
         * 
         * Smoothstep is a sigmoid-like interpolation and clamping function.
         * 
         * The function depends on three parameters, the input x, the "left edge"
         * and the "right edge", with the left edge being assumed smaller than the right edge.
         * 
         * The function receives a real number x as an argument and returns 0 if x is less than
         * or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly
         * interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the
         * smoothstep function is zero at both edges.
         * 
         * This is convenient for creating a sequence of transitions using smoothstep to interpolate
         * each segment as an alternative to using more sophisticated or expensive interpolation techniques.
         * @param items An array of Game Objects. The contents of this array are updated by this Action.
         * @param property The property of the Game Object to interpolate.
         * @param min The left edge of the smoothstep. This value should be smaller than `max`.
         * @param max The right edge of the smoothstep. This value should be larger than `min`.
         * @param inc Should the property value be incremented (`true`) or set (`false`)? Default false.
         * @returns The array of Game Objects that was passed to this Action.
         */
        function SmoothStep<G extends Phaser.GameObjects.GameObject[]>(items: G, property: string, min: number, max: number, inc?: boolean): G;

        /**
         * Takes an array of Game Objects and distributes values across the specified property using
         * smootherstep interpolation. Each item in the array is assigned a smootherstep-interpolated
         * value based on its position, creating an even smoother transition than SmoothStep.
         * 
         * Smootherstep is a sigmoid-like interpolation and clamping function.
         * 
         * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smootherstep function is zero at both edges. This is convenient for creating a sequence of transitions using smootherstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques.
         * @param items An array of Game Objects. The contents of this array are updated by this Action.
         * @param property The property of the Game Object to interpolate.
         * @param min The minimum interpolation value.
         * @param max The maximum interpolation value.
         * @param inc If `true`, the values are incremented. If `false` (default), the values are set. Default false.
         * @returns The array of Game Objects that was passed to this Action.
         */
        function SmootherStep<G extends Phaser.GameObjects.GameObject[]>(items: G, property: string, min: number, max: number, inc?: boolean): G;

        /**
         * Takes an array of Game Objects and then modifies their `property` so the value equals, or is incremented, by the
         * calculated spread value.
         * 
         * The spread value is derived from the given `min` and `max` values and the total number of items in the array.
         * 
         * For example, to cause an array of Sprites to change in alpha from 0 to 1 you could call:
         * 
         * ```javascript
         * Phaser.Actions.Spread(itemsArray, 'alpha', 0, 1);
         * ```
         * @param items An array of Game Objects. The contents of this array are updated by this Action.
         * @param property The property of the Game Object to spread.
         * @param min The minimum value.
         * @param max The maximum value.
         * @param inc Should the values be incremented (`true`) or set directly (`false`)? Default false.
         * @returns The array of Game Objects that were passed to this Action.
         */
        function Spread<G extends Phaser.GameObjects.GameObject[]>(items: G, property: string, min: number, max: number, inc?: boolean): G;

        /**
         * Takes an array of Game Objects and toggles the visibility of each one.
         * Those previously `visible = false` will become `visible = true`, and vice versa.
         * @param items An array of Game Objects. The contents of this array are updated by this Action.
         * @returns The array of Game Objects that was passed to this Action.
         */
        function ToggleVisible<G extends Phaser.GameObjects.GameObject[]>(items: G): G;

        /**
         * Iterates through the given array and makes sure that each object's x and y
         * properties are wrapped to keep them contained within the given Rectangle's
         * area.
         * @param items An array of Game Objects. The contents of this array are updated by this Action.
         * @param rect The rectangle which the objects will be wrapped to remain within.
         * @param padding An amount added to each side of the rectangle during the operation. Default 0.
         * @returns The array of Game Objects that was passed to this Action.
         */
        function WrapInRectangle<G extends Phaser.GameObjects.GameObject[]>(items: G, rect: Phaser.Geom.Rectangle, padding?: number): G;

    }

    namespace Animations {
        /**
         * A Frame based Animation.
         * 
         * Animations in Phaser consist of a sequence of `AnimationFrame` objects, which are managed by
         * this class, along with properties that impact playback, such as the animation's frame rate
         * or delay.
         * 
         * This class contains all of the properties and methods needed to handle playback of the animation
         * directly to an `AnimationState` instance, which is owned by a Sprite, or similar Game Object.
         * 
         * You don't typically create an instance of this class directly, but instead go via
         * either the `AnimationManager` or the `AnimationState` and use their `create` methods,
         * depending on if you need a global animation, or local to a specific Sprite.
         */
        class Animation {
            /**
             * 
             * @param manager A reference to the global Animation Manager
             * @param key The unique identifying string for this animation.
             * @param config The Animation configuration.
             */
            constructor(manager: Phaser.Animations.AnimationManager, key: string, config: Phaser.Types.Animations.Animation);

            /**
             * A reference to the global Animation Manager.
             */
            manager: Phaser.Animations.AnimationManager;

            /**
             * The unique identifying string for this animation.
             */
            key: string;

            /**
             * A frame-based animation (as opposed to a bone-based animation).
             */
            type: string;

            /**
             * An array of AnimationFrame objects that make up this animation.
             */
            frames: Phaser.Animations.AnimationFrame[];

            /**
             * The frame rate of playback in frames per second (default 24 if duration is null)
             */
            frameRate: number;

            /**
             * How long the animation should play for, in milliseconds.
             * If the `frameRate` property has been set then it overrides this value,
             * otherwise the `frameRate` is derived from `duration`.
             */
            duration: number;

            /**
             * How many ms per frame, not including frame-specific modifiers.
             */
            msPerFrame: number;

            /**
             * Skip frames if the time lags, or always advance anyway?
             */
            skipMissedFrames: boolean;

            /**
             * The delay in ms before the playback will begin.
             */
            delay: number;

            /**
             * Number of times to repeat the animation. Set to -1 to repeat forever.
             */
            repeat: number;

            /**
             * The delay in ms before a repeat play starts.
             */
            repeatDelay: number;

            /**
             * Should the animation yoyo (reverse back down to the start) before repeating?
             */
            yoyo: boolean;

            /**
             * If the animation has a delay set, before playback will begin, this
             * controls when the first frame is set on the Sprite. If this property
             * is 'false' then the frame is set only after the delay has expired.
             * This is the default behavior.
             */
            showBeforeDelay: boolean;

            /**
             * Should the GameObject's `visible` property be set to `true` when the animation starts to play?
             */
            showOnStart: boolean;

            /**
             * Should the GameObject's `visible` property be set to `false` when the animation finishes?
             */
            hideOnComplete: boolean;

            /**
             * Start playback of this animation from a random frame?
             */
            randomFrame: boolean;

            /**
             * Global pause. All Game Objects using this Animation instance are impacted by this property.
             */
            paused: boolean;

            /**
             * Gets the total number of frames in this animation.undefined
             * @returns The total number of frames in this animation.
             */
            getTotalFrames(): number;

            /**
             * Calculates the duration, frame rate and msPerFrame values.
             * @param target The target to set the values on.
             * @param totalFrames The total number of frames in the animation.
             * @param duration The duration to calculate the frame rate from. Pass `null` if you wish to set the `frameRate` instead.
             * @param frameRate The frame rate to calculate the duration from.
             */
            calculateDuration(target: Phaser.Animations.Animation, totalFrames: number, duration?: number | undefined, frameRate?: number | undefined): void;

            /**
             * Add frames to the end of the animation.
             * @param config Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.
             * @returns This Animation object.
             */
            addFrame(config: string | Phaser.Types.Animations.AnimationFrame[]): this;

            /**
             * Inserts one or more frames into the animation at the specified index.
             * @param index The index to insert the frame at within the animation.
             * @param config Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.
             * @returns This Animation object.
             */
            addFrameAt(index: number, config: string | Phaser.Types.Animations.AnimationFrame[]): this;

            /**
             * Check if the given frame index is valid.
             * @param index The index to be checked.
             * @returns `true` if the index is valid, otherwise `false`.
             */
            checkFrame(index: number): boolean;

            /**
             * Called internally when this Animation first starts to play.
             * Sets the accumulator and nextTick properties.
             * @param state The Animation State belonging to the Game Object invoking this call.
             */
            protected getFirstTick(state: Phaser.Animations.AnimationState): void;

            /**
             * Returns the AnimationFrame at the provided index
             * @param index The index in the AnimationFrame array
             * @returns The frame at the index provided from the animation sequence
             */
            getFrameAt(index: number): Phaser.Animations.AnimationFrame;

            /**
             * Creates AnimationFrame instances based on the given frame data.
             * @param textureManager A reference to the global Texture Manager.
             * @param frames Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.
             * @param defaultTextureKey The key to use if no key is set in the frame configuration object.
             * @returns An array of newly created AnimationFrame instances.
             */
            getFrames(textureManager: Phaser.Textures.TextureManager, frames: string | Phaser.Types.Animations.AnimationFrame[], defaultTextureKey?: string): Phaser.Animations.AnimationFrame[];

            /**
             * Called internally. Sets the accumulator and nextTick values of the current Animation.
             * @param state The Animation State belonging to the Game Object invoking this call.
             */
            getNextTick(state: Phaser.Animations.AnimationState): void;

            /**
             * Returns the frame closest to the given progress value between 0 and 1.
             * @param value A value between 0 and 1.
             * @returns The frame closest to the given progress value.
             */
            getFrameByProgress(value: number): Phaser.Animations.AnimationFrame;

            /**
             * Advance the animation frame.
             * @param state The Animation State to advance.
             */
            nextFrame(state: Phaser.Animations.AnimationState): void;

            /**
             * Returns the last frame in this animation.undefined
             * @returns The last Animation Frame.
             */
            getLastFrame(): Phaser.Animations.AnimationFrame;

            /**
             * Called internally when the Animation is playing backwards.
             * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly.
             * @param state The Animation State belonging to the Game Object invoking this call.
             */
            previousFrame(state: Phaser.Animations.AnimationState): void;

            /**
             * Removes the given AnimationFrame from this Animation instance.
             * This is a global action. Any Game Object using this Animation will be impacted by this change.
             * @param frame The AnimationFrame to be removed.
             * @returns This Animation object.
             */
            removeFrame(frame: Phaser.Animations.AnimationFrame): this;

            /**
             * Removes a frame from the AnimationFrame array at the provided index
             * and updates the animation accordingly.
             * @param index The index in the AnimationFrame array
             * @returns This Animation object.
             */
            removeFrameAt(index: number): this;

            /**
             * Called internally during playback. Forces the animation to repeat, provided there are enough counts left
             * in the repeat counter.
             * @param state The Animation State belonging to the Game Object invoking this call.
             */
            repeatAnimation(state: Phaser.Animations.AnimationState): void;

            /**
             * Converts the animation data to JSON.undefined
             * @returns The resulting JSONAnimation formatted object.
             */
            toJSON(): Phaser.Types.Animations.JSONAnimation;

            /**
             * Called internally whenever frames are added to, or removed from, this Animation.undefined
             * @returns This Animation object.
             */
            updateFrameSequence(): this;

            /**
             * Pauses playback of this Animation. The paused state is set immediately.undefined
             * @returns This Animation object.
             */
            pause(): this;

            /**
             * Resumes playback of this Animation. The paused state is reset immediately.undefined
             * @returns This Animation object.
             */
            resume(): this;

            /**
             * Destroys this Animation instance. It will remove all event listeners,
             * remove this animation and its key from the global Animation Manager,
             * and then destroy all Animation Frames in turn.
             */
            destroy(): void;

        }

        /**
         * A single frame within an Animation sequence.
         * 
         * An AnimationFrame holds a reference to the Texture Frame it uses for rendering, links to the
         * previous and next frames in the sequence, its position index, and playback progress data.
         * It can also carry an optional per-frame duration that overrides the parent Animation's default
         * frame rate, and can be flagged as a keyframe to mark significant moments in the sequence.
         * 
         * AnimationFrames are created and managed automatically by the Animation class when an animation
         * is built via the Animation Manager. You would not typically instantiate AnimationFrame directly.
         */
        class AnimationFrame {
            /**
             * 
             * @param textureKey The key of the Texture this AnimationFrame uses.
             * @param textureFrame The key of the Frame within the Texture that this AnimationFrame uses.
             * @param index The index of this AnimationFrame within the Animation sequence.
             * @param frame A reference to the Texture Frame this AnimationFrame uses for rendering.
             * @param isKeyFrame Is this Frame a Keyframe within the Animation? Default false.
             */
            constructor(textureKey: string, textureFrame: string | number, index: number, frame: Phaser.Textures.Frame, isKeyFrame?: boolean);

            /**
             * The key of the Texture this AnimationFrame uses.
             */
            textureKey: string;

            /**
             * The key of the Frame within the Texture that this AnimationFrame uses.
             */
            textureFrame: string | number;

            /**
             * The index of this AnimationFrame within the Animation sequence.
             */
            index: number;

            /**
             * A reference to the Texture Frame this AnimationFrame uses for rendering.
             */
            frame: Phaser.Textures.Frame;

            /**
             * Is this the first frame in an animation sequence?
             */
            readonly isFirst: boolean;

            /**
             * Is this the last frame in an animation sequence?
             */
            readonly isLast: boolean;

            /**
             * A reference to the AnimationFrame that comes before this one in the animation, if any.
             */
            readonly prevFrame: Phaser.Animations.AnimationFrame | null;

            /**
             * A reference to the AnimationFrame that comes after this one in the animation, if any.
             */
            readonly nextFrame: Phaser.Animations.AnimationFrame | null;

            /**
             * The duration, in ms, of this frame of the animation.
             */
            duration: number;

            /**
             * The normalized progress of this frame within the animation, in the range 0 to 1.
             * A value of 0 means the very start of the animation and 1 means the very end.
             * This value is calculated when the animation is created and cached here.
             */
            readonly progress: number;

            /**
             * Is this Frame a KeyFrame within the Animation?
             */
            isKeyFrame: boolean;

            /**
             * Generates a JavaScript object suitable for converting to JSON.undefined
             * @returns The AnimationFrame data.
             */
            toJSON(): Phaser.Types.Animations.JSONAnimationFrame;

            /**
             * Destroys this object by removing references to external resources.
             */
            destroy(): void;

        }

        /**
         * The Animation Manager is a global system responsible for defining, storing, and managing all
         * animations in your Phaser game. It is a singleton owned by the Game instance, meaning it persists
         * across all Scenes and is not tied to any single Scene's lifecycle.
         * 
         * You create animations once via `this.anims.create()` (or `this.anims.createFromAseprite()` for
         * Aseprite exports), and those animations are then available to every Sprite or Game Object that has
         * an Animation Component, across every Scene.
         * 
         * The Animation Manager handles frame sequencing, timing, and playback configuration. Individual
         * Game Objects each maintain their own playback state (current frame, repeat count, etc.) via their
         * AnimationState component, but the frame data and timing definitions live here.
         * 
         * You can access the Animation Manager from any Scene via `this.anims`.
         */
        class AnimationManager extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param game A reference to the Phaser.Game instance.
             */
            constructor(game: Phaser.Game);

            /**
             * A reference to the Phaser.Game instance.
             */
            protected game: Phaser.Game;

            /**
             * A reference to the Texture Manager.
             */
            protected textureManager: Phaser.Textures.TextureManager;

            /**
             * The global time scale of the Animation Manager.
             * 
             * This scales the time delta between two frames, thus influencing the speed of time for the Animation Manager.
             */
            globalTimeScale: number;

            /**
             * The Animations registered in the Animation Manager.
             * 
             * This map should be modified with the {@link #add} and {@link #create} methods of the Animation Manager.
             */
            protected anims: Phaser.Structs.Map<string, Phaser.Animations.Animation>;

            /**
             * A list of animation mix times.
             * 
             * See the {@link #setMix} method for more details.
             */
            mixes: Phaser.Structs.Map<string, Phaser.Animations.Animation>;

            /**
             * Whether the Animation Manager is paused along with all of its Animations.
             */
            paused: boolean;

            /**
             * The name of this Animation Manager.
             */
            name: string;

            /**
             * Registers event listeners after the Game boots.
             */
            boot(): void;

            /**
             * Adds a mix between two animations.
             * 
             * Mixing allows you to specify a unique delay between a pairing of animations.
             * 
             * When playing Animation A on a Game Object, if you then play Animation B, and a
             * mix exists, it will wait for the specified delay to be over before playing Animation B.
             * 
             * This allows you to customise smoothing between different types of animation, such
             * as blending between an idle and a walk state, or a running and a firing state.
             * 
             * Note that mixing is only applied if you use the `Sprite.play` method. If you opt to use
             * `playAfterRepeat` or `playAfterDelay` instead, those will take priority and the mix
             * delay will not be used.
             * 
             * To update an existing mix, just call this method with the new delay.
             * 
             * To remove a mix pairing, see the `removeMix` method.
             * @param animA The string-based key, or instance of, Animation A.
             * @param animB The string-based key, or instance of, Animation B.
             * @param delay The delay, in milliseconds, to wait when transitioning from Animation A to B.
             * @returns This Animation Manager.
             */
            addMix(animA: string | Phaser.Animations.Animation, animB: string | Phaser.Animations.Animation, delay: number): this;

            /**
             * Removes a mix between two animations.
             * 
             * Mixing allows you to specify a unique delay between a pairing of animations.
             * 
             * Calling this method lets you remove those pairings. You can either remove
             * it between `animA` and `animB`, or if you do not provide the `animB` parameter,
             * it will remove all `animA` mixes.
             * 
             * If you wish to update an existing mix instead, call the `addMix` method with the
             * new delay.
             * @param animA The string-based key, or instance of, Animation A.
             * @param animB The string-based key, or instance of, Animation B. If not given, all mixes for Animation A will be removed.
             * @returns This Animation Manager.
             */
            removeMix(animA: string | Phaser.Animations.Animation, animB?: string | Phaser.Animations.Animation): this;

            /**
             * Returns the mix delay between two animations.
             * 
             * If no mix has been set up, this method will return zero.
             * 
             * If you wish to create, or update, a new mix, call the `addMix` method.
             * If you wish to remove a mix, call the `removeMix` method.
             * @param animA The string-based key, or instance of, Animation A.
             * @param animB The string-based key, or instance of, Animation B.
             * @returns The mix duration, or zero if no mix exists.
             */
            getMix(animA: string | Phaser.Animations.Animation, animB: string | Phaser.Animations.Animation): number;

            /**
             * Adds an existing Animation to the Animation Manager.
             * @param key The key under which the Animation should be added. The Animation will be updated with it. Must be unique.
             * @param animation The Animation which should be added to the Animation Manager.
             * @returns This Animation Manager.
             */
            add(key: string, animation: Phaser.Animations.Animation): this;

            /**
             * Checks to see if the given key is already in use within the Animation Manager or not.
             * 
             * Animations are global. Keys created in one scene can be used from any other Scene in your game. They are not Scene specific.
             * @param key The key of the Animation to check.
             * @returns `true` if the Animation already exists in the Animation Manager, or `false` if the key is available.
             */
            exists(key: string): boolean;

            /**
             * Create one, or more animations from a loaded Aseprite JSON file.
             * 
             * Aseprite is a powerful animated sprite editor and pixel art tool.
             * 
             * You can find more details at https://www.aseprite.org/
             * 
             * To export a compatible JSON file in Aseprite, please do the following:
             * 
             * 1. Go to "File - Export Sprite Sheet"
             * 
             * 2. On the **Layout** tab:
             * 2a. Set the "Sheet type" to "Packed"
             * 2b. Set the "Constraints" to "None"
             * 2c. Check the "Merge Duplicates" checkbox
             * 
             * 3. On the **Sprite** tab:
             * 3a. Set "Layers" to "Visible layers"
             * 3b. Set "Frames" to "All frames", unless you only wish to export a sub-set of tags
             * 
             * 4. On the **Borders** tab:
             * 4a. Check the "Trim Sprite" and "Trim Cells" options
             * 4b. Ensure "Border Padding", "Spacing" and "Inner Padding" are all > 0 (1 is usually enough)
             * 
             * 5. On the **Output** tab:
             * 5a. Check "Output File", give your image a name and make sure you choose "png files" as the file type
             * 5b. Check "JSON Data" and give your json file a name
             * 5c. The JSON Data type can be either a Hash or Array, Phaser doesn't mind.
             * 5d. Make sure "Tags" is checked in the Meta options
             * 5e. In the "Item Filename" input box, make sure it says just "{frame}" and nothing more.
             * 
             * 6. Click export
             * 
             * This was tested with Aseprite 1.2.25.
             * 
             * This will export a png and json file which you can load using the Aseprite Loader, i.e.:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.path = 'assets/animations/aseprite/';
             *     this.load.aseprite('paladin', 'paladin.png', 'paladin.json');
             * }
             * ```
             * 
             * Once loaded, you can call this method from within a Scene with the 'atlas' key:
             * 
             * ```javascript
             * this.anims.createFromAseprite('paladin');
             * ```
             * 
             * Any animations defined in the JSON will now be available to use in Phaser and you play them
             * via their Tag name. For example, if you have an animation called 'War Cry' on your Aseprite timeline,
             * you can play it in Phaser using that Tag name:
             * 
             * ```javascript
             * this.add.sprite(400, 300).play('War Cry');
             * ```
             * 
             * When calling this method you can optionally provide an array of tag names, and only those animations
             * will be created. For example:
             * 
             * ```javascript
             * this.anims.createFromAseprite('paladin', [ 'step', 'War Cry', 'Magnum Break' ]);
             * ```
             * 
             * This will only create the 3 animations defined. Note that the tag names are case-sensitive.
             * @param key The key of the loaded Aseprite atlas. It must have been loaded prior to calling this method.
             * @param tags An array of Tag names. If provided, only animations found in this array will be created.
             * @param target Create the animations on this target Sprite. If not given, they will be created globally in this Animation Manager.
             * @returns An array of Animation instances that were successfully created.
             */
            createFromAseprite(key: string, tags?: string[], target?: Phaser.Animations.AnimationManager | Phaser.GameObjects.GameObject): Phaser.Animations.Animation[];

            /**
             * Creates a new Animation and adds it to the Animation Manager.
             * 
             * Animations are global. Once created, you can use them in any Scene in your game. They are not Scene specific.
             * 
             * If an invalid key is given this method will return `false`.
             * 
             * If you pass the key of an animation that already exists in the Animation Manager, that animation will be returned.
             * 
             * A brand new animation is only created if the key is valid and not already in use.
             * 
             * If you wish to re-use an existing key, call `AnimationManager.remove` first, then this method.
             * @param config The configuration settings for the Animation.
             * @returns The Animation that was created, or `false` if the key is already in use.
             */
            create(config: Phaser.Types.Animations.Animation): Phaser.Animations.Animation | false;

            /**
             * Loads this Animation Manager's Animations and settings from a JSON object.
             * @param data The JSON object to parse.
             * @param clearCurrentAnimations If set to `true`, the current animations will be removed (`anims.clear()`). If set to `false` (default), the animations in `data` will be added. Default false.
             * @returns An array containing all of the Animation objects that were created as a result of this call.
             */
            fromJSON(data: string | Phaser.Types.Animations.JSONAnimations | Phaser.Types.Animations.JSONAnimation, clearCurrentAnimations?: boolean): Phaser.Animations.Animation[];

            /**
             * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object.
             * 
             * Generates objects with string based frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNames}.
             * 
             * It's a helper method, designed to make it easier for you to extract all of the frame names from texture atlases.
             * 
             * If you're working with a sprite sheet, see the `generateFrameNumbers` method instead.
             * 
             * Example:
             * 
             * If you have a texture atlases loaded called `gems` and it contains 6 frames called `ruby_0001`, `ruby_0002`, and so on,
             * then you can call this method using: `this.anims.generateFrameNames('gems', { prefix: 'ruby_', start: 1, end: 6, zeroPad: 4 })`.
             * 
             * The `end` value tells it to select frames 1 through 6, incrementally numbered, all starting with the prefix `ruby_`. The `zeroPad`
             * value tells it how many zeroes pad out the numbers. To create an animation using this method, you can do:
             * 
             * ```javascript
             * this.anims.create({
             *   key: 'ruby',
             *   repeat: -1,
             *   frames: this.anims.generateFrameNames('gems', {
             *     prefix: 'ruby_',
             *     end: 6,
             *     zeroPad: 4
             *   })
             * });
             * ```
             * 
             * Please see the animation examples for further details.
             * @param key The key for the texture containing the animation frames.
             * @param config The configuration object for the animation frame names.
             * @returns The array of {@link Phaser.Types.Animations.AnimationFrame} objects.
             */
            generateFrameNames(key: string, config?: Phaser.Types.Animations.GenerateFrameNames): Phaser.Types.Animations.AnimationFrame[];

            /**
             * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object.
             * 
             * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}.
             * 
             * If you're working with a texture atlas, see the `generateFrameNames` method instead.
             * 
             * It's a helper method, designed to make it easier for you to extract frames from sprite sheets.
             * 
             * Example:
             * 
             * If you have a sprite sheet loaded called `explosion` and it contains 12 frames, then you can call this method using:
             * 
             * `this.anims.generateFrameNumbers('explosion', { start: 0, end: 11 })`.
             * 
             * The `end` value of 11 tells it to stop after the 12th frame has been added, because it started at zero.
             * 
             * To create an animation using this method, you can do:
             * 
             * ```javascript
             * this.anims.create({
             *   key: 'boom',
             *   frames: this.anims.generateFrameNumbers('explosion', {
             *     start: 0,
             *     end: 11
             *   })
             * });
             * ```
             * 
             * Note that `start` is optional and you don't need to include it if the animation starts from frame 0.
             * 
             * To specify an animation in reverse, swap the `start` and `end` values.
             * 
             * If the frames are not sequential, you may pass an array of frame numbers instead, for example:
             * 
             * `this.anims.generateFrameNumbers('explosion', { frames: [ 0, 1, 2, 1, 2, 3, 4, 0, 1, 2 ] })`
             * 
             * Please see the animation examples and `GenerateFrameNumbers` config docs for further details.
             * @param key The key for the texture containing the animation frames.
             * @param config The configuration object for the animation frames.
             * @returns The array of {@link Phaser.Types.Animations.AnimationFrame} objects.
             */
            generateFrameNumbers(key: string, config?: Phaser.Types.Animations.GenerateFrameNumbers): Phaser.Types.Animations.AnimationFrame[];

            /**
             * Retrieves an Animation from the Animation Manager by its key.
             * 
             * Returns `undefined` if no Animation with the given key exists.
             * @param key The key of the Animation to retrieve.
             * @returns The Animation.
             */
            get(key: string): Phaser.Animations.Animation;

            /**
             * Returns an array of all Animation keys that are using the given
             * Texture. Only Animations that have at least one AnimationFrame
             * entry using this texture will be included in the result.
             * @param key The unique string-based key of the Texture, or a Texture, or Frame instance.
             * @returns An array of Animation keys that feature the given Texture.
             */
            getAnimsFromTexture(key: string | Phaser.Textures.Texture | Phaser.Textures.Frame): string[];

            /**
             * Pauses all animations in the Animation Manager by setting the `paused` flag to `true`.
             * This affects all Game Objects that are playing animations globally. Has no effect if
             * the Animation Manager is already paused.undefined
             * @returns This Animation Manager.
             */
            pauseAll(): this;

            /**
             * Play an animation on the given Game Objects that have an Animation Component.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
             * @param children An array of Game Objects to play the animation on. They must have an Animation Component.
             * @returns This Animation Manager.
             */
            play(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, children: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): this;

            /**
             * Takes an array of Game Objects that have an Animation Component and then
             * starts the given animation playing on them. The start time of each Game Object
             * is offset, incrementally, by the `stagger` amount.
             * 
             * For example, if you pass an array with 4 children and a stagger time of 1000,
             * the delays will be:
             * 
             * child 1: 1000ms delay
             * child 2: 2000ms delay
             * child 3: 3000ms delay
             * child 4: 4000ms delay
             * 
             * If you set the `staggerFirst` parameter to `false` they would be:
             * 
             * child 1: 0ms delay
             * child 2: 1000ms delay
             * child 3: 2000ms delay
             * child 4: 3000ms delay
             * 
             * You can also set `stagger` to be a negative value. If it was -1000, the above would be:
             * 
             * child 1: 3000ms delay
             * child 2: 2000ms delay
             * child 3: 1000ms delay
             * child 4: 0ms delay
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
             * @param children An array of Game Objects to play the animation on. They must have an Animation Component.
             * @param stagger The amount of time, in milliseconds, to offset each play time by. If a negative value is given, it's applied to the children in reverse order.
             * @param staggerFirst Should the first child be staggered as well? Default true.
             * @returns This Animation Manager.
             */
            staggerPlay<G extends Phaser.GameObjects.GameObject[]>(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, children: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], stagger: number, staggerFirst?: boolean): G;

            /**
             * Removes an Animation from this Animation Manager, based on the given key.
             * 
             * This is a global action. Once an Animation has been removed, no Game Objects
             * can carry on using it.
             * @param key The key of the animation to remove.
             * @returns The Animation instance that was removed from the Animation Manager.
             */
            remove(key: string): Phaser.Animations.Animation;

            /**
             * Resumes all paused animations in the Animation Manager by setting the `paused` flag to `false`.
             * Has no effect if the Animation Manager is not currently paused.undefined
             * @returns This Animation Manager.
             */
            resumeAll(): this;

            /**
             * Returns the Animation data as JavaScript object based on the given key.
             * Or, if no key is defined, it will return the data of all animations as array of objects.
             * @param key The animation to get the JSONAnimation data from. If not provided, all animations are returned as an array.
             * @returns The resulting JSONAnimations formatted object.
             */
            toJSON(key?: string): Phaser.Types.Animations.JSONAnimations;

            /**
             * Destroy this Animation Manager and clean up animation definitions and references to other objects.
             * This method should not be called directly. It will be called automatically as a response to a `destroy` event from the Phaser.Game instance.
             */
            destroy(): void;

        }

        /**
         * The Animation State Component.
         * 
         * This component provides features to apply animations to Game Objects. It is responsible for
         * loading, queuing animations for later playback, mixing between animations and setting
         * the current animation frame to the Game Object that owns this component.
         * 
         * This component lives as an instance within any Game Object that has it defined, such as Sprites.
         * 
         * You can access its properties and methods via the `anims` property, i.e. `Sprite.anims`.
         * 
         * As well as playing animations stored in the global Animation Manager, this component
         * can also create animations that are stored locally within it. See the `create` method
         * for more details.
         * 
         * Prior to Phaser 3.50 this component was called just `Animation` and lived in the
         * `Phaser.GameObjects.Components` namespace. It was renamed to `AnimationState`
         * in 3.50 to help better identify its true purpose when browsing the documentation.
         */
        class AnimationState {
            /**
             * 
             * @param parent The Game Object to which this animation component belongs.
             */
            constructor(parent: Phaser.GameObjects.GameObject);

            /**
             * The Game Object to which this animation component belongs.
             * 
             * You can typically access this component from the Game Object
             * via the `this.anims` property.
             */
            parent: Phaser.GameObjects.GameObject;

            /**
             * A reference to the global Animation Manager.
             */
            animationManager: Phaser.Animations.AnimationManager;

            /**
             * A reference to the Texture Manager.
             */
            protected textureManager: Phaser.Textures.TextureManager;

            /**
             * The Animations stored locally in this Animation component.
             * 
             * Do not modify the contents of this Map directly, instead use the
             * `add`, `create` and `remove` methods of this class instead.
             */
            protected anims: Phaser.Structs.Map<string, Phaser.Animations.Animation>;

            /**
             * Is an animation currently playing or not?
             */
            isPlaying: boolean;

            /**
             * Has the current animation started playing, or is it waiting for a delay to expire?
             */
            hasStarted: boolean;

            /**
             * The current Animation loaded into this Animation component.
             * 
             * Will be `null` if no animation is yet loaded.
             */
            currentAnim: Phaser.Animations.Animation | null;

            /**
             * The current AnimationFrame being displayed by this Animation component.
             * 
             * Will be `null` if no animation is yet loaded.
             */
            currentFrame: Phaser.Animations.AnimationFrame | null;

            /**
             * The key, instance, or config of the next Animation to be loaded into this Animation component
             * when the current animation completes.
             * 
             * Will be `null` if no animation has been queued.
             */
            nextAnim: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig | null;

            /**
             * A queue of Animations to be loaded into this Animation component when the current animation completes.
             * 
             * Populate this queue via the `chain` method.
             */
            nextAnimsQueue: any[];

            /**
             * The Time Scale factor.
             * 
             * You can adjust this value to modify the passage of time for the animation that is currently
             * playing. For example, setting it to 2 will make the animation play twice as fast. Or setting
             * it to 0.5 will slow the animation down.
             * 
             * You can change this value at run-time, or set it via the `PlayAnimationConfig`.
             * 
             * Prior to Phaser 3.50 this property was private and called `_timeScale`.
             */
            timeScale: number;

            /**
             * The frame rate of playback, of the current animation, in frames per second.
             * 
             * This value is set when a new animation is loaded into this component and should
             * be treated as read-only, as changing it once playback has started will not alter
             * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object.
             */
            frameRate: number;

            /**
             * The duration of the current animation, in milliseconds.
             * 
             * This value is set when a new animation is loaded into this component and should
             * be treated as read-only, as changing it once playback has started will not alter
             * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object.
             */
            duration: number;

            /**
             * The number of milliseconds per frame, not including frame specific modifiers that may be present in the
             * Animation data.
             * 
             * This value is calculated when a new animation is loaded into this component and should
             * be treated as read-only. Changing it will not alter playback speed.
             */
            msPerFrame: number;

            /**
             * Skip frames if the time lags, or always advanced anyway?
             */
            skipMissedFrames: boolean;

            /**
             * Start playback of this animation from a random frame?
             */
            randomFrame: boolean;

            /**
             * The delay before starting playback of the current animation, in milliseconds.
             * 
             * This value is set when a new animation is loaded into this component and should
             * be treated as read-only, as changing it once playback has started will not alter
             * the animation. To change the delay, provide a new value in the `PlayAnimationConfig` object.
             * 
             * Prior to Phaser 3.50 this property was private and called `_delay`.
             */
            delay: number;

            /**
             * The number of times to repeat playback of the current animation.
             * 
             * If -1, it means the animation will repeat forever.
             * 
             * This value is set when a new animation is loaded into this component and should
             * be treated as read-only, as changing it once playback has started will not alter
             * the animation. To change the number of repeats, provide a new value in the `PlayAnimationConfig` object.
             * 
             * Prior to Phaser 3.50 this property was private and called `_repeat`.
             */
            repeat: number;

            /**
             * The number of milliseconds to wait before starting the repeat playback of the current animation.
             * 
             * This value is set when a new animation is loaded into this component, but can also be modified
             * at run-time.
             * 
             * You can change the repeat delay by providing a new value in the `PlayAnimationConfig` object.
             * 
             * Prior to Phaser 3.50 this property was private and called `_repeatDelay`.
             */
            repeatDelay: number;

            /**
             * Should the current animation yoyo? An animation that yoyos will play in reverse, from the end
             * to the start, before then repeating or completing. An animation that does not yoyo will just
             * play from the start to the end.
             * 
             * This value is set when a new animation is loaded into this component, but can also be modified
             * at run-time.
             * 
             * You can change the yoyo by providing a new value in the `PlayAnimationConfig` object.
             * 
             * Prior to Phaser 3.50 this property was private and called `_yoyo`.
             */
            yoyo: boolean;

            /**
             * If the animation has a delay set, before playback will begin, this
             * controls when the first frame is set on the Sprite. If this property
             * is 'false' then the frame is set only after the delay has expired.
             * This is the default behavior.
             * 
             * If this property is 'true' then the first frame of this animation
             * is set immediately, and then when the delay expires, playback starts.
             */
            showBeforeDelay: boolean;

            /**
             * Should the GameObject's `visible` property be set to `true` when the animation starts to play?
             * 
             * This will happen _after_ any delay that may have been set.
             * 
             * This value is set when a new animation is loaded into this component, but can also be modified
             * at run-time, assuming the animation is currently delayed.
             */
            showOnStart: boolean;

            /**
             * Should the GameObject's `visible` property be set to `false` when the animation completes?
             * 
             * This value is set when a new animation is loaded into this component, but can also be modified
             * at run-time, assuming the animation is still actively playing.
             */
            hideOnComplete: boolean;

            /**
             * Is the playhead moving forwards (`true`) or in reverse (`false`) ?
             */
            forward: boolean;

            /**
             * An internal trigger that tells the component if it should plays the animation
             * in reverse mode ('true') or not ('false'). This is used because `forward` can
             * be changed by the `yoyo` feature.
             * 
             * Prior to Phaser 3.50 this property was private and called `_reverse`.
             */
            inReverse: boolean;

            /**
             * Internal time overflow accumulator.
             * 
             * This has the `delta` time added to it as part of the `update` step.
             */
            accumulator: number;

            /**
             * The time point at which the next animation frame will change.
             * 
             * This value is compared against the `accumulator` as part of the `update` step.
             */
            nextTick: number;

            /**
             * A counter keeping track of how much delay time, in milliseconds, is left before playback begins.
             * 
             * This is set via the `playAfterDelay` method, although it can be modified at run-time
             * if required, as long as the animation has not already started playing.
             */
            delayCounter: number;

            /**
             * A counter that keeps track of how many repeats are left to run.
             * 
             * This value is set when a new animation is loaded into this component, but can also be modified
             * at run-time.
             */
            repeatCounter: number;

            /**
             * An internal flag keeping track of pending repeats.
             */
            pendingRepeat: boolean;

            /**
             * Sets an animation, or an array of animations, to be played in the future, after the current one completes or stops.
             * 
             * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc,
             * or have one of the `stop` methods called.
             * 
             * An animation set to repeat forever will never enter a completed state unless stopped.
             * 
             * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event).
             * 
             * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.
             * 
             * Call this method with no arguments to reset all currently chained animations.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them.
             * @returns The Game Object that owns this Animation Component.
             */
            chain(key?: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig | string[] | Phaser.Animations.Animation[] | Phaser.Types.Animations.PlayAnimationConfig[]): Phaser.GameObjects.GameObject;

            /**
             * Returns the key of the animation currently loaded into this component.
             * 
             * Prior to Phaser 3.50 this method was called `getCurrentKey`.undefined
             * @returns The key of the Animation currently loaded into this component, or an empty string if none loaded.
             */
            getName(): string;

            /**
             * Returns the key of the animation frame currently displayed by this component.undefined
             * @returns The key of the Animation Frame currently displayed by this component, or an empty string if no animation has been loaded.
             */
            getFrameName(): string;

            /**
             * Internal method used to load an animation into this component.
             * @param key The string-based key of the animation to play, or a `PlayAnimationConfig` object.
             * @returns The Game Object that owns this Animation Component.
             */
            protected load(key: string | Phaser.Types.Animations.PlayAnimationConfig): Phaser.GameObjects.GameObject;

            /**
             * Pause the current animation and set the `isPlaying` property to `false`.
             * You can optionally pause it at a specific frame.
             * @param atFrame An optional frame to set after pausing the animation.
             * @returns The Game Object that owns this Animation Component.
             */
            pause(atFrame?: Phaser.Animations.AnimationFrame): Phaser.GameObjects.GameObject;

            /**
             * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.
             * You can optionally tell it to start playback from a specific frame.
             * @param fromFrame An optional frame to set before restarting playback.
             * @returns The Game Object that owns this Animation Component.
             */
            resume(fromFrame?: Phaser.Animations.AnimationFrame): Phaser.GameObjects.GameObject;

            /**
             * Waits for the specified delay, in milliseconds, then starts playback of the given animation.
             * 
             * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here.
             * 
             * If an animation is already running and a new animation is given to this method, it will wait for
             * the given delay before starting the new animation.
             * 
             * If no animation is currently running, the given one begins after the delay.
             * 
             * Prior to Phaser 3.50 this method was called 'delayedPlay' and the parameters were in the reverse order.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
             * @param delay The delay, in milliseconds, to wait before starting the animation playing.
             * @returns The Game Object that owns this Animation Component.
             */
            playAfterDelay(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, delay: number): Phaser.GameObjects.GameObject;

            /**
             * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback
             * of the given animation.
             * 
             * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an
             * idle animation to a walking animation, by making them blend smoothly into each other.
             * 
             * If no animation is currently running, the given one will start immediately.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
             * @param repeatCount How many times should the animation repeat before the next one starts? Default 1.
             * @returns The Game Object that owns this Animation Component.
             */
            playAfterRepeat(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, repeatCount?: number): Phaser.GameObjects.GameObject;

            /**
             * Start playing the given animation on this Sprite.
             * 
             * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite.
             * 
             * The benefit of a global animation is that multiple Sprites can all play the same animation, without
             * having to duplicate the data. You can just create it once and then play it on any Sprite.
             * 
             * The following code shows how to create a global repeating animation. The animation will be created
             * from all of the frames within the sprite sheet that was loaded with the key 'muybridge':
             * 
             * ```javascript
             * var config = {
             *     key: 'run',
             *     frames: 'muybridge',
             *     frameRate: 15,
             *     repeat: -1
             * };
             * 
             * //  This code should be run from within a Scene:
             * this.anims.create(config);
             * ```
             * 
             * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone,
             * you can call the `Animation.create` method instead. It accepts the exact same parameters as when
             * creating a global animation, however the resulting data is kept locally in this Sprite.
             * 
             * With the animation created, either globally or locally, you can now play it on this Sprite:
             * 
             * ```javascript
             * this.add.sprite(x, y).play('run');
             * ```
             * 
             * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config
             * object instead:
             * 
             * ```javascript
             * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 });
             * ```
             * 
             * When playing an animation on a Sprite it will first check to see if it can find a matching key
             * locally within the Sprite. If it can, it will play the local animation. If not, it will then
             * search the global Animation Manager and look for it there.
             * 
             * If you need a Sprite to be able to play both local and global animations, make sure they don't
             * have conflicting keys.
             * 
             * See the documentation for the `PlayAnimationConfig` config object for more details about this.
             * 
             * Also, see the documentation in the Animation Manager for further details on creating animations.
             * @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 Game Object that owns this Animation Component.
             */
            play(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, ignoreIfPlaying?: boolean): Phaser.GameObjects.GameObject;

            /**
             * Start playing the given animation on this Sprite, in reverse.
             * 
             * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite.
             * 
             * The benefit of a global animation is that multiple Sprites can all play the same animation, without
             * having to duplicate the data. You can just create it once and then play it on any Sprite.
             * 
             * The following code shows how to create a global repeating animation. The animation will be created
             * from all of the frames within the sprite sheet that was loaded with the key 'muybridge':
             * 
             * ```javascript
             * var config = {
             *     key: 'run',
             *     frames: 'muybridge',
             *     frameRate: 15,
             *     repeat: -1
             * };
             * 
             * //  This code should be run from within a Scene:
             * this.anims.create(config);
             * ```
             * 
             * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone,
             * you can call the `Animation.create` method instead. It accepts the exact same parameters as when
             * creating a global animation, however the resulting data is kept locally in this Sprite.
             * 
             * With the animation created, either globally or locally, you can now play it on this Sprite:
             * 
             * ```javascript
             * this.add.sprite(x, y).playReverse('run');
             * ```
             * 
             * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config
             * object instead:
             * 
             * ```javascript
             * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 });
             * ```
             * 
             * When playing an animation on a Sprite it will first check to see if it can find a matching key
             * locally within the Sprite. If it can, it will play the local animation. If not, it will then
             * search the global Animation Manager and look for it there.
             * 
             * If you need a Sprite to be able to play both local and global animations, make sure they don't
             * have conflicting keys.
             * 
             * See the documentation for the `PlayAnimationConfig` config object for more details about this.
             * 
             * Also, see the documentation in the Animation Manager for further details on creating animations.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
             * @param ignoreIfPlaying If an animation is already playing then ignore this call. Default false.
             * @returns The Game Object that owns this Animation Component.
             */
            playReverse(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, ignoreIfPlaying?: boolean): Phaser.GameObjects.GameObject;

            /**
             * Load the animation based on the key and set-up all of the internal values
             * needed for playback to start. If there is no delay, it will also fire the start events.
             * @param key The string-based key of the animation to play, or a `PlayAnimationConfig` object.
             * @returns The Game Object that owns this Animation Component.
             */
            startAnimation(key: string | Phaser.Types.Animations.PlayAnimationConfig): Phaser.GameObjects.GameObject;

            /**
             * Reverse the Animation that is already playing on the Game Object.undefined
             * @returns The Game Object that owns this Animation Component.
             */
            reverse(): Phaser.GameObjects.GameObject;

            /**
             * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.
             * 
             * The value is based on the current frame and how far that is in the animation, it is not based on
             * the duration of the animation.undefined
             * @returns The progress of the current animation in frames, between 0 and 1.
             */
            getProgress(): number;

            /**
             * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.
             * 
             * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.
             * 
             * The value is based on the current frame and how far that is in the animation, it is not based on
             * the duration of the animation.
             * @param value The progress value, between 0 and 1. Default 0.
             * @returns The Game Object that owns this Animation Component.
             */
            setProgress(value?: number): Phaser.GameObjects.GameObject;

            /**
             * Sets the number of times that the animation should repeat after its first play through.
             * For example, if repeat is 1, the animation will play a total of twice: the initial play plus 1 repeat.
             * 
             * To repeat indefinitely, use -1.
             * The value should always be an integer.
             * 
             * Calling this method only works if the animation is already running. Otherwise, any
             * value specified here will be overwritten when the next animation loads in. To avoid this,
             * use the `repeat` property of the `PlayAnimationConfig` object instead.
             * @param value The number of times that the animation should repeat.
             * @returns The Game Object that owns this Animation Component.
             */
            setRepeat(value: number): Phaser.GameObjects.GameObject;

            /**
             * Handle the removal of an animation from the Animation Manager.
             * @param key The key of the removed Animation.
             * @param animation The removed Animation.
             */
            globalRemove(key?: string, animation?: Phaser.Animations.Animation): void;

            /**
             * Restarts the current animation from its beginning.
             * 
             * You can optionally reset the delay and repeat counters as well.
             * 
             * Calling this will fire the `ANIMATION_RESTART` event immediately.
             * 
             * If you `includeDelay` then it will also fire the `ANIMATION_START` event once
             * the delay has expired, otherwise, playback will just begin immediately.
             * @param includeDelay Whether to include the delay value of the animation when restarting. Default false.
             * @param resetRepeats Whether to reset the repeat counter or not? Default false.
             * @returns The Game Object that owns this Animation Component.
             */
            restart(includeDelay?: boolean, resetRepeats?: boolean): Phaser.GameObjects.GameObject;

            /**
             * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` event.
             * 
             * This method is called by the Animation instance and should not usually be invoked directly.
             * 
             * If no animation is loaded, no events will be dispatched.
             * 
             * If another animation has been queued for playback, it will be started after the events fire.undefined
             * @returns The Game Object that owns this Animation Component.
             */
            complete(): Phaser.GameObjects.GameObject;

            /**
             * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` event.
             * 
             * If no animation is running, no events will be dispatched.
             * 
             * If there is another animation in the queue (set via the `chain` method) then it will start playing.undefined
             * @returns The Game Object that owns this Animation Component.
             */
            stop(): Phaser.GameObjects.GameObject;

            /**
             * Stops the current animation from playing after the specified time delay, given in milliseconds.
             * 
             * It then dispatches the `ANIMATION_STOP` event.
             * 
             * If no animation is running, no events will be dispatched.
             * 
             * If there is another animation in the queue (set via the `chain` method) then it will start playing,
             * when the current one stops.
             * @param delay The number of milliseconds to wait before stopping this animation.
             * @returns The Game Object that owns this Animation Component.
             */
            stopAfterDelay(delay: number): Phaser.GameObjects.GameObject;

            /**
             * Stops the current animation from playing when it next repeats.
             * 
             * It then dispatches the `ANIMATION_STOP` event.
             * 
             * If no animation is running, no events will be dispatched.
             * 
             * If there is another animation in the queue (set via the `chain` method) then it will start playing,
             * when the current one stops.
             * 
             * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters.
             * @param repeatCount How many times should the animation repeat before stopping? Default 1.
             * @returns The Game Object that owns this Animation Component.
             */
            stopAfterRepeat(repeatCount?: number): Phaser.GameObjects.GameObject;

            /**
             * Stops the current animation from playing when it next sets the given frame.
             * If this frame doesn't exist within the animation it will not stop it from playing.
             * 
             * It then dispatches the `ANIMATION_STOP` event.
             * 
             * If no animation is running, no events will be dispatched.
             * 
             * If there is another animation in the queue (set via the `chain` method) then it will start playing,
             * when the current one stops.
             * @param frame The frame to check before stopping this animation.
             * @returns The Game Object that owns this Animation Component.
             */
            stopOnFrame(frame: Phaser.Animations.AnimationFrame): Phaser.GameObjects.GameObject;

            /**
             * Returns the total number of frames in this animation, or returns zero if no
             * animation has been loaded.undefined
             * @returns The total number of frames in the current animation, or zero if no animation has been loaded.
             */
            getTotalFrames(): number;

            /**
             * The internal update loop for the AnimationState Component.
             * 
             * This is called automatically by the `Sprite.preUpdate` method.
             * @param time The current timestamp.
             * @param delta The delta time, in ms, elapsed since the last frame.
             */
            update(time: number, delta: number): void;

            /**
             * Sets the given Animation Frame as being the current frame
             * and applies it to the parent Game Object, adjusting size and origin as needed.
             * @param animationFrame The animation frame to change to.
             * @returns The Game Object this Animation Component belongs to.
             */
            setCurrentFrame(animationFrame: Phaser.Animations.AnimationFrame): Phaser.GameObjects.GameObject;

            /**
             * Advances the animation to the next frame, regardless of the time or animation state.
             * If the animation is set to repeat, or yoyo, this will still take effect.
             * 
             * Calling this does not change the direction of the animation. I.e. if it was currently
             * playing in reverse, calling this method doesn't then change the direction to forwards.undefined
             * @returns The Game Object this Animation Component belongs to.
             */
            nextFrame(): Phaser.GameObjects.GameObject;

            /**
             * Advances the animation to the previous frame, regardless of the time or animation state.
             * If the animation is set to repeat, or yoyo, this will still take effect.
             * 
             * Calling this does not change the direction of the animation. I.e. if it was currently
             * playing in forwards, calling this method doesn't then change the direction to backwards.undefined
             * @returns The Game Object this Animation Component belongs to.
             */
            previousFrame(): Phaser.GameObjects.GameObject;

            /**
             * Get an Animation instance that has been created locally on this Sprite.
             * 
             * See the `create` method for more details.
             * @param key The key of the Animation to retrieve.
             * @returns The Animation, or `null` if the key is invalid.
             */
            get(key: string): Phaser.Animations.Animation;

            /**
             * Checks to see if the given key is already used locally within the animations stored on this Sprite.
             * @param key The key of the Animation to check.
             * @returns `true` if the Animation exists locally, or `false` if the key is available, or there are no local animations.
             */
            exists(key: string): boolean;

            /**
             * Creates a new Animation that is local specifically to this Sprite.
             * 
             * When a Sprite owns an animation, it is kept out of the global Animation Manager, which means
             * you're free to use keys that may be already defined there. Unless you specifically need a Sprite
             * to have a unique animation, you should favor using global animations instead, as they allow for
             * the same animation to be used across multiple Sprites, saving on memory. However, if this Sprite
             * is the only one to use this animation, it's sensible to create it here.
             * 
             * If an invalid key is given this method will return `false`.
             * 
             * If you pass the key of an animation that already exists locally, that animation will be returned.
             * 
             * A brand new animation is only created if the key is valid and not already in use by this Sprite.
             * 
             * If you wish to re-use an existing key, call the `remove` method first, then this method.
             * @param config The configuration settings for the Animation.
             * @returns The Animation that was created, or `false` if the key is already in use.
             */
            create(config: Phaser.Types.Animations.Animation): Phaser.Animations.Animation | false;

            /**
             * Create one, or more animations from a loaded Aseprite JSON file.
             * 
             * Aseprite is a powerful animated sprite editor and pixel art tool.
             * 
             * You can find more details at https://www.aseprite.org/
             * 
             * To export a compatible JSON file in Aseprite, please do the following:
             * 
             * 1. Go to "File - Export Sprite Sheet"
             * 
             * 2. On the **Layout** tab:
             * 2a. Set the "Sheet type" to "Packed"
             * 2b. Set the "Constraints" to "None"
             * 2c. Check the "Merge Duplicates" checkbox
             * 
             * 3. On the **Sprite** tab:
             * 3a. Set "Layers" to "Visible layers"
             * 3b. Set "Frames" to "All frames", unless you only wish to export a sub-set of tags
             * 
             * 4. On the **Borders** tab:
             * 4a. Check the "Trim Sprite" and "Trim Cells" options
             * 4b. Ensure "Border Padding", "Spacing" and "Inner Padding" are all > 0 (1 is usually enough)
             * 
             * 5. On the **Output** tab:
             * 5a. Check "Output File", give your image a name and make sure you choose "png files" as the file type
             * 5b. Check "JSON Data" and give your json file a name
             * 5c. The JSON Data type can be either a Hash or Array, Phaser doesn't mind.
             * 5d. Make sure "Tags" is checked in the Meta options
             * 5e. In the "Item Filename" input box, make sure it says just "{frame}" and nothing more.
             * 
             * 6. Click export
             * 
             * This was tested with Aseprite 1.2.25.
             * 
             * This will export a png and json file which you can load using the Aseprite Loader, i.e.:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.path = 'assets/animations/aseprite/';
             *     this.load.aseprite('paladin', 'paladin.png', 'paladin.json');
             * }
             * ```
             * 
             * Once loaded, you can call this method on a Sprite with the 'atlas' key:
             * 
             * ```javascript
             * const sprite = this.add.sprite(400, 300);
             * 
             * sprite.anims.createFromAseprite('paladin');
             * ```
             * 
             * Any animations defined in the JSON will now be available to use on this Sprite and you play them
             * via their Tag name. For example, if you have an animation called 'War Cry' on your Aseprite timeline,
             * you can play it on the Sprite using that Tag name:
             * 
             * ```javascript
             * const sprite = this.add.sprite(400, 300);
             * 
             * sprite.anims.createFromAseprite('paladin');
             * 
             * sprite.play('War Cry');
             * ```
             * 
             * When calling this method you can optionally provide an array of tag names, and only those animations
             * will be created. For example:
             * 
             * ```javascript
             * sprite.anims.createFromAseprite('paladin', [ 'step', 'War Cry', 'Magnum Break' ]);
             * ```
             * 
             * This will only create the 3 animations defined. Note that the tag names are case-sensitive.
             * @param key The key of the loaded Aseprite atlas. It must have been loaded prior to calling this method.
             * @param tags An array of Tag names. If provided, only animations found in this array will be created.
             * @returns An array of Animation instances that were successfully created.
             */
            createFromAseprite(key: string, tags?: string[]): Phaser.Animations.Animation[];

            /**
             * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object.
             * 
             * Generates objects with string based frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNames}.
             * 
             * It's a helper method, designed to make it easier for you to extract all of the frame names from texture atlases.
             * If you're working with a sprite sheet, see the `generateFrameNumbers` method instead.
             * 
             * Example:
             * 
             * If you have a texture atlases loaded called `gems` and it contains 6 frames called `ruby_0001`, `ruby_0002`, and so on,
             * then you can call this method using: `this.anims.generateFrameNames('gems', { prefix: 'ruby_', end: 6, zeroPad: 4 })`.
             * 
             * The `end` value tells it to look for 6 frames, incrementally numbered, all starting with the prefix `ruby_`. The `zeroPad`
             * value tells it how many zeroes pad out the numbers. To create an animation using this method, you can do:
             * 
             * ```javascript
             * this.anims.create({
             *   key: 'ruby',
             *   repeat: -1,
             *   frames: this.anims.generateFrameNames('gems', {
             *     prefix: 'ruby_',
             *     end: 6,
             *     zeroPad: 4
             *   })
             * });
             * ```
             * 
             * Please see the animation examples for further details.
             * @param key The key for the texture containing the animation frames.
             * @param config The configuration object for the animation frame names.
             * @returns The array of {@link Phaser.Types.Animations.AnimationFrame} objects.
             */
            generateFrameNames(key: string, config?: Phaser.Types.Animations.GenerateFrameNames): Phaser.Types.Animations.AnimationFrame[];

            /**
             * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object.
             * 
             * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}.
             * 
             * If you're working with a texture atlas, see the `generateFrameNames` method instead.
             * 
             * It's a helper method, designed to make it easier for you to extract frames from sprite sheets.
             * 
             * Example:
             * 
             * If you have a sprite sheet loaded called `explosion` and it contains 12 frames, then you can call this method using:
             * `this.anims.generateFrameNumbers('explosion', { start: 0, end: 11 })`.
             * 
             * The `end` value tells it to stop after 12 frames. To create an animation using this method, you can do:
             * 
             * ```javascript
             * this.anims.create({
             *   key: 'boom',
             *   frames: this.anims.generateFrameNumbers('explosion', {
             *     start: 0,
             *     end: 11
             *   })
             * });
             * ```
             * 
             * Note that `start` is optional and you don't need to include it if the animation starts from frame 0.
             * 
             * To specify an animation in reverse, swap the `start` and `end` values.
             * 
             * If the frames are not sequential, you may pass an array of frame numbers instead, for example:
             * 
             * `this.anims.generateFrameNumbers('explosion', { frames: [ 0, 1, 2, 1, 2, 3, 4, 0, 1, 2 ] })`
             * 
             * Please see the animation examples and `GenerateFrameNumbers` config docs for further details.
             * @param key The key for the texture containing the animation frames.
             * @param config The configuration object for the animation frames.
             * @returns The array of {@link Phaser.Types.Animations.AnimationFrame} objects.
             */
            generateFrameNumbers(key: string, config?: Phaser.Types.Animations.GenerateFrameNumbers): Phaser.Types.Animations.AnimationFrame[];

            /**
             * Removes a locally created Animation from this Sprite, based on the given key.
             * 
             * Once an Animation has been removed, this Sprite cannot play it again without re-creating it.
             * @param key The key of the animation to remove.
             * @returns The Animation instance that was removed from this Sprite, if the key was valid.
             */
            remove(key: string): Phaser.Animations.Animation;

            /**
             * Destroy this Animation component.
             * 
             * Unregisters event listeners and cleans up its references.
             */
            destroy(): void;

            /**
             * `true` if the current animation is paused, otherwise `false`.
             */
            readonly isPaused: boolean;

        }

        namespace Events {
            /**
             * The Add Animation Event.
             * 
             * This event is dispatched when a new animation is added to the global Animation Manager.
             * 
             * This can happen either as a result of an animation instance being added to the Animation Manager,
             * or the Animation Manager creating a new animation directly.
             */
            const ADD_ANIMATION: string;

            /**
             * The Animation Complete Event.
             * 
             * This event is dispatched by a Sprite when an animation playing on it completes playback.
             * This happens when the animation gets to the end of its sequence, factoring in any delays
             * or repeats it may have to process.
             * 
             * An animation that is set to loop, or repeat forever, will never fire this event, because
             * it never actually completes. If you need to handle this, listen for the `ANIMATION_STOP`
             * event instead, as this is emitted when the animation is stopped directly.
             * 
             * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`
             * 
             * The animation event flow is as follows:
             * 
             * 1. `ANIMATION_START`
             * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has)
             * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this)
             * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count)
             * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count)
             * 
             * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`.
             * 
             * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted.
             */
            const ANIMATION_COMPLETE: string;

            /**
             * The Animation Complete Dynamic Key Event.
             * 
             * This event is dispatched by a Sprite when an animation playing on it completes playback.
             * This happens when the animation gets to the end of its sequence, factoring in any delays
             * or repeats it may have to process.
             * 
             * An animation that is set to loop, or repeat forever, will never fire this event, because
             * it never actually completes. If you need to handle this, listen for the `ANIMATION_STOP`
             * event instead, as this is emitted when the animation is stopped directly.
             * 
             * The difference between this and the `ANIMATION_COMPLETE` event is that this one has a
             * dynamic event name that contains the name of the animation within it. For example,
             * if you had an animation called `explode` you could listen for the completion of that
             * specific animation by using: `sprite.on('animationcomplete-explode', listener)`. Or, if you
             * wish to use types: `sprite.on(Phaser.Animations.Events.ANIMATION_COMPLETE_KEY + 'explode', listener)`.
             * 
             * The animation event flow is as follows:
             * 
             * 1. `ANIMATION_START`
             * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has)
             * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this)
             * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count)
             * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count)
             * 
             * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`.
             * 
             * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted.
             */
            const ANIMATION_COMPLETE_KEY: string;

            /**
             * The Animation Repeat Event.
             * 
             * This event is dispatched by a Sprite when an animation repeats playing on it.
             * This happens if the animation was created, or played, with a `repeat` value specified.
             * 
             * An animation will repeat when it reaches the end of its sequence.
             * 
             * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`
             * 
             * The animation event flow is as follows:
             * 
             * 1. `ANIMATION_START`
             * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has)
             * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this)
             * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count)
             * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count)
             * 
             * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`.
             * 
             * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted.
             */
            const ANIMATION_REPEAT: string;

            /**
             * The Animation Restart Event.
             * 
             * This event is dispatched by a Sprite when an animation restarts playing on it.
             * This only happens when the `Sprite.anims.restart` method is called.
             * 
             * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`
             * 
             * The animation event flow is as follows:
             * 
             * 1. `ANIMATION_START`
             * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has)
             * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this)
             * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count)
             * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count)
             * 
             * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`.
             * 
             * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted.
             */
            const ANIMATION_RESTART: string;

            /**
             * The Animation Start Event.
             * 
             * This event is dispatched by a Sprite when an animation starts playing on it.
             * This happens when the animation is played, factoring in any delay that may have been specified.
             * This event happens after the delay has expired and prior to the first update event.
             * 
             * Listen for it on the Sprite using `sprite.on('animationstart', listener)`
             * 
             * The animation event flow is as follows:
             * 
             * 1. `ANIMATION_START`
             * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has)
             * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this)
             * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count)
             * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count)
             * 
             * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`.
             * 
             * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted.
             */
            const ANIMATION_START: string;

            /**
             * The Animation Stop Event.
             * 
             * This event is dispatched by a Sprite when an animation is stopped on it. An animation
             * will only be stopped if a method such as `Sprite.stop` or `Sprite.anims.stopAfterDelay`
             * is called. It can also be emitted if a new animation is started before the current one completes.
             * 
             * Listen for it on the Sprite using `sprite.on('animationstop', listener)`
             * 
             * The animation event flow is as follows:
             * 
             * 1. `ANIMATION_START`
             * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has)
             * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this)
             * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count)
             * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count)
             * 
             * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`.
             * 
             * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted.
             */
            const ANIMATION_STOP: string;

            /**
             * The Animation Update Event.
             * 
             * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame.
             * An animation will change frame based on the frame rate and other factors like `timeScale` and `delay`. It can also change
             * frame when stopped or restarted.
             * 
             * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`
             * 
             * If an animation is playing faster than the game frame-rate can handle, it's entirely possible for it to emit several
             * update events in a single game frame, so please be aware of this in your code. The **final** event received that frame
             * is the one that is rendered to the game.
             * 
             * The animation event flow is as follows:
             * 
             * 1. `ANIMATION_START`
             * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has)
             * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this)
             * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count)
             * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count)
             * 
             * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`.
             * 
             * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted.
             */
            const ANIMATION_UPDATE: string;

            /**
             * The Pause All Animations Event.
             * 
             * This event is dispatched when the global Animation Manager is told to pause.
             * 
             * When this happens all current animations will stop updating, although it doesn't necessarily mean
             * that the game has paused as well.
             */
            const PAUSE_ALL: string;

            /**
             * The Remove Animation Event.
             * 
             * This event is dispatched when an animation is removed from the global Animation Manager.
             */
            const REMOVE_ANIMATION: string;

            /**
             * The Resume All Animations Event.
             * 
             * This event is dispatched when the global Animation Manager resumes, having been previously paused.
             * 
             * When this happens all current animations will continue updating again.
             */
            const RESUME_ALL: string;

        }

    }

    namespace Cache {
        /**
         * A key-value store used by the Phaser framework to cache loaded assets and other data.
         * Items are stored and retrieved using string-based keys. The BaseCache emits events when
         * items are added or removed, allowing other systems to react to cache changes. Multiple
         * BaseCache instances are owned by the CacheManager, one per asset type (JSON, binary,
         * audio, etc.), and you can also create custom caches via `CacheManager.addCustom()`.
         */
        class BaseCache {
            /**
             * The Map in which the cache objects are stored.
             * 
             * You can query the Map directly or use the BaseCache methods.
             */
            entries: Phaser.Structs.Map<String, any>;

            /**
             * An instance of EventEmitter used by the cache to emit related events.
             */
            events: Phaser.Events.EventEmitter;

            /**
             * Adds an item to this cache. The item is referenced by a unique string, which you are responsible
             * for setting and keeping track of. The item can only be retrieved by using this string.
             * @param key The unique key by which the data added to the cache will be referenced.
             * @param data The data to be stored in the cache.
             * @returns This BaseCache object.
             */
            add(key: string, data: any): this;

            /**
             * Checks if this cache contains an item matching the given key.
             * This performs the same action as `BaseCache.exists`.
             * @param key The unique key of the item to be checked in this cache.
             * @returns Returns `true` if the cache contains an item matching the given key, otherwise `false`.
             */
            has(key: string): boolean;

            /**
             * Checks if this cache contains an item matching the given key.
             * This performs the same action as `BaseCache.has` and is called directly by the Loader.
             * @param key The unique key of the item to be checked in this cache.
             * @returns Returns `true` if the cache contains an item matching the given key, otherwise `false`.
             */
            exists(key: string): boolean;

            /**
             * Gets an item from this cache based on the given key.
             * @param key The unique key of the item to be retrieved from this cache.
             * @returns The item in the cache, or `null` if no item matching the given key was found.
             */
            get(key: string): any;

            /**
             * Removes an item from this cache based on the given key.
             * 
             * If an entry matching the key is found it is removed from the cache and a `remove` event emitted.
             * No additional checks are done on the item removed. If other systems or parts of your game code
             * are relying on this item, it is up to you to sever those relationships prior to removing the item.
             * @param key The unique key of the item to remove from the cache.
             * @returns This BaseCache object.
             */
            remove(key: string): this;

            /**
             * Returns all keys in use in this cache.undefined
             * @returns An array of strings containing all keys currently stored in this cache.
             */
            getKeys(): string[];

            /**
             * Destroys this cache and all items within it. Clears the entries Map, removes all
             * event listeners from the EventEmitter, and nulls the internal references.
             */
            destroy(): void;

        }

        /**
         * The Cache Manager is the global cache owned and maintained by the Game instance.
         * 
         * Various systems, such as the file Loader, rely on this cache in order to store the files
         * they have loaded. The manager itself doesn't store any files, but instead owns multiple BaseCache
         * instances, one per type of file. Built-in caches are provided for binary files, bitmap fonts,
         * JSON, physics data, shaders, audio, video, text, HTML, WaveFront OBJ, tilemaps, and XML.
         * You can also add your own custom caches via the `addCustom` method.
         * 
         * The Cache Manager is available in any Scene via `this.cache` and is shared across all Scenes.
         */
        class CacheManager {
            /**
             * 
             * @param game A reference to the Phaser.Game instance that owns this CacheManager.
             */
            constructor(game: Phaser.Game);

            /**
             * A reference to the Phaser.Game instance that owns this CacheManager.
             */
            protected game: Phaser.Game;

            /**
             * A Cache storing all binary files, typically added via the Loader.
             */
            binary: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all bitmap font data files, typically added via the Loader.
             * Only the font data is stored in this cache, the textures are part of the Texture Manager.
             */
            bitmapFont: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all JSON data files, typically added via the Loader.
             */
            json: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all physics data files, typically added via the Loader.
             */
            physics: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all shader source files, typically added via the Loader.
             */
            shader: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all non-streaming audio files, typically added via the Loader.
             */
            audio: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all non-streaming video files, typically added via the Loader.
             */
            video: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all text files, typically added via the Loader.
             */
            text: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all html files, typically added via the Loader.
             */
            html: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all tilemap data files, typically added via the Loader.
             * Only the data is stored in this cache, the textures are part of the Texture Manager.
             */
            tilemap: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all xml data files, typically added via the Loader.
             */
            xml: Phaser.Cache.BaseCache;

            /**
             * A Cache storing all Phaser Compact Texture Atlas data files, typically added via the Loader.
             */
            atlas: Phaser.Cache.BaseCache;

            /**
             * An object that contains your own custom BaseCache entries.
             * Add to this via the `addCustom` method.
             */
            custom: {[key: string]: Phaser.Cache.BaseCache};

            /**
             * Add your own custom Cache for storing your own files.
             * The cache will be available under `Cache.custom.key`.
             * The cache will only be created if the key is not already in use.
             * @param key The unique key of your custom cache.
             * @returns A reference to the BaseCache that was created. If the key was already in use, a reference to the existing cache is returned instead.
             */
            addCustom(key: string): Phaser.Cache.BaseCache;

            /**
             * Destroys all built-in BaseCaches and all custom caches, then nulls their references. Called automatically when the Game instance is destroyed.
             */
            destroy(): void;

        }

        namespace Events {
            /**
             * The Cache Add Event.
             * 
             * This event is dispatched by any Cache that extends the BaseCache each time a new object is added to it.
             */
            const ADD: string;

            /**
             * The Cache Remove Event.
             * 
             * This event is dispatched by any Cache that extends the BaseCache each time an object is removed from it.
             */
            const REMOVE: string;

        }

    }

    namespace Cameras {
        namespace Scene2D {
            /**
             * A Base Camera class.
             * 
             * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world,
             * and can be positioned, rotated, zoomed and scrolled accordingly.
             * 
             * A Camera consists of two elements: The viewport and the scroll values.
             * 
             * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are
             * created the same size as your game, but their position and size can be set to anything. This means if you
             * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,
             * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`).
             * 
             * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this
             * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the
             * viewport, and changing the viewport has no impact on the scrolling.
             * 
             * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,
             * allowing you to filter Game Objects out on a per-Camera basis.
             * 
             * The Base Camera is extended by the Camera class, which adds in special effects including Fade,
             * Flash and Camera Shake, as well as the ability to follow Game Objects.
             * 
             * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow
             * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate
             * to when they were added to the Camera class.
             */
            class BaseCamera extends Phaser.Events.EventEmitter implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.Visible {
                /**
                 * 
                 * @param x The x position of the Camera, relative to the top-left of the game canvas.
                 * @param y The y position of the Camera, relative to the top-left of the game canvas.
                 * @param width The width of the Camera, in pixels.
                 * @param height The height of the Camera, in pixels.
                 */
                constructor(x: number, y: number, width: number, height: number);

                /**
                 * A reference to the Scene this camera belongs to.
                 */
                scene: Phaser.Scene;

                /**
                 * A reference to the Game Scene Manager.
                 */
                sceneManager: Phaser.Scenes.SceneManager;

                /**
                 * A reference to the Game Scale Manager.
                 */
                scaleManager: Phaser.Scale.ScaleManager;

                /**
                 * A reference to the Scene's Camera Manager to which this Camera belongs.
                 */
                cameraManager: Phaser.Cameras.Scene2D.CameraManager;

                /**
                 * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion.
                 * This value is a bitmask.
                 */
                readonly id: number;

                /**
                 * The name of the Camera. This is left empty for your own use.
                 */
                name: string;

                /**
                 * Should this camera round its pixel values to integers?
                 */
                roundPixels: boolean;

                /**
                 * Is this Camera visible or not?
                 * 
                 * A visible camera will render and perform input tests.
                 * An invisible camera will not render anything and will skip input tests.
                 */
                visible: boolean;

                /**
                 * Is this Camera using a bounds to restrict scrolling movement?
                 * 
                 * Set this property along with the bounds via `Camera.setBounds`.
                 */
                useBounds: boolean;

                /**
                 * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at.
                 * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step.
                 * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly.
                 * You can use it for culling or intersection checks.
                 */
                readonly worldView: Phaser.Geom.Rectangle;

                /**
                 * Is this Camera dirty?
                 * 
                 * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame.
                 * 
                 * This flag is cleared during rendering with the new values.
                 */
                dirty: boolean;

                /**
                 * A local transform matrix combining `matrix` and `matrixExternal`.
                 */
                matrixCombined: Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * A local transform matrix used to compute the camera location.
                 */
                matrixExternal: Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Does this Camera have a transparent background?
                 */
                transparent: boolean;

                /**
                 * The background color of this Camera. Only used if `transparent` is `false`.
                 */
                backgroundColor: Phaser.Display.Color;

                /**
                 * The Camera alpha value. Setting this property impacts every single object that this Camera
                 * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out,
                 * or via the chainable `setAlpha` method instead.
                 */
                alpha: number;

                /**
                 * Should the camera cull Game Objects before checking them for input hit tests?
                 * In some special cases it may be beneficial to disable this.
                 */
                disableCull: boolean;

                /**
                 * The mid-point of the Camera in 'world' coordinates.
                 * 
                 * Use it to obtain exactly where in the world the center of the camera is currently looking.
                 * 
                 * This value is updated in the preRender method, after the scroll values and follower
                 * have been processed.
                 */
                readonly midPoint: Phaser.Math.Vector2;

                /**
                 * The horizontal origin of rotation for this Camera.
                 * 
                 * By default the camera rotates around the center of the viewport.
                 * 
                 * Changing the origin allows you to adjust the point in the viewport from which rotation happens.
                 * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.
                 * 
                 * See `setOrigin` to set both origins in a single, chainable call.
                 */
                originX: number;

                /**
                 * The vertical origin of rotation for this Camera.
                 * 
                 * By default the camera rotates around the center of the viewport.
                 * 
                 * Changing the origin allows you to adjust the point in the viewport from which rotation happens.
                 * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.
                 * 
                 * See `setOrigin` to set both origins in a single, chainable call.
                 */
                originY: number;

                /**
                 * The Mask this Camera is using during render.
                 * Set the mask using the `setMask` method. Remove the mask using the `clearMask` method.
                 */
                mask: Phaser.Display.Masks.GeometryMask | null;

                /**
                 * This array is populated with all of the Game Objects that this Camera has rendered
                 * in the previous (or current, depending on when you inspect it) frame.
                 * 
                 * It is cleared at the start of `Camera.preUpdate`, or if the Camera is destroyed.
                 * 
                 * You should not modify this array as it is used internally by the input system,
                 * however you can read it as required. Note that Game Objects may appear in this
                 * list multiple times if they belong to multiple non-exclusive Containers.
                 */
                renderList: Phaser.GameObjects.GameObject[];

                /**
                 * Is this Camera a Scene Camera? (which is the default), or a Camera
                 * belonging to a Texture?
                 */
                isSceneCamera: boolean;

                /**
                 * Whether to force the camera to render via a framebuffer.
                 * This only applies when using the WebGL renderer.
                 * This makes the camera contents available to other WebGL processes,
                 * such as `CaptureFrame`.
                 */
                forceComposite: boolean;

                /**
                 * Can this Camera render rounded pixel values?
                 * 
                 * This property is updated during the `preRender` method and should not be
                 * set directly. It is set based on the `roundPixels` property of the Camera
                 * combined with the zoom level. If the zoom is an integer then the WebGL
                 * Renderer can apply rounding during rendering.
                 */
                readonly renderRoundPixels: boolean;

                /**
                 * Adds the given Game Object to this camera's render list.
                 * 
                 * This is invoked during the rendering stage. Only objects that are actually rendered
                 * will appear in the render list.
                 * @param child The Game Object to add to the render list.
                 */
                addToRenderList(child: Phaser.GameObjects.GameObject): void;

                /**
                 * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders.
                 * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
                 * @param value The Camera alpha value. Default 1.
                 * @returns This Camera instance.
                 */
                setAlpha(value?: number): this;

                /**
                 * Sets the rotation origin of this Camera.
                 * 
                 * The values are given in the range 0 to 1 and are only used when calculating Camera rotation.
                 * 
                 * By default the camera rotates around the center of the viewport.
                 * 
                 * Changing the origin allows you to adjust the point in the viewport from which rotation happens.
                 * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.
                 * @param x The horizontal origin value. Default 0.5.
                 * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Camera instance.
                 */
                setOrigin(x?: number, y?: number): this;

                /**
                 * Calculates what the Camera.scrollX and scrollY values would need to be in order to move
                 * the Camera so it is centered on the given x and y coordinates, without actually moving
                 * the Camera there. The results are clamped based on the Camera bounds, if set.
                 * @param x The horizontal coordinate to center on.
                 * @param y The vertical coordinate to center on.
                 * @param out A Vector2 to store the values in. If not given a new Vector2 is created.
                 * @returns The scroll coordinates stored in the `x` and `y` properties.
                 */
                getScroll(x: number, y: number, out?: Phaser.Math.Vector2): Phaser.Math.Vector2;

                /**
                 * Moves the Camera horizontally so that it is centered on the given x coordinate, bounds allowing.
                 * Calling this does not change the scrollY value.
                 * @param x The horizontal coordinate to center on.
                 * @returns This Camera instance.
                 */
                centerOnX(x: number): this;

                /**
                 * Moves the Camera vertically so that it is centered on the given y coordinate, bounds allowing.
                 * Calling this does not change the scrollX value.
                 * @param y The vertical coordinate to center on.
                 * @returns This Camera instance.
                 */
                centerOnY(y: number): this;

                /**
                 * Moves the Camera so that it is centered on the given coordinates, bounds allowing.
                 * @param x The horizontal coordinate to center on.
                 * @param y The vertical coordinate to center on.
                 * @returns This Camera instance.
                 */
                centerOn(x: number, y: number): this;

                /**
                 * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled.undefined
                 * @returns This Camera instance.
                 */
                centerToBounds(): this;

                /**
                 * Moves the Camera so that it is re-centered based on its viewport size.undefined
                 * @returns This Camera instance.
                 */
                centerToSize(): this;

                /**
                 * Takes an array of Game Objects and returns a new array featuring only those objects
                 * visible by this camera.
                 * @param renderableObjects An array of Game Objects to cull.
                 * @returns An array of Game Objects visible to this Camera.
                 */
                cull<G extends Phaser.GameObjects.GameObject[]>(renderableObjects: G): G;

                /**
                 * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform.
                 * You can optionally provide a Vector2, or similar object, to store the results in.
                 * @param x The x position to convert to world space.
                 * @param y The y position to convert to world space.
                 * @param output An optional object to store the results in. If not provided a new Vector2 will be created.
                 * @returns An object holding the converted values in its `x` and `y` properties.
                 */
                getWorldPoint<O extends Phaser.Math.Vector2>(x: number, y: number, output?: O): O;

                /**
                 * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings
                 * so that they are ignored by this Camera. This means they will not be rendered by this Camera.
                 * @param entries The Game Object, or array of Game Objects, to be ignored by this Camera.
                 * @returns This Camera instance.
                 */
                ignore(entries: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[] | Phaser.GameObjects.Group): this;

                /**
                 * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required.
                 * Do not call this method if you are not using camera bounds.
                 * @param x The value to horizontally scroll clamp.
                 * @returns The adjusted value to use as scrollX.
                 */
                clampX(x: number): number;

                /**
                 * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required.
                 * Do not call this method if you are not using camera bounds.
                 * @param y The value to vertically scroll clamp.
                 * @returns The adjusted value to use as scrollY.
                 */
                clampY(y: number): number;

                /**
                 * If this Camera has previously had movement bounds set on it, this will remove them.undefined
                 * @returns This Camera instance.
                 */
                removeBounds(): this;

                /**
                 * Set the rotation of this Camera. This causes everything it renders to appear rotated.
                 * 
                 * Rotating a camera does not rotate the viewport itself, it is applied during rendering.
                 * @param value The camera's angle of rotation, given in degrees. Default 0.
                 * @returns This Camera instance.
                 */
                setAngle(value?: number): this;

                /**
                 * Sets the background color for this Camera.
                 * 
                 * By default a Camera has a transparent background but it can be given a solid color, with any level
                 * of transparency, via this method.
                 * 
                 * The color value can be specified using CSS color notation, hex or numbers.
                 * @param color The color value. In CSS, hex or numeric color notation. Default 'rgba(0,0,0,0)'.
                 * @returns This Camera instance.
                 */
                setBackgroundColor(color?: string | number | Phaser.Types.Display.InputColorObject): this;

                /**
                 * Set the bounds of the Camera. The bounds are an axis-aligned rectangle.
                 * 
                 * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the
                 * edges and into blank space. It does not limit the placement of Game Objects, or where
                 * the Camera viewport can be positioned.
                 * 
                 * Temporarily disable the bounds by changing the boolean `Camera.useBounds`.
                 * 
                 * Clear the bounds entirely by calling `Camera.removeBounds`.
                 * 
                 * If you set bounds that are smaller than the viewport it will stop the Camera from being
                 * able to scroll. The bounds can be positioned where-ever you wish. By default they are from
                 * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of
                 * the Camera bounds. However, you can position them anywhere. So if you wanted a game world
                 * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y
                 * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find
                 * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle.
                 * @param x The top-left x coordinate of the bounds.
                 * @param y The top-left y coordinate of the bounds.
                 * @param width The width of the bounds, in pixels.
                 * @param height The height of the bounds, in pixels.
                 * @param centerOn If `true` the Camera will automatically be centered on the new bounds. Default false.
                 * @returns This Camera instance.
                 */
                setBounds(x: number, y: number, width: number, height: number, centerOn?: boolean): this;

                /**
                 * Sets the `forceComposite` property of this Camera.
                 * This property is only used by the WebGL Renderer.
                 * If `true` the camera will render via a framebuffer,
                 * making it available to other WebGL systems.
                 * @param value The value to set the property to.
                 * @returns This Camera instance.
                 */
                setForceComposite(value: boolean): this;

                /**
                 * Returns a rectangle containing the bounds of the Camera.
                 * 
                 * If the Camera does not have any bounds the rectangle will be empty.
                 * 
                 * The rectangle is a copy of the bounds, so is safe to modify.
                 * @param out An optional Rectangle to store the bounds in. If not given, a new Rectangle will be created.
                 * @returns A rectangle containing the bounds of this Camera.
                 */
                getBounds(out?: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle;

                /**
                 * Sets the name of this Camera.
                 * This value is for your own use and isn't used internally.
                 * @param value The name of the Camera. Default ''.
                 * @returns This Camera instance.
                 */
                setName(value?: string): this;

                /**
                 * Set the position of the Camera viewport within the game.
                 * 
                 * This does not change where the camera is 'looking'. See `setScroll` to control that.
                 * @param x The top-left x coordinate of the Camera viewport.
                 * @param y The top-left y coordinate of the Camera viewport. Default x.
                 * @returns This Camera instance.
                 */
                setPosition(x: number, y?: number): this;

                /**
                 * Set the rotation of this Camera. This causes everything it renders to appear rotated.
                 * 
                 * Rotating a camera does not rotate the viewport itself, it is applied during rendering.
                 * @param value The rotation of the Camera, in radians. Default 0.
                 * @returns This Camera instance.
                 */
                setRotation(value?: number): this;

                /**
                 * Should the Camera round pixel values to whole integers when rendering Game Objects?
                 * 
                 * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing.
                 * @param value `true` to round Camera pixels, `false` to not.
                 * @returns This Camera instance.
                 */
                setRoundPixels(value: boolean): this;

                /**
                 * Sets the Scene the Camera is bound to.
                 * @param scene The Scene the camera is bound to.
                 * @param isSceneCamera Is this Camera being used for a Scene (true) or a Texture? (false) Default true.
                 * @returns This Camera instance.
                 */
                setScene(scene: Phaser.Scene, isSceneCamera?: boolean): this;

                /**
                 * Set the position of where the Camera is looking within the game.
                 * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly.
                 * Use this method, or the scroll properties, to move your camera around the game world.
                 * 
                 * This does not change where the camera viewport is placed. See `setPosition` to control that.
                 * @param x The x coordinate of the Camera in the game world.
                 * @param y The y coordinate of the Camera in the game world. Default x.
                 * @returns This Camera instance.
                 */
                setScroll(x: number, y?: number): this;

                /**
                 * Set the size of the Camera viewport.
                 * 
                 * By default a Camera is the same size as the game, but can be made smaller via this method,
                 * allowing you to create mini-cam style effects by creating and positioning a smaller Camera
                 * viewport within your game.
                 * @param width The width of the Camera viewport.
                 * @param height The height of the Camera viewport. Default width.
                 * @returns This Camera instance.
                 */
                setSize(width: number, height?: number): this;

                /**
                 * This method sets the position and size of the Camera viewport in a single call.
                 * 
                 * If you're trying to change where the Camera is looking at in your game, then see
                 * the method `Camera.setScroll` instead. This method is for changing the viewport
                 * itself, not what the camera can see.
                 * 
                 * By default a Camera is the same size as the game, but can be made smaller via this method,
                 * allowing you to create mini-cam style effects by creating and positioning a smaller Camera
                 * viewport within your game.
                 * 
                 * Note that this is a limited method, and comes with several caveats:
                 * 
                 * - The viewport is an axis-aligned rectangle, and cannot be rotated.
                 * - Filters and masks may appear in the wrong place if the viewport changes.
                 * 
                 * It is more powerful and reliable to use a
                 * `RenderTexture` or `DynamicTexture` instead.
                 * Point its camera where you want the viewport,
                 * set its size, and then draw your game objects to it.
                 * @param x The top-left x coordinate of the Camera viewport.
                 * @param y The top-left y coordinate of the Camera viewport.
                 * @param width The width of the Camera viewport.
                 * @param height The height of the Camera viewport. Default width.
                 * @returns This Camera instance.
                 */
                setViewport(x: number, y: number, width: number, height?: number): this;

                /**
                 * Set the zoom value of the Camera.
                 * 
                 * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'.
                 * Changing to a larger value, such as 2, will cause the camera to 'zoom in'.
                 * 
                 * A value of 1 means 'no zoom' and is the default.
                 * 
                 * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering.
                 * 
                 * As of Phaser 3.50 you can now set the horizontal and vertical zoom values independently.
                 * @param x The horizontal zoom value of the Camera. The minimum it can be is 0.001. Default 1.
                 * @param y The vertical zoom value of the Camera. The minimum it can be is 0.001. Default x.
                 * @returns This Camera instance.
                 */
                setZoom(x?: number, y?: number): this;

                /**
                 * Sets the mask to be applied to this Camera during rendering.
                 * 
                 * The mask must have been previously created and must be a GeometryMask.
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * 
                 * If a mask is already set on this Camera it will be immediately replaced.
                 * 
                 * Masks have no impact on physics or input detection. They are purely a rendering component
                 * that allows you to limit what is visible during the render pass.
                 * @param mask The mask this Camera will use when rendering.
                 * @param fixedPosition Should the mask translate along with the Camera, or be fixed in place and not impacted by the Cameras transform? Default true.
                 * @returns This Camera instance.
                 */
                setMask(mask: Phaser.Display.Masks.GeometryMask, fixedPosition?: boolean): this;

                /**
                 * Clears the mask that this Camera was using.
                 * @param destroyMask Destroy the mask before clearing it? Default false.
                 * @returns This Camera instance.
                 */
                clearMask(destroyMask?: boolean): this;

                /**
                 * Sets the visibility of this Camera.
                 * 
                 * An invisible Camera will skip rendering and input tests of everything it can see.
                 * @param value The visible state of the Camera.
                 * @returns This Camera instance.
                 */
                setVisible(value: boolean): this;

                /**
                 * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties.undefined
                 * @returns A well-formed object suitable for conversion to JSON.
                 */
                toJSON(): Phaser.Types.Cameras.Scene2D.JSONCamera;

                /**
                 * Internal method called automatically by the Camera Manager.
                 * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                 * @param delta The delta time, in ms, elapsed since the last frame.
                 */
                protected update(time: number, delta: number): void;

                /**
                 * Sets whether this Camera is being used as a Scene Camera (the default),
                 * or a Texture Camera used to render to a texture.
                 * @param value Is this being used as a Scene Camera, or a Texture camera?
                 */
                setIsSceneCamera(value: boolean): void;

                /**
                 * Destroys this Camera instance and its internal properties and references.
                 * Once destroyed you cannot use this Camera again, even if re-added to a Camera Manager.
                 * 
                 * This method is called automatically by `CameraManager.remove` if that methods `runDestroy` argument is `true`, which is the default.
                 * 
                 * Unless you have a specific reason otherwise, always use `CameraManager.remove` and allow it to handle the camera destruction,
                 * rather than calling this method directly.
                 */
                destroy(): void;

                /**
                 * The x position of the Camera viewport, relative to the top-left of the game canvas.
                 * The viewport is the area into which the camera renders.
                 * To adjust the position the camera is looking at in the game world, see the `scrollX` value.
                 */
                x: number;

                /**
                 * The y position of the Camera viewport, relative to the top-left of the game canvas.
                 * The viewport is the area into which the camera renders.
                 * To adjust the position the camera is looking at in the game world, see the `scrollY` value.
                 */
                y: number;

                /**
                 * The width of the Camera viewport, in pixels.
                 * 
                 * The viewport is the area into which the Camera renders. Setting the viewport does
                 * not restrict where the Camera can scroll to.
                 */
                width: number;

                /**
                 * The height of the Camera viewport, in pixels.
                 * 
                 * The viewport is the area into which the Camera renders. Setting the viewport does
                 * not restrict where the Camera can scroll to.
                 */
                height: number;

                /**
                 * The horizontal scroll position of this Camera.
                 * 
                 * Change this value to cause the Camera to scroll around your Scene.
                 * 
                 * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,
                 * will automatically adjust the Camera scroll values accordingly.
                 * 
                 * You can set the bounds within which the Camera can scroll via the `setBounds` method.
                 */
                scrollX: number;

                /**
                 * The vertical scroll position of this Camera.
                 * 
                 * Change this value to cause the Camera to scroll around your Scene.
                 * 
                 * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,
                 * will automatically adjust the Camera scroll values accordingly.
                 * 
                 * You can set the bounds within which the Camera can scroll via the `setBounds` method.
                 */
                scrollY: number;

                /**
                 * The Camera zoom value. Change this value to zoom in, or out of, a Scene.
                 * 
                 * A value of 0.5 would zoom the Camera out, so you can now see twice as much
                 * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel
                 * now takes up 2 pixels when rendered.
                 * 
                 * Set to 1 to return to the default zoom level.
                 * 
                 * Be careful to never set this value to zero.
                 */
                zoom: number;

                /**
                 * The Camera horizontal zoom value. Change this value to zoom in, or out of, a Scene.
                 * 
                 * A value of 0.5 would zoom the Camera out, so you can now see twice as much
                 * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel
                 * now takes up 2 pixels when rendered.
                 * 
                 * Set to 1 to return to the default zoom level.
                 * 
                 * Be careful to never set this value to zero.
                 */
                zoomX: number;

                /**
                 * The Camera vertical zoom value. Change this value to zoom in, or out of, a Scene.
                 * 
                 * A value of 0.5 would zoom the Camera out, so you can now see twice as much
                 * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel
                 * now takes up 2 pixels when rendered.
                 * 
                 * Set to 1 to return to the default zoom level.
                 * 
                 * Be careful to never set this value to zero.
                 */
                zoomY: number;

                /**
                 * The horizontal position of the center of the Camera's viewport, relative to the left of the game canvas.
                 */
                readonly centerX: number;

                /**
                 * The vertical position of the center of the Camera's viewport, relative to the top of the game canvas.
                 */
                readonly centerY: number;

                /**
                 * The displayed width of the camera viewport, factoring in the camera zoom level.
                 * 
                 * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width
                 * would be 1600, as it's displaying twice as many pixels as zoom level 1.
                 * 
                 * Equally, a camera with a width of 800 and zoom of 2 would have a display width
                 * of 400 pixels.
                 */
                readonly displayWidth: number;

                /**
                 * The displayed height of the camera viewport, factoring in the camera zoom level.
                 * 
                 * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height
                 * would be 1200, as it's displaying twice as many pixels as zoom level 1.
                 * 
                 * Equally, a camera with a height of 600 and zoom of 2 would have a display height
                 * of 300 pixels.
                 */
                readonly displayHeight: number;

                /**
                 * Clears the alpha value associated with this Game Object.
                 * 
                 * Immediately sets the alpha back to 1 (fully opaque).undefined
                 * @returns This Game Object instance.
                 */
                clearAlpha(): this;

            }

            /**
             * A Camera provides a view into your game world and is the primary way scenes are rendered in Phaser.
             * Every Scene has at least one Camera (the main camera), and you can add additional cameras via the
             * Camera Manager. Cameras can be scrolled, zoomed, rotated, and fitted with special effects such as
             * fade, flash, shake, pan, and zoom transitions.
             * 
             * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world,
             * and can be positioned, rotated, zoomed and scrolled accordingly.
             * 
             * A Camera consists of two elements: The viewport and the scroll values.
             * 
             * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are
             * created the same size as your game, but their position and size can be set to anything. This means if you
             * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,
             * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`).
             * However, the viewport is limited to being an axis-aligned rectangle, and cannot be rotated.
             * It is more powerful and reliable to use a
             * `RenderTexture` or `DynamicTexture` instead.
             * Point its camera where you want the viewport,
             * set its size, and then draw your game objects to it.
             * 
             * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this
             * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the
             * viewport, and changing the viewport has no impact on the scrolling.
             * 
             * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,
             * allowing you to filter Game Objects out on a per-Camera basis.
             * 
             * A Camera also has built-in special effects including Fade, Flash and Camera Shake.
             * 
             * You can apply full-camera filters.
             * Some filters need off-screen data, such as Blur;
             * use `camera.getPaddingWrapper()` to get a proxy for working with
             * cameras with padding applied.
             */
            class Camera extends Phaser.Cameras.Scene2D.BaseCamera {
                /**
                 * 
                 * @param x The x position of the Camera, relative to the top-left of the game canvas.
                 * @param y The y position of the Camera, relative to the top-left of the game canvas.
                 * @param width The width of the Camera, in pixels.
                 * @param height The height of the Camera, in pixels.
                 */
                constructor(x: number, y: number, width: number, height: number);

                /**
                 * The filters for this camera.
                 * Filters control special effects and masks.
                 * 
                 * This object contains two lists of filters: `internal` and `external`.
                 * See {@link Phaser.GameObjects.Components.FilterList} for more information.
                 */
                filters: Phaser.Types.GameObjects.FiltersInternalExternal;

                /**
                 * Is this Camera for Game Object transform inversion?
                 * This is used by the `Filters` component to cancel out the transform
                 * of the Game Object when rendering the object for filtering.
                 */
                isObjectInversion: boolean;

                /**
                 * Does this Camera allow the Game Objects it renders to receive input events?
                 */
                inputEnabled: boolean;

                /**
                 * The Camera Fade effect handler.
                 * To fade this camera see the `Camera.fade` methods.
                 */
                fadeEffect: Phaser.Cameras.Scene2D.Effects.Fade;

                /**
                 * The Camera Flash effect handler.
                 * To flash this camera see the `Camera.flash` method.
                 */
                flashEffect: Phaser.Cameras.Scene2D.Effects.Flash;

                /**
                 * The Camera Shake effect handler.
                 * To shake this camera see the `Camera.shake` method.
                 */
                shakeEffect: Phaser.Cameras.Scene2D.Effects.Shake;

                /**
                 * The Camera Pan effect handler.
                 * To pan this camera see the `Camera.pan` method.
                 */
                panEffect: Phaser.Cameras.Scene2D.Effects.Pan;

                /**
                 * The Camera Rotate To effect handler.
                 * To rotate this camera see the `Camera.rotateTo` method.
                 */
                rotateToEffect: Phaser.Cameras.Scene2D.Effects.RotateTo;

                /**
                 * The Camera Zoom effect handler.
                 * To zoom this camera see the `Camera.zoomTo` method.
                 */
                zoomEffect: Phaser.Cameras.Scene2D.Effects.Zoom;

                /**
                 * The linear interpolation value to use when following a target.
                 * 
                 * Can also be set via `setLerp` or as part of the `startFollow` call.
                 * 
                 * The default value of 1 means the camera will instantly snap to the target coordinates.
                 * A lower value, such as 0.1 means the camera will more slowly track the target, giving
                 * a smooth transition. You can set the horizontal and vertical values independently, and also
                 * adjust this value in real-time during your game.
                 * 
                 * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis.
                 */
                lerp: Phaser.Math.Vector2;

                /**
                 * The values stored in this property are subtracted from the Camera targets position, allowing you to
                 * offset the camera from the actual target x/y coordinates by this amount.
                 * Can also be set via `setFollowOffset` or as part of the `startFollow` call.
                 */
                followOffset: Phaser.Math.Vector2;

                /**
                 * The Camera dead zone.
                 * 
                 * The deadzone is only used when the camera is following a target.
                 * 
                 * It defines a rectangular region within which if the target is present, the camera will not scroll.
                 * If the target moves outside of this area, the camera will begin scrolling in order to follow it.
                 * 
                 * The `lerp` values that you can set for a follower target also apply when using a deadzone.
                 * 
                 * You can directly set this property to be an instance of a Rectangle. Or, you can use the
                 * `setDeadzone` method for a chainable approach.
                 * 
                 * The rectangle you provide can have its dimensions adjusted dynamically, however, please
                 * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point.
                 * 
                 * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property
                 * to `null`.
                 */
                deadzone: Phaser.Geom.Rectangle | null;

                /**
                 * Sets the Camera dead zone.
                 * 
                 * The deadzone is only used when the camera is following a target.
                 * 
                 * It defines a rectangular region within which if the target is present, the camera will not scroll.
                 * If the target moves outside of this area, the camera will begin scrolling in order to follow it.
                 * 
                 * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point
                 * of the camera. This allows you to use the object for additional game related checks, such as
                 * testing if an object is within it or not via a Rectangle.contains call.
                 * 
                 * The `lerp` values that you can set for a follower target also apply when using a deadzone.
                 * 
                 * Calling this method with no arguments will reset an active deadzone.
                 * @param width The width of the deadzone rectangle in pixels. If not specified the deadzone is removed.
                 * @param height The height of the deadzone rectangle in pixels.
                 * @returns This Camera instance.
                 */
                setDeadzone(width?: number, height?: number): this;

                /**
                 * Fades the Camera in from the given color over the duration specified.
                 * @param duration The duration of the effect in milliseconds. Default 1000.
                 * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0.
                 * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0.
                 * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0.
                 * @param callback This callback will be invoked every frame for the duration of the effect.
                 * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
                 * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                 * @returns This Camera instance.
                 */
                fadeIn(duration?: number, red?: number, green?: number, blue?: number, callback?: Function, context?: any): this;

                /**
                 * Fades the Camera out to the given color over the duration specified.
                 * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades.
                 * @param duration The duration of the effect in milliseconds. Default 1000.
                 * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0.
                 * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0.
                 * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0.
                 * @param callback This callback will be invoked every frame for the duration of the effect.
                 * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
                 * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                 * @returns This Camera instance.
                 */
                fadeOut(duration?: number, red?: number, green?: number, blue?: number, callback?: Function, context?: any): this;

                /**
                 * Fades the Camera from the given color to transparent over the duration specified.
                 * @param duration The duration of the effect in milliseconds. Default 1000.
                 * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0.
                 * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0.
                 * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0.
                 * @param force Force the effect to start immediately, even if already running. Default false.
                 * @param callback This callback will be invoked every frame for the duration of the effect.
                 * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
                 * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                 * @returns This Camera instance.
                 */
                fadeFrom(duration?: number, red?: number, green?: number, blue?: number, force?: boolean, callback?: Function, context?: any): this;

                /**
                 * Fades the Camera from transparent to the given color over the duration specified.
                 * @param duration The duration of the effect in milliseconds. Default 1000.
                 * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0.
                 * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0.
                 * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0.
                 * @param force Force the effect to start immediately, even if already running. Default false.
                 * @param callback This callback will be invoked every frame for the duration of the effect.
                 * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
                 * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                 * @returns This Camera instance.
                 */
                fade(duration?: number, red?: number, green?: number, blue?: number, force?: boolean, callback?: Function, context?: any): this;

                /**
                 * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified.
                 * @param duration The duration of the effect in milliseconds. Default 250.
                 * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 255.
                 * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 255.
                 * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 255.
                 * @param force Force the effect to start immediately, even if already running. Default false.
                 * @param callback This callback will be invoked every frame for the duration of the effect.
                 * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
                 * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                 * @returns This Camera instance.
                 */
                flash(duration?: number, red?: number, green?: number, blue?: number, force?: boolean, callback?: Function, context?: any): this;

                /**
                 * Shakes the Camera by the given intensity over the duration specified.
                 * @param duration The duration of the effect in milliseconds. Default 100.
                 * @param intensity The intensity of the shake. Default 0.05.
                 * @param force Force the shake effect to start immediately, even if already running. Default false.
                 * @param callback This callback will be invoked every frame for the duration of the effect.
                 * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
                 * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                 * @returns This Camera instance.
                 */
                shake(duration?: number, intensity?: number | Phaser.Math.Vector2, force?: boolean, callback?: Function, context?: any): this;

                /**
                 * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,
                 * over the duration and with the ease specified.
                 * @param x The destination x coordinate to scroll the center of the Camera viewport to.
                 * @param y The destination y coordinate to scroll the center of the Camera viewport to.
                 * @param duration The duration of the effect in milliseconds. Default 1000.
                 * @param ease The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'.
                 * @param force Force the pan effect to start immediately, even if already running. Default false.
                 * @param callback This callback will be invoked every frame for the duration of the effect.
                 * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,
                 * the current camera scroll x coordinate and the current camera scroll y coordinate.
                 * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                 * @returns This Camera instance.
                 */
                pan(x: number, y: number, duration?: number, ease?: string | Function, force?: boolean, callback?: Phaser.Types.Cameras.Scene2D.CameraPanCallback, context?: any): this;

                /**
                 * Rotate the Camera to the given angle over the duration and with the ease specified.
                 * @param angle The destination angle in radians to rotate the Camera view to.
                 * @param shortestPath If true, take the shortest distance to the destination. This adjusts the destination angle to be within one half turn of the start angle. Default false.
                 * @param duration The duration of the effect in milliseconds. Default 1000.
                 * @param ease The ease to use. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'.
                 * @param force Force the rotation effect to start immediately, even if already running. Default false.
                 * @param callback This callback will be invoked every frame for the duration of the effect.
                 * It is sent three arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,
                 * and the current camera rotation.
                 * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                 * @returns This Camera instance.
                 */
                rotateTo(angle: number, shortestPath?: boolean, duration?: number, ease?: string | Function, force?: boolean, callback?: Phaser.Types.Cameras.Scene2D.CameraRotateCallback, context?: any): Phaser.Cameras.Scene2D.Camera;

                /**
                 * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.
                 * @param zoom The target Camera zoom value.
                 * @param duration The duration of the effect in milliseconds. Default 1000.
                 * @param ease The ease to use for the zoom. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'.
                 * @param force Force the zoom effect to start immediately, even if already running. Default false.
                 * @param callback This callback will be invoked every frame for the duration of the effect.
                 * It is sent three arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,
                 * and the current camera zoom value.
                 * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                 * @returns This Camera instance.
                 */
                zoomTo(zoom: number, duration?: number, ease?: string | Function, force?: boolean, callback?: Phaser.Types.Cameras.Scene2D.CameraZoomCallback, context?: any): this;

                /**
                 * Updates camera matrix. Also resets any active effects on this Camera (such as shake, flash and fade) and quickly clears them all.
                 */
                preRender(): void;

                /**
                 * Returns the view matrix of the camera. This is used internally.
                 * 
                 * This is `matrix` if the camera is intended to render to a framebuffer,
                 * and `matrixCombined` otherwise.
                 * @param forceComposite If `true`, the view matrix will always be `matrix`. This is typically used when rendering to a framebuffer, so the external matrix is irrelevant. Default false.
                 * @returns The view matrix of the camera.
                 */
                getViewMatrix(forceComposite?: boolean): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Return a proxy for managing camera padding.
                 * 
                 * Camera padding enlarges the camera, adding to each side of the region.
                 * This is useful when you need data from just outside the normal
                 * camera region, e.g. when using a Blur filter.
                 * 
                 * Use the proxy in place of the camera.
                 * It conceals the complicated parts, so you can carry on using the camera
                 * just as before.
                 * You can still use the original camera to see the adjusted values.
                 * 
                 * Padding affects the following properties on the original camera:
                 * 
                 * - Subtracts from `x`, `y`, `scrollX`, `scrollY`.
                 * - Adds double to `width`, height`.
                 * 
                 * Padding increases the rendered region, so it can have a performance cost.
                 * If you don't need the extra data at some time, set padding to 0.
                 * 
                 * You can't use more than one such proxy at a time. If you try,
                 * they fight and nobody wins.
                 * @param padding Initial padding value. Default 0.
                 * @returns The proxy for the camera.
                 */
                getPaddingWrapper(padding?: number): Phaser.Types.Cameras.Scene2D.CameraPaddingWrapper;

                /**
                 * Sets the linear interpolation value to use when following a target.
                 * 
                 * The default values of 1 means the camera will instantly snap to the target coordinates.
                 * A lower value, such as 0.1 means the camera will more slowly track the target, giving
                 * a smooth transition. You can set the horizontal and vertical values independently, and also
                 * adjust this value in real-time during your game.
                 * 
                 * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis.
                 * @param x The horizontal linear interpolation value for the follow target. A value between 0 and 1. Default 1.
                 * @param y The vertical linear interpolation value for the follow target. A value between 0 and 1. Default 1.
                 * @returns This Camera instance.
                 */
                setLerp(x?: number, y?: number): this;

                /**
                 * Sets the horizontal and vertical offset of the camera from its follow target.
                 * The values are subtracted from the targets position during the Cameras update step.
                 * @param x The horizontal offset from the camera follow target.x position. Default 0.
                 * @param y The vertical offset from the camera follow target.y position. Default 0.
                 * @returns This Camera instance.
                 */
                setFollowOffset(x?: number, y?: number): this;

                /**
                 * Sets the Camera to follow a Game Object.
                 * 
                 * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object
                 * in its center.
                 * 
                 * You can set the linear interpolation value used in the follow code.
                 * Use low lerp values (such as 0.1) to automatically smooth the camera motion.
                 * 
                 * If you find you're getting a slight "jitter" effect when following an object it's probably to do with sub-pixel
                 * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to
                 * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom
                 * value on the camera. So be sure to keep the camera zoom to integers.
                 * @param target The target for the Camera to follow.
                 * @param roundPixels Round the camera position to whole integers to avoid sub-pixel rendering? Default false.
                 * @param lerpX A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track. Default 1.
                 * @param lerpY A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track. Default 1.
                 * @param offsetX The horizontal offset from the camera follow target.x position. Default 0.
                 * @param offsetY The vertical offset from the camera follow target.y position. Default 0.
                 * @returns This Camera instance.
                 */
                startFollow(target: Phaser.GameObjects.GameObject | object, roundPixels?: boolean, lerpX?: number, lerpY?: number, offsetX?: number, offsetY?: number): this;

                /**
                 * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`.undefined
                 * @returns This Camera instance.
                 */
                stopFollow(): this;

                /**
                 * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to
                 * remove the fade.undefined
                 * @returns This Camera instance.
                 */
                resetFX(): this;

                /**
                 * Internal method called automatically by the Camera Manager.
                 * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                 * @param delta The delta time, in ms, elapsed since the last frame.
                 */
                protected update(time: number, delta: number): void;

                /**
                 * Destroys this Camera instance. You rarely need to call this directly.
                 * 
                 * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as
                 * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that.
                 */
                destroy(): void;

                /**
                 * Clears the alpha value associated with this Game Object.
                 * 
                 * Immediately sets the alpha back to 1 (fully opaque).undefined
                 * @returns This Game Object instance.
                 */
                clearAlpha(): this;

            }

            /**
             * The Camera Manager is a plugin that belongs to a Scene and is responsible for managing all of the Scene Cameras.
             * 
             * By default you can access the Camera Manager from within a Scene using `this.cameras`, although this can be changed
             * in your game config.
             * 
             * Create new Cameras using the `add` method. Or extend the Camera class with your own addition code and then add
             * the new Camera in using the `addExisting` method.
             * 
             * Cameras provide a view into your game world, and can be positioned, rotated, zoomed and scrolled accordingly.
             * 
             * A Camera consists of two elements: The viewport and the scroll values.
             * 
             * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are
             * created the same size as your game, but their position and size can be set to anything. This means if you
             * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,
             * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`).
             * 
             * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this
             * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the
             * viewport, and changing the viewport has no impact on the scrolling.
             * 
             * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,
             * allowing you to filter Game Objects out on a per-Camera basis. The Camera Manager can manage up to 31 unique
             * 'Game Object ignore capable' Cameras. Any Cameras beyond 31 that you create will all be given a Camera ID of
             * zero, meaning that they cannot be used for Game Object exclusion. This means if you need your Camera to ignore
             * Game Objects, make sure it's one of the first 31 created.
             * 
             * A Camera also has built-in special effects including Fade, Flash, Camera Shake, Pan and Zoom.
             */
            class CameraManager {
                /**
                 * 
                 * @param scene The Scene that owns the Camera Manager plugin.
                 */
                constructor(scene: Phaser.Scene);

                /**
                 * The Scene that owns the Camera Manager plugin.
                 */
                scene: Phaser.Scene;

                /**
                 * A reference to the Scene.Systems handler for the Scene that owns the Camera Manager.
                 */
                systems: Phaser.Scenes.Systems;

                /**
                 * All Cameras created by, or added to, this Camera Manager, will have their `roundPixels`
                 * property set to match this value. By default it is set to match the value set in the
                 * game configuration, but can be changed at any point. Equally, individual cameras can
                 * also be changed as needed.
                 */
                roundPixels: boolean;

                /**
                 * An Array of the Camera objects being managed by this Camera Manager.
                 * The Cameras are updated and rendered in the same order in which they appear in this array.
                 * Do not directly add or remove entries to this array. However, you can move the contents
                 * around the array should you wish to adjust the display order.
                 */
                cameras: Phaser.Cameras.Scene2D.Camera[];

                /**
                 * A handy reference to the 'main' camera. By default this is the first Camera the
                 * Camera Manager creates. You can also set it directly, or use the `makeMain` argument
                 * in the `add` and `addExisting` methods. It allows you to access it from your game:
                 * 
                 * ```javascript
                 * var cam = this.cameras.main;
                 * ```
                 * 
                 * Also see the properties `camera1`, `camera2` and so on.
                 */
                main: Phaser.Cameras.Scene2D.Camera;

                /**
                 * A default un-transformed Camera that doesn't exist on the camera list and doesn't
                 * count towards the total number of cameras being managed. It exists for other
                 * systems, as well as your own code, should they require a basic un-transformed
                 * camera instance from which to calculate a view matrix.
                 */
                default: Phaser.Cameras.Scene2D.Camera;

                /**
                 * Adds a new Camera into the Camera Manager. The Camera Manager can support up to 31 different Cameras.
                 * 
                 * Each Camera has its own viewport, which controls the size of the Camera and its position within the canvas.
                 * 
                 * Use the `Camera.scrollX` and `Camera.scrollY` properties to change where the Camera is looking, or the
                 * Camera methods such as `centerOn`. Cameras also have built in special effects, such as fade, flash, shake,
                 * pan and zoom.
                 * 
                 * By default Cameras are transparent and will render anything that they can see based on their `scrollX`
                 * and `scrollY` values. Game Objects can be set to be ignored by a Camera by using the `Camera.ignore` method.
                 * 
                 * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change
                 * it after creation if required.
                 * 
                 * See the Camera class documentation for more details.
                 * @param x The horizontal position of the Camera viewport. Default 0.
                 * @param y The vertical position of the Camera viewport. Default 0.
                 * @param width The width of the Camera viewport. If not given it'll be the game config size.
                 * @param height The height of the Camera viewport. If not given it'll be the game config size.
                 * @param makeMain Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it. Default false.
                 * @param name The name of the Camera. Default ''.
                 * @returns The newly created Camera.
                 */
                add(x?: number, y?: number, width?: number, height?: number, makeMain?: boolean, name?: string): Phaser.Cameras.Scene2D.Camera;

                /**
                 * Adds an existing Camera into the Camera Manager.
                 * 
                 * The Camera should either be a `Phaser.Cameras.Scene2D.Camera` instance, or a class that extends from it.
                 * 
                 * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change
                 * it after addition if required.
                 * 
                 * The Camera will be assigned an ID, which is used for Game Object exclusion and then added to the
                 * manager. As long as it doesn't already exist in the manager it will be added then returned.
                 * 
                 * If this method returns `null` then the Camera already exists in this Camera Manager.
                 * @param camera The Camera to be added to the Camera Manager.
                 * @param makeMain Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it. Default false.
                 * @returns The Camera that was added to the Camera Manager, or `null` if it couldn't be added.
                 */
                addExisting(camera: Phaser.Cameras.Scene2D.Camera, makeMain?: boolean): Phaser.Cameras.Scene2D.Camera | null;

                /**
                 * Gets the total number of Cameras in this Camera Manager.
                 * 
                 * If the optional `isVisible` argument is set it will only count Cameras that are currently visible.
                 * @param isVisible Set to `true` to only include visible Cameras in the total. Default false.
                 * @returns The total number of Cameras in this Camera Manager.
                 */
                getTotal(isVisible?: boolean): number;

                /**
                 * Populates this Camera Manager based on the given configuration object, or an array of config objects.
                 * 
                 * See the `Phaser.Types.Cameras.Scene2D.CameraConfig` documentation for details of the object structure.
                 * @param config A Camera configuration object, or an array of them, to be added to this Camera Manager.
                 * @returns This Camera Manager instance.
                 */
                fromJSON(config: Phaser.Types.Cameras.Scene2D.CameraConfig | Phaser.Types.Cameras.Scene2D.CameraConfig[]): this;

                /**
                 * Gets a Camera based on its name.
                 * 
                 * Camera names are optional and don't have to be set, so this method is only of any use if you
                 * have given your Cameras unique names.
                 * @param name The name of the Camera.
                 * @returns The first Camera with a name matching the given string, otherwise `null`.
                 */
                getCamera(name: string): Phaser.Cameras.Scene2D.Camera | null;

                /**
                 * Returns an array of all cameras below the given Pointer.
                 * 
                 * The first camera in the array is the top-most camera in the camera list.
                 * @param pointer The Pointer to check against.
                 * @returns An array of cameras below the Pointer.
                 */
                getCamerasBelowPointer(pointer: Phaser.Input.Pointer): Phaser.Cameras.Scene2D.Camera[];

                /**
                 * Removes the given Camera, or an array of Cameras, from this Camera Manager.
                 * 
                 * If found in the Camera Manager it will be immediately removed from the local cameras array.
                 * If also currently the 'main' camera, 'main' will be reset to be camera 0.
                 * 
                 * The removed Cameras are automatically destroyed if the `runDestroy` argument is `true`, which is the default.
                 * If you wish to re-use the cameras then set this to `false`, but know that they will retain their references
                 * and internal data until destroyed or re-added to a Camera Manager.
                 * @param camera The Camera, or an array of Cameras, to be removed from this Camera Manager.
                 * @param runDestroy Automatically call `Camera.destroy` on each Camera removed from this Camera Manager. Default true.
                 * @returns The total number of Cameras removed.
                 */
                remove(camera: Phaser.Cameras.Scene2D.Camera | Phaser.Cameras.Scene2D.Camera[], runDestroy?: boolean): number;

                /**
                 * The internal render method. This is called automatically by the Scene and should not be invoked directly.
                 * 
                 * It will iterate through all local cameras and render them in turn, as long as they're visible and have
                 * an alpha level > 0.
                 * @param renderer The Renderer that will render the children to this camera.
                 * @param displayList The Display List for the Scene.
                 */
                protected render(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer, displayList: Phaser.GameObjects.DisplayList): void;

                /**
                 * Takes an array of Game Objects and a Camera and returns a new array
                 * containing only those Game Objects that pass the `willRender` test
                 * against the given Camera.
                 * @param children An array of Game Objects to be checked against the camera.
                 * @param camera The camera to filter the Game Objects against.
                 * @returns A filtered list of only Game Objects within the Scene that will render against the given Camera.
                 */
                getVisibleChildren(children: Phaser.GameObjects.GameObject[], camera: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.GameObject[];

                /**
                 * Resets this Camera Manager.
                 * 
                 * This will iterate through all current Cameras, destroying them all, then it will reset the
                 * cameras array, reset the ID counter and create 1 new single camera using the default values.undefined
                 * @returns The freshly created main Camera.
                 */
                resetAll(): Phaser.Cameras.Scene2D.Camera;

                /**
                 * The main update loop. Called automatically when the Scene steps.
                 * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                 * @param delta The delta time, in ms, elapsed since the last frame.
                 */
                protected update(time: number, delta: number): void;

                /**
                 * The event handler that manages the `resize` event dispatched by the Scale Manager.
                 * @param gameSize The default Game Size object. This is the un-modified game dimensions.
                 * @param baseSize The base Size object. The game dimensions. The canvas width / height values match this.
                 */
                onResize(gameSize: Phaser.Structs.Size, baseSize: Phaser.Structs.Size): void;

                /**
                 * Resizes all cameras to the given dimensions.
                 * @param width The new width of the camera.
                 * @param height The new height of the camera.
                 */
                resize(width: number, height: number): void;

            }

            namespace Effects {
                /**
                 * A Camera Fade effect.
                 * 
                 * This effect will fade the camera viewport to the given color, over the duration specified.
                 * 
                 * Only the camera viewport is faded. None of the objects it is displaying are impacted, i.e. their colors do
                 * not change.
                 * 
                 * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,
                 * which is invoked each frame for the duration of the effect, if required.
                 */
                class Fade {
                    /**
                     * 
                     * @param camera The camera this effect is acting upon.
                     */
                    constructor(camera: Phaser.Cameras.Scene2D.Camera);

                    /**
                     * The Camera this effect belongs to.
                     */
                    readonly camera: Phaser.Cameras.Scene2D.Camera;

                    /**
                     * Is this effect actively running?
                     */
                    readonly isRunning: boolean;

                    /**
                     * Has this effect finished running?
                     * 
                     * This is different from `isRunning` because it remains set to `true` when the effect is over,
                     * until the effect is either reset or started again.
                     */
                    readonly isComplete: boolean;

                    /**
                     * The direction of the fade.
                     * `true` = fade out (transparent to color), `false` = fade in (color to transparent)
                     */
                    readonly direction: boolean;

                    /**
                     * The duration of the effect, in milliseconds.
                     */
                    readonly duration: number;

                    /**
                     * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.
                     */
                    progress: number;

                    /**
                     * Fades the Camera to or from the given color over the duration specified.
                     * @param direction The direction of the fade. `true` = fade out (transparent to color), `false` = fade in (color to transparent) Default true.
                     * @param duration The duration of the effect in milliseconds. Default 1000.
                     * @param red The amount to fade the red channel towards. A value between 0 and 255. Default 0.
                     * @param green The amount to fade the green channel towards. A value between 0 and 255. Default 0.
                     * @param blue The amount to fade the blue channel towards. A value between 0 and 255. Default 0.
                     * @param force Force the effect to start immediately, even if already running. Default false.
                     * @param callback This callback will be invoked every frame for the duration of the effect.
                     * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
                     * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                     * @returns The Camera on which the effect was started.
                     */
                    start(direction?: boolean, duration?: number, red?: number, green?: number, blue?: number, force?: boolean, callback?: Phaser.Types.Cameras.Scene2D.CameraFadeCallback, context?: any): Phaser.Cameras.Scene2D.Camera;

                    /**
                     * The main update loop for this effect. Called automatically by the Camera.
                     * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                     * @param delta The delta time, in ms, elapsed since the last frame.
                     */
                    update(time: number, delta: number): void;

                    /**
                     * Called internally by the Canvas Renderer.
                     * @param ctx The Canvas context to render to.
                     * @returns `true` if the effect drew to the renderer, otherwise `false`.
                     */
                    postRenderCanvas(ctx: CanvasRenderingContext2D): boolean;

                    /**
                     * Called internally by the WebGL Renderer.undefined
                     * @returns `true` if the effect should draw to the renderer, otherwise `false`.
                     */
                    postRenderWebGL(): boolean;

                    /**
                     * Called internally when the effect completes.
                     */
                    effectComplete(): void;

                    /**
                     * Resets this camera effect.
                     * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.
                     */
                    reset(): void;

                    /**
                     * Destroys this effect, releasing it from the Camera.
                     */
                    destroy(): void;

                }

                /**
                 * A Camera Flash effect.
                 * 
                 * This effect will flash the camera viewport to the given color, over the duration specified.
                 * 
                 * Only the camera viewport is flashed. None of the objects it is displaying are impacted, i.e. their colors do
                 * not change.
                 * 
                 * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,
                 * which is invoked each frame for the duration of the effect, if required.
                 */
                class Flash {
                    /**
                     * 
                     * @param camera The camera this effect is acting upon.
                     */
                    constructor(camera: Phaser.Cameras.Scene2D.Camera);

                    /**
                     * The Camera this effect belongs to.
                     */
                    readonly camera: Phaser.Cameras.Scene2D.Camera;

                    /**
                     * Is this effect actively running?
                     */
                    readonly isRunning: boolean;

                    /**
                     * The duration of the effect, in milliseconds.
                     */
                    readonly duration: number;

                    /**
                     * The value of the alpha channel used during the flash effect.
                     * A value between 0 and 1.
                     */
                    alpha: number;

                    /**
                     * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.
                     */
                    progress: number;

                    /**
                     * Flashes the Camera to or from the given color over the duration specified.
                     * @param duration The duration of the effect in milliseconds. Default 250.
                     * @param red The amount to flash the red channel towards. A value between 0 and 255. Default 255.
                     * @param green The amount to flash the green channel towards. A value between 0 and 255. Default 255.
                     * @param blue The amount to flash the blue channel towards. A value between 0 and 255. Default 255.
                     * @param force Force the effect to start immediately, even if already running. Default false.
                     * @param callback This callback will be invoked every frame for the duration of the effect.
                     * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
                     * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                     * @returns The Camera on which the effect was started.
                     */
                    start(duration?: number, red?: number, green?: number, blue?: number, force?: boolean, callback?: Phaser.Types.Cameras.Scene2D.CameraFlashCallback, context?: any): Phaser.Cameras.Scene2D.Camera;

                    /**
                     * The main update loop for this effect. Called automatically by the Camera.
                     * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                     * @param delta The delta time, in ms, elapsed since the last frame.
                     */
                    update(time: number, delta: number): void;

                    /**
                     * Called internally by the Canvas Renderer.
                     * @param ctx The Canvas context to render to.
                     * @returns `true` if the effect drew to the renderer, otherwise `false`.
                     */
                    postRenderCanvas(ctx: CanvasRenderingContext2D): boolean;

                    /**
                     * Called internally by the WebGL Renderer.undefined
                     * @returns `true` if the effect should draw to the renderer, otherwise `false`.
                     */
                    postRenderWebGL(): boolean;

                    /**
                     * Called internally when the effect completes.
                     */
                    effectComplete(): void;

                    /**
                     * Resets this camera effect.
                     * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.
                     */
                    reset(): void;

                    /**
                     * Destroys this effect, releasing it from the Camera.
                     */
                    destroy(): void;

                }

                /**
                 * A Camera Pan effect.
                 * 
                 * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,
                 * over the duration and with the ease specified.
                 * 
                 * Only the camera scroll is moved. None of the objects it is displaying are impacted, i.e. their positions do
                 * not change.
                 * 
                 * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,
                 * which is invoked each frame for the duration of the effect if required.
                 */
                class Pan {
                    /**
                     * 
                     * @param camera The camera this effect is acting upon.
                     */
                    constructor(camera: Phaser.Cameras.Scene2D.Camera);

                    /**
                     * The Camera this effect belongs to.
                     */
                    readonly camera: Phaser.Cameras.Scene2D.Camera;

                    /**
                     * Is this effect actively running?
                     */
                    readonly isRunning: boolean;

                    /**
                     * The duration of the effect, in milliseconds.
                     */
                    readonly duration: number;

                    /**
                     * The starting scroll coordinates to pan the camera from.
                     */
                    source: Phaser.Math.Vector2;

                    /**
                     * The zoom-adjusted scroll coordinates of the camera, recalculated each frame during the pan
                     * to account for the current camera zoom level. Used as an intermediate value when interpolating
                     * between the source and destination scroll positions.
                     */
                    current: Phaser.Math.Vector2;

                    /**
                     * The destination scroll coordinates to pan the camera to.
                     */
                    destination: Phaser.Math.Vector2;

                    /**
                     * The ease function to use during the pan.
                     */
                    ease: Function;

                    /**
                     * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.
                     */
                    progress: number;

                    /**
                     * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,
                     * over the duration and with the ease specified.
                     * @param x The destination x coordinate to scroll the center of the Camera viewport to.
                     * @param y The destination y coordinate to scroll the center of the Camera viewport to.
                     * @param duration The duration of the effect in milliseconds. Default 1000.
                     * @param ease The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'.
                     * @param force Force the pan effect to start immediately, even if already running. Default false.
                     * @param callback This callback will be invoked every frame for the duration of the effect.
                     * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,
                     * the current camera scroll x coordinate and the current camera scroll y coordinate.
                     * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                     * @returns The Camera on which the effect was started.
                     */
                    start(x: number, y: number, duration?: number, ease?: string | Function, force?: boolean, callback?: Phaser.Types.Cameras.Scene2D.CameraPanCallback, context?: any): Phaser.Cameras.Scene2D.Camera;

                    /**
                     * The main update loop for this effect. Called automatically by the Camera.
                     * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                     * @param delta The delta time, in ms, elapsed since the last frame.
                     */
                    update(time: number, delta: number): void;

                    /**
                     * Called internally when the effect completes.
                     */
                    effectComplete(): void;

                    /**
                     * Resets this camera effect.
                     * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.
                     */
                    reset(): void;

                    /**
                     * Destroys this effect, releasing it from the Camera.
                     */
                    destroy(): void;

                }

                /**
                 * A Camera Rotate effect that smoothly rotates the Camera to a target angle over a specified duration.
                 * 
                 * This effect will rotate the Camera so that its viewport finishes at the given angle in radians,
                 * over the duration and with the ease specified.
                 * 
                 * Camera rotation always takes place based on the Camera viewport. By default, rotation happens
                 * in the center of the viewport. You can adjust this with the `originX` and `originY` properties.
                 * 
                 * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not
                 * rotate the Camera viewport itself, which always remains an axis-aligned rectangle.
                 * 
                 * Only the camera is rotated. None of the objects it is displaying are impacted, i.e. their positions do
                 * not change.
                 * 
                 * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,
                 * which is invoked each frame for the duration of the effect if required.
                 */
                class RotateTo {
                    /**
                     * 
                     * @param camera The camera this effect is acting upon.
                     */
                    constructor(camera: Phaser.Cameras.Scene2D.Camera);

                    /**
                     * The Camera this effect belongs to.
                     */
                    readonly camera: Phaser.Cameras.Scene2D.Camera;

                    /**
                     * Is this effect actively running?
                     */
                    readonly isRunning: boolean;

                    /**
                     * The duration of the effect, in milliseconds.
                     */
                    readonly duration: number;

                    /**
                     * The starting angle to rotate the camera from, in radians.
                     */
                    source: number;

                    /**
                     * The current camera angle during the rotation, in radians.
                     */
                    current: number;

                    /**
                     * The destination angle to rotate the camera to, in radians.
                     */
                    destination: number;

                    /**
                     * The ease function to use during the rotation.
                     */
                    ease: Function;

                    /**
                     * If this effect is running this holds the current progress, a value between 0 (start) and 1 (end).
                     */
                    progress: number;

                    /**
                     * Whether the rotation is progressing in a clockwise (`true`) or counter-clockwise (`false`) direction.
                     */
                    clockwise: boolean;

                    /**
                     * Whether the effect should rotate via the shortest angular path to the destination angle.
                     */
                    shortestPath: boolean;

                    /**
                     * Rotate the Camera to the given angle over the duration and with the ease specified.
                     * @param angle The destination angle in radians to rotate the Camera view to.
                     * @param shortestPath If true, take the shortest distance to the destination. This adjusts the destination angle to be within one half turn of the start angle. Default false.
                     * @param duration The duration of the effect in milliseconds. Default 1000.
                     * @param ease The ease to use. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'.
                     * @param force Force the rotation effect to start immediately, even if already running. Default false.
                     * @param callback This callback will be invoked every frame for the duration of the effect.
                     * It is sent three arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,
                     * and the current camera rotation.
                     * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                     * @returns The Camera on which the effect was started.
                     */
                    start(angle: number, shortestPath?: boolean, duration?: number, ease?: string | Function, force?: boolean, callback?: Phaser.Types.Cameras.Scene2D.CameraRotateCallback, context?: any): Phaser.Cameras.Scene2D.Camera;

                    /**
                     * The main update loop for this effect. Called automatically by the Camera.
                     * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                     * @param delta The delta time, in ms, elapsed since the last frame.
                     */
                    update(time: number, delta: number): void;

                    /**
                     * Called internally when the effect completes.
                     */
                    effectComplete(): void;

                    /**
                     * Resets this camera effect.
                     * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.
                     */
                    reset(): void;

                    /**
                     * Destroys this effect, releasing it from the Camera.
                     */
                    destroy(): void;

                }

                /**
                 * A Camera Shake effect.
                 * 
                 * This effect will shake the camera viewport by a random amount, bounded by the specified intensity, each frame.
                 * 
                 * Only the camera viewport is moved. None of the objects it is displaying are impacted, i.e. their positions do
                 * not change.
                 * 
                 * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,
                 * which is invoked each frame for the duration of the effect if required.
                 */
                class Shake {
                    /**
                     * 
                     * @param camera The camera this effect is acting upon.
                     */
                    constructor(camera: Phaser.Cameras.Scene2D.Camera);

                    /**
                     * The Camera this effect belongs to.
                     */
                    readonly camera: Phaser.Cameras.Scene2D.Camera;

                    /**
                     * Is this effect actively running?
                     */
                    readonly isRunning: boolean;

                    /**
                     * The duration of the effect, in milliseconds.
                     */
                    readonly duration: number;

                    /**
                     * The intensity of the effect. Use small float values. The default when the effect starts is 0.05.
                     * This is a Vector2 object, allowing you to control the shake intensity independently across x and y.
                     * You can modify this value while the effect is active to create more varied shake effects.
                     */
                    intensity: Phaser.Math.Vector2;

                    /**
                     * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.
                     */
                    progress: number;

                    /**
                     * Shakes the Camera by the given intensity over the duration specified.
                     * @param duration The duration of the effect in milliseconds. Default 100.
                     * @param intensity The intensity of the shake. Default 0.05.
                     * @param force Force the shake effect to start immediately, even if already running. Default false.
                     * @param callback This callback will be invoked every frame for the duration of the effect.
                     * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.
                     * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                     * @returns The Camera on which the effect was started.
                     */
                    start(duration?: number, intensity?: number | Phaser.Math.Vector2, force?: boolean, callback?: Phaser.Types.Cameras.Scene2D.CameraShakeCallback, context?: any): Phaser.Cameras.Scene2D.Camera;

                    /**
                     * The pre-render step for this effect. Called automatically by the Camera.
                     */
                    preRender(): void;

                    /**
                     * The main update loop for this effect. Called automatically by the Camera.
                     * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                     * @param delta The delta time, in ms, elapsed since the last frame.
                     */
                    update(time: number, delta: number): void;

                    /**
                     * Called internally when the effect completes.
                     */
                    effectComplete(): void;

                    /**
                     * Resets this camera effect.
                     * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.
                     */
                    reset(): void;

                    /**
                     * Destroys this effect, releasing it from the Camera.
                     */
                    destroy(): void;

                }

                /**
                 * A Camera Zoom effect.
                 * 
                 * This effect smoothly animates a Camera's zoom level from its current value to a target zoom value over a
                 * specified duration. Use it to create cinematic zoom-in or zoom-out transitions, focus the player's
                 * attention on a point of interest, or produce dramatic effects such as a slow zoom during a cutscene.
                 * 
                 * The effect integrates with Phaser's easing system, allowing any of the built-in easing functions (or a
                 * custom one) to control the interpolation curve. It is accessed via `Camera.zoomTo` rather than being
                 * instantiated directly.
                 * 
                 * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,
                 * which is invoked each frame for the duration of the effect if required.
                 */
                class Zoom {
                    /**
                     * 
                     * @param camera The camera this effect is acting upon.
                     */
                    constructor(camera: Phaser.Cameras.Scene2D.Camera);

                    /**
                     * The Camera this effect belongs to.
                     */
                    readonly camera: Phaser.Cameras.Scene2D.Camera;

                    /**
                     * Is this effect actively running?
                     */
                    readonly isRunning: boolean;

                    /**
                     * The duration of the effect, in milliseconds.
                     */
                    readonly duration: number;

                    /**
                     * The starting zoom value.
                     */
                    source: number;

                    /**
                     * The destination zoom value.
                     */
                    destination: number;

                    /**
                     * The ease function to use during the zoom.
                     */
                    ease: Function;

                    /**
                     * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.
                     */
                    progress: number;

                    /**
                     * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.
                     * @param zoom The target Camera zoom value.
                     * @param duration The duration of the effect in milliseconds. Default 1000.
                     * @param ease The ease to use for the Zoom. Can be any of the Phaser Easing constants or a custom function. Default 'Linear'.
                     * @param force Force the zoom effect to start immediately, even if already running. Default false.
                     * @param callback This callback will be invoked every frame for the duration of the effect.
                     * It is sent three arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,
                     * and the current camera zoom value.
                     * @param context The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.
                     * @returns The Camera on which the effect was started.
                     */
                    start(zoom: number, duration?: number, ease?: string | Function, force?: boolean, callback?: Phaser.Types.Cameras.Scene2D.CameraZoomCallback, context?: any): Phaser.Cameras.Scene2D.Camera;

                    /**
                     * The main update loop for this effect. Called automatically by the Camera.
                     * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                     * @param delta The delta time, in ms, elapsed since the last frame.
                     */
                    update(time: number, delta: number): void;

                    /**
                     * Called internally when the effect completes.
                     */
                    effectComplete(): void;

                    /**
                     * Resets this camera effect.
                     * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.
                     */
                    reset(): void;

                    /**
                     * Destroys this effect, releasing it from the Camera.
                     */
                    destroy(): void;

                }

            }

            namespace Events {
                /**
                 * The Destroy Camera Event.
                 * 
                 * This event is dispatched by a Camera instance when it is destroyed by the Camera Manager.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('cameradestroy', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.DESTROY, () => {});
                 * ```
                 */
                const DESTROY: string;

                /**
                 * The Camera Fade In Complete Event.
                 * 
                 * This event is dispatched by a Camera instance when the Fade In Effect completes.
                 * 
                 * Listen to it from a Camera instance using `Camera.on('camerafadeincomplete', listener)`.
                 */
                const FADE_IN_COMPLETE: string;

                /**
                 * The Camera Fade In Start Event.
                 * 
                 * This event is dispatched by a Camera instance when the Fade In Effect starts.
                 * 
                 * Listen to it from a Camera instance using `Camera.on('camerafadeinstart', listener)`.
                 */
                const FADE_IN_START: string;

                /**
                 * The Camera Fade Out Complete Event.
                 * 
                 * This event is dispatched by a Camera instance when the Fade Out Effect completes.
                 * 
                 * Listen to it from a Camera instance using `Camera.on('camerafadeoutcomplete', listener)`.
                 */
                const FADE_OUT_COMPLETE: string;

                /**
                 * The Camera Fade Out Start Event.
                 * 
                 * This event is dispatched by a Camera instance when the Fade Out Effect starts.
                 * 
                 * Listen to it from a Camera instance using `Camera.on('camerafadeoutstart', listener)`.
                 */
                const FADE_OUT_START: string;

                /**
                 * The Camera Flash Complete Event.
                 * 
                 * This event is dispatched by a Camera instance when the Flash Effect completes.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('cameraflashcomplete', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.FLASH_COMPLETE, () => {});
                 * ```
                 */
                const FLASH_COMPLETE: string;

                /**
                 * The Camera Flash Start Event.
                 * 
                 * This event is dispatched by a Camera instance when the Flash Effect starts.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('cameraflashstart', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.FLASH_START, () => {});
                 * ```
                 */
                const FLASH_START: string;

                /**
                 * The Camera Follower Update Event.
                 * 
                 * This event is dispatched by a Camera instance when it is following a
                 * Game Object and the Camera position has been updated as a result of
                 * that following.
                 * 
                 * Listen to it from a Camera instance using: `camera.on('followupdate', listener)`.
                 */
                const FOLLOW_UPDATE: string;

                /**
                 * The Camera Pan Complete Event.
                 * 
                 * This event is dispatched by a Camera instance when the Pan Effect completes.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('camerapancomplete', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.PAN_COMPLETE, () => {});
                 * ```
                 */
                const PAN_COMPLETE: string;

                /**
                 * The Camera Pan Start Event.
                 * 
                 * This event is dispatched by a Camera instance when the Pan Effect starts.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('camerapanstart', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.PAN_START, () => {});
                 * ```
                 */
                const PAN_START: string;

                /**
                 * The Camera Post-Render Event.
                 * 
                 * This event is dispatched by a Camera instance after is has finished rendering.
                 * It is dispatched whether the Camera is rendering to a texture or to the main canvas.
                 * 
                 * Listen to it from a Camera instance using: `camera.on('postrender', listener)`.
                 */
                const POST_RENDER: string;

                /**
                 * The Camera Pre-Render Event.
                 * 
                 * This event is dispatched by a Camera instance when it is about to render.
                 * It is only dispatched if the Camera is rendering to a texture.
                 * 
                 * Listen to it from a Camera instance using: `camera.on('prerender', listener)`.
                 */
                const PRE_RENDER: string;

                /**
                 * The Camera Rotate Complete Event.
                 * 
                 * This event is dispatched by a Camera instance when the Rotate Effect completes.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('camerarotatecomplete', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.ROTATE_COMPLETE, () => {});
                 * ```
                 */
                const ROTATE_COMPLETE: string;

                /**
                 * The Camera Rotate Start Event.
                 * 
                 * This event is dispatched by a Camera instance when the Rotate Effect starts.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('camerarotatestart', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.ROTATE_START, () => {});
                 * ```
                 */
                const ROTATE_START: string;

                /**
                 * The Camera Shake Complete Event.
                 * 
                 * This event is dispatched by a Camera instance when the Shake Effect completes.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('camerashakecomplete', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.SHAKE_COMPLETE, () => {});
                 * ```
                 */
                const SHAKE_COMPLETE: string;

                /**
                 * The Camera Shake Start Event.
                 * 
                 * This event is dispatched by a Camera instance when the Shake Effect starts.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('camerashakestart', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.SHAKE_START, () => {});
                 * ```
                 */
                const SHAKE_START: string;

                /**
                 * The Camera Zoom Complete Event.
                 * 
                 * This event is dispatched by a Camera instance when the Zoom Effect completes.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('camerazoomcomplete', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.ZOOM_COMPLETE, () => {});
                 * ```
                 */
                const ZOOM_COMPLETE: string;

                /**
                 * The Camera Zoom Start Event.
                 * 
                 * This event is dispatched by a Camera instance when the Zoom Effect starts.
                 * 
                 * Listen for it via either of the following:
                 * 
                 * ```js
                 * this.cameras.main.on('camerazoomstart', () => {});
                 * ```
                 * 
                 * or use the constant, to avoid having to remember the correct event string:
                 * 
                 * ```js
                 * this.cameras.main.on(Phaser.Cameras.Scene2D.Events.ZOOM_START, () => {});
                 * ```
                 */
                const ZOOM_START: string;

            }

        }

        namespace Controls {
            /**
             * A Fixed Key Camera Control.
             * 
             * This allows you to control the movement and zoom of a camera using keyboard keys. Unlike
             * the `SmoothedKeyControl`, this control applies movement and zoom changes directly each
             * update tick with no easing or smoothing. The camera responds instantly when a key is
             * pressed and stops instantly when it is released, making it suitable for grid-based or
             * precision camera navigation.
             * 
             * ```javascript
             * var camControl = new FixedKeyControl({
             *     camera: this.cameras.main,
             *     left: cursors.left,
             *     right: cursors.right,
             *     speed: float OR { x: 0, y: 0 }
             * });
             * ```
             * 
             * Movement is precise and has no 'smoothing' applied to it.
             * 
             * You must call the `update` method of this controller every frame.
             */
            class FixedKeyControl {
                /**
                 * 
                 * @param config The Fixed Key Control configuration object.
                 */
                constructor(config: Phaser.Types.Cameras.Controls.FixedKeyControlConfig);

                /**
                 * The Camera that this Control will update.
                 */
                camera: Phaser.Cameras.Scene2D.Camera | null;

                /**
                 * The Key to be pressed that will move the Camera left.
                 */
                left: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will move the Camera right.
                 */
                right: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will move the Camera up.
                 */
                up: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will move the Camera down.
                 */
                down: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will zoom the Camera in.
                 */
                zoomIn: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will zoom the Camera out.
                 */
                zoomOut: Phaser.Input.Keyboard.Key | null;

                /**
                 * The amount by which the camera zoom level is changed on each update tick when the `zoomIn` or `zoomOut` keys are pressed. Unlike the scroll speed, this value is not scaled by delta time.
                 */
                zoomSpeed: number;

                /**
                 * The smallest zoom value the camera will reach when zoomed out.
                 */
                minZoom: number;

                /**
                 * The largest zoom value the camera will reach when zoomed in.
                 */
                maxZoom: number;

                /**
                 * The horizontal speed at which the camera will scroll, in pixels per millisecond.
                 */
                speedX: number;

                /**
                 * The vertical speed at which the camera will scroll, in pixels per millisecond.
                 */
                speedY: number;

                /**
                 * A flag controlling if the Controls will update the Camera or not.
                 */
                active: boolean;

                /**
                 * Starts the Key Control running, providing it has been linked to a camera.undefined
                 * @returns This Key Control instance.
                 */
                start(): this;

                /**
                 * Stops this Key Control from running. Call `start` to start it again.undefined
                 * @returns This Key Control instance.
                 */
                stop(): this;

                /**
                 * Binds this Key Control to a camera.
                 * @param camera The camera to bind this Key Control to.
                 * @returns This Key Control instance.
                 */
                setCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

                /**
                 * Applies the results of pressing the control keys to the Camera.
                 * 
                 * You must call this every step, it is not called automatically.
                 * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
                 */
                update(delta: number): void;

                /**
                 * Destroys this Key Control, nulling its camera and key references to allow for garbage collection.
                 * This Key Control cannot be used again after being destroyed.
                 */
                destroy(): void;

            }

            /**
             * A Smoothed Key Camera Control.
             * 
             * This allows you to control the movement and zoom of a camera using the defined keys.
             * Unlike the Fixed Camera Control you can also provide physics values for acceleration, drag and maxSpeed for smoothing effects.
             * 
             * ```javascript
             * var controlConfig = {
             *     camera: this.cameras.main,
             *     left: cursors.left,
             *     right: cursors.right,
             *     up: cursors.up,
             *     down: cursors.down,
             *     zoomIn: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.Q),
             *     zoomOut: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.E),
             *     zoomSpeed: 0.02,
             *     acceleration: 0.06,
             *     drag: 0.0005,
             *     maxSpeed: 1.0
             * };
             * ```
             * 
             * You must call the `update` method of this controller every frame.
             */
            class SmoothedKeyControl {
                /**
                 * 
                 * @param config The Smoothed Key Control configuration object.
                 */
                constructor(config: Phaser.Types.Cameras.Controls.SmoothedKeyControlConfig);

                /**
                 * The Camera that this Control will update.
                 */
                camera: Phaser.Cameras.Scene2D.Camera | null;

                /**
                 * The Key to be pressed that will move the Camera left.
                 */
                left: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will move the Camera right.
                 */
                right: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will move the Camera up.
                 */
                up: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will move the Camera down.
                 */
                down: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will zoom the Camera in.
                 */
                zoomIn: Phaser.Input.Keyboard.Key | null;

                /**
                 * The Key to be pressed that will zoom the Camera out.
                 */
                zoomOut: Phaser.Input.Keyboard.Key | null;

                /**
                 * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.
                 */
                zoomSpeed: number;

                /**
                 * The smallest zoom value the camera will reach when zoomed out.
                 */
                minZoom: number;

                /**
                 * The largest zoom value the camera will reach when zoomed in.
                 */
                maxZoom: number;

                /**
                 * The horizontal acceleration applied to the camera's movement when a directional key is held down.
                 */
                accelX: number;

                /**
                 * The vertical acceleration applied to the camera's movement when a directional key is held down.
                 */
                accelY: number;

                /**
                 * The horizontal drag applied to the camera when it is moving.
                 */
                dragX: number;

                /**
                 * The vertical drag applied to the camera when it is moving.
                 */
                dragY: number;

                /**
                 * The maximum horizontal speed the camera can reach.
                 */
                maxSpeedX: number;

                /**
                 * The maximum vertical speed the camera can reach.
                 */
                maxSpeedY: number;

                /**
                 * A flag controlling if the Controls will update the Camera or not.
                 */
                active: boolean;

                /**
                 * Starts the Key Control running, providing it has been linked to a camera.undefined
                 * @returns This Key Control instance.
                 */
                start(): this;

                /**
                 * Stops this Key Control from running. Call `start` to start it again.undefined
                 * @returns This Key Control instance.
                 */
                stop(): this;

                /**
                 * Binds this Key Control to a camera.
                 * @param camera The camera to bind this Key Control to.
                 * @returns This Key Control instance.
                 */
                setCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

                /**
                 * Applies the results of pressing the control keys to the Camera.
                 * 
                 * You must call this every step, it is not called automatically.
                 * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
                 */
                update(delta: number): void;

                /**
                 * Destroys this Key Control.
                 */
                destroy(): void;

            }

        }

    }

    /**
     * Phaser Release Version
     */
    const VERSION: string;

    /**
     * Phaser Release Version as displayed in the console.log header URL.
     */
    const LOG_VERSION: string;

    /**
     * This setting will auto-detect if the browser is capable of supporting WebGL.
     * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.
     */
    const AUTO: number;

    /**
     * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports
     * WebGL or not.
     */
    const CANVAS: number;

    /**
     * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is
     * no fallback to Canvas with this setting, so you should trap it and display a suitable
     * message to the user.
     */
    const WEBGL: number;

    /**
     * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still
     * absolutely relies on the DOM being present and available. This mode is meant for unit testing,
     * not for running Phaser on the server, which is something you really shouldn't do.
     */
    const HEADLESS: number;

    /**
     * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead
     * to help you remember what the value is doing in your code.
     */
    const FOREVER: number;

    /**
     * Direction constant representing no direction, or an unset direction. Used in various
     * Phaser systems such as physics and input where a direction value is required but none applies.
     */
    const NONE: number;

    /**
     * Direction constant representing upward movement or orientation. Used in physics,
     * tilemaps, and other Phaser systems that work with cardinal directions.
     */
    const UP: number;

    /**
     * Direction constant representing downward movement or orientation. Used in physics,
     * tilemaps, and other Phaser systems that work with cardinal directions.
     */
    const DOWN: number;

    /**
     * Direction constant representing leftward movement or orientation. Used in physics,
     * tilemaps, and other Phaser systems that work with cardinal directions.
     */
    const LEFT: number;

    /**
     * Direction constant representing rightward movement or orientation. Used in physics,
     * tilemaps, and other Phaser systems that work with cardinal directions.
     */
    const RIGHT: number;

    /**
     * The Phaser.Game instance is the main controller for the entire Phaser game. It is responsible
     * for handling the boot process, parsing the configuration values, creating the renderer,
     * and setting-up all of the global Phaser systems, such as sound and input.
     * Once that is complete it will start the Scene Manager and then begin the main game loop.
     * 
     * You should generally avoid accessing any of the systems created by Game, and instead use those
     * made available to you via the Phaser.Scene Systems class instead.
     */
    class Game {
        /**
         * 
         * @param config The configuration object for your Phaser Game instance.
         */
        constructor(config?: Phaser.Types.Core.GameConfig);

        /**
         * The parsed Game Configuration object.
         * 
         * The values stored within this object are read-only and should not be changed at run-time.
         */
        readonly config: Phaser.Core.Config;

        /**
         * A reference to either the Canvas or WebGL Renderer that this Game is using.
         */
        renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer;

        /**
         * A reference to an HTML Div Element used as the DOM Element Container.
         * 
         * Only set if `createDOMContainer` is `true` in the game config (by default it is `false`) and
         * if you provide a parent element to insert the Phaser Game inside.
         * 
         * See the DOM Element Game Object for more details.
         */
        domContainer: HTMLDivElement;

        /**
         * A reference to the HTML Canvas Element that Phaser uses to render the game.
         * This is created automatically by Phaser unless you provide a `canvas` property
         * in your Game Config.
         */
        canvas: HTMLCanvasElement;

        /**
         * A reference to the Rendering Context belonging to the Canvas Element this game is rendering to.
         * If the game is running under Canvas it will be a 2d Canvas Rendering Context.
         * If the game is running under WebGL it will be a WebGL Rendering Context.
         * This context is created automatically by Phaser unless you provide a `context` property
         * in your Game Config.
         */
        context: CanvasRenderingContext2D | WebGLRenderingContext;

        /**
         * A flag indicating when this Game instance has finished its boot process.
         */
        readonly isBooted: boolean;

        /**
         * A flag indicating if this Game is currently running its game step or not.
         */
        readonly isRunning: boolean;

        /**
         * An Event Emitter which is used to broadcast game-level events from the global systems.
         */
        events: Phaser.Events.EventEmitter;

        /**
         * An instance of the Animation Manager.
         * 
         * The Animation Manager is a global system responsible for managing all animations used within your game.
         */
        anims: Phaser.Animations.AnimationManager;

        /**
         * An instance of the Texture Manager.
         * 
         * The Texture Manager is a global system responsible for managing all textures being used by your game.
         */
        textures: Phaser.Textures.TextureManager;

        /**
         * An instance of the Cache Manager.
         * 
         * The Cache Manager is a global system responsible for caching, accessing and releasing external game assets.
         */
        cache: Phaser.Cache.CacheManager;

        /**
         * An instance of the Data Manager. This is a global manager, available from any Scene
         * and allows you to share and exchange your own game-level data or events without having
         * to use an internal event system.
         */
        registry: Phaser.Data.DataManager;

        /**
         * An instance of the Input Manager.
         * 
         * The Input Manager is a global system responsible for the capture of browser-level input events.
         */
        input: Phaser.Input.InputManager;

        /**
         * An instance of the Scene Manager.
         * 
         * The Scene Manager is a global system responsible for creating, modifying and updating the Scenes in your game.
         */
        scene: Phaser.Scenes.SceneManager;

        /**
         * A reference to the Device inspector.
         * 
         * Contains information about the device running this game, such as OS, browser vendor and feature support.
         * Used by various systems to determine capabilities and code paths.
         */
        device: Phaser.DeviceConf;

        /**
         * An instance of the Scale Manager.
         * 
         * The Scale Manager is a global system responsible for handling scaling of the game canvas.
         */
        scale: Phaser.Scale.ScaleManager;

        /**
         * An instance of the base Sound Manager.
         * 
         * The Sound Manager is a global system responsible for the playback and updating of all audio in your game.
         * 
         * You can disable the inclusion of the Sound Manager in your build by toggling the webpack `FEATURE_SOUND` flag.
         */
        sound: Phaser.Sound.NoAudioSoundManager | Phaser.Sound.HTML5AudioSoundManager | Phaser.Sound.WebAudioSoundManager;

        /**
         * An instance of the Time Step.
         * 
         * The Time Step is a global system responsible for setting-up and responding to the browser frame events, processing
         * them and calculating delta values. It then automatically calls the game step.
         */
        loop: Phaser.Core.TimeStep;

        /**
         * An instance of the Plugin Manager.
         * 
         * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install
         * those plugins into Scenes as required.
         */
        plugins: Phaser.Plugins.PluginManager;

        /**
         * Does the window the game is running in currently have focus or not?
         * This is modified by the VisibilityHandler.
         */
        readonly hasFocus: boolean;

        /**
         * Is the Game currently paused? This will stop everything from updating,
         * except the `TimeStep` and related RequestAnimationFrame or setTimeout.
         * Those will continue stepping, but the core Game step will be skipped.
         */
        isPaused: boolean;

        /**
         * This method is called automatically when the DOM is ready. It is responsible for creating the renderer,
         * displaying the Debug Header, adding the game canvas to the DOM and emitting the 'boot' event.
         * It listens for a 'ready' event from the base systems and once received it will call `Game.start`.
         */
        protected boot(): void;

        /**
         * Called automatically by Game.boot once all of the global systems have finished setting themselves up.
         * By this point the Game is now ready to start the main loop running.
         * It will also enable the Visibility Handler.
         */
        protected start(): void;

        /**
         * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of
         * Request Animation Frame, or Set Timeout on very old browsers.)
         * 
         * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager.
         * 
         * It will then render each Scene in turn, via the Renderer. This process emits `prerender` and `postrender` events.
         * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
         * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
         */
        step(time: number, delta: number): void;

        /**
         * A special version of the Game Step for the HEADLESS renderer only.
         * 
         * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of
         * Request Animation Frame, or Set Timeout on very old browsers.)
         * 
         * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager.
         * 
         * This process emits `prerender` and `postrender` events, even though nothing actually displays.
         * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
         * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
         */
        headlessStep(time: number, delta: number): void;

        /**
         * Called automatically by the Visibility Handler.
         * This will pause the main loop and then emit a pause event.
         */
        protected onHidden(): void;

        /**
         * This will pause the entire game and emit a `PAUSE` event.
         * 
         * All of Phaser's internal systems will be paused and the game will not re-render.
         * 
         * Note that it does not pause any Loader requests that are currently in-flight.
         */
        pause(): void;

        /**
         * Called automatically by the Visibility Handler.
         * This will resume the main loop and then emit a resume event.
         */
        protected onVisible(): void;

        /**
         * This will resume the entire game and emit a `RESUME` event.
         * 
         * All of Phaser's internal systems will be resumed and the game will start rendering again.
         */
        resume(): void;

        /**
         * Called automatically by the Visibility Handler.
         * This will set the main loop into a 'blurred' state, which pauses it.
         */
        protected onBlur(): void;

        /**
         * Called automatically by the Visibility Handler.
         * This will set the main loop into a 'focused' state, which resumes it.
         */
        protected onFocus(): void;

        /**
         * Returns the current game frame.
         * 
         * When the game starts running, the frame is incremented every time Request Animation Frame, or Set Timeout, fires.undefined
         * @returns The current game frame.
         */
        getFrame(): number;

        /**
         * Returns the time that the current game step started at, as based on `performance.now`.undefined
         * @returns The current game timestamp.
         */
        getTime(): number;

        /**
         * Flags this Game instance as needing to be destroyed on the _next frame_, making this an asynchronous operation.
         * 
         * It will wait until the current frame has completed and then call `runDestroy` internally.
         * 
         * If you need to react to the game's eventual destruction, listen for the `DESTROY` event.
         * 
         * If you **do not** need to run Phaser again on the same web page you can set the `noReturn` argument to `true` and it will free up
         * memory being held by the core Phaser plugins. If you do need to create another game instance on the same page, leave this as `false`.
         * @param removeCanvas Set to `true` if you would like the parent canvas element removed from the DOM, or `false` to leave it in place.
         * @param noReturn If `true` all the core Phaser plugins are destroyed. You cannot create another instance of Phaser on the same web page if you do this. Default false.
         */
        destroy(removeCanvas: boolean, noReturn?: boolean): void;

    }

    namespace Core {
        /**
         * The active game configuration settings, parsed from a {@link Phaser.Types.Core.GameConfig} object.
         * This class takes the raw configuration object passed to `new Phaser.Game()` and resolves all
         * values, applying defaults where properties are not specified. The resulting Config instance is
         * read-only and available via `game.config`. It controls fundamental aspects of the game including
         * canvas dimensions, renderer type, physics settings, audio configuration, and plugin loading.
         */
        class Config {
            /**
             * 
             * @param GameConfig The configuration object for your Phaser Game instance.
             */
            constructor(GameConfig?: Phaser.Types.Core.GameConfig);

            /**
             * The width of the underlying canvas, in pixels.
             */
            readonly width: number | string;

            /**
             * The height of the underlying canvas, in pixels.
             */
            readonly height: number | string;

            /**
             * The zoom factor, as used by the Scale Manager.
             */
            readonly zoom: Phaser.Scale.ZoomType | number;

            /**
             * A parent DOM element into which the canvas created by the renderer will be injected.
             */
            readonly parent: any | null;

            /**
             * The scale mode as used by the Scale Manager. The default is zero, which is no scaling.
             */
            readonly scaleMode: Phaser.Scale.ScaleModeType;

            /**
             * Is the Scale Manager allowed to adjust the CSS height property of the parent to be 100%?
             */
            readonly expandParent: boolean;

            /**
             * Automatically round the display and style sizes of the canvas. This can help with performance in lower-powered devices.
             */
            readonly autoRound: boolean;

            /**
             * Automatically center the canvas within the parent?
             */
            readonly autoCenter: Phaser.Scale.CenterType;

            /**
             * How many ms should elapse before checking if the browser size has changed?
             */
            readonly resizeInterval: number;

            /**
             * The DOM element that will be sent into full screen mode, or its `id`. If undefined Phaser will create its own div and insert the canvas into it when entering fullscreen mode.
             */
            readonly fullscreenTarget: HTMLElement | string | null;

            /**
             * The minimum width, in pixels, the canvas will scale down to. A value of zero means no minimum.
             */
            readonly minWidth: number;

            /**
             * The maximum width, in pixels, the canvas will scale up to. A value of zero means no maximum.
             */
            readonly maxWidth: number;

            /**
             * The minimum height, in pixels, the canvas will scale down to. A value of zero means no minimum.
             */
            readonly minHeight: number;

            /**
             * The maximum height, in pixels, the canvas will scale up to. A value of zero means no maximum.
             */
            readonly maxHeight: number;

            /**
             * The horizontal amount to snap the canvas by when the Scale Manager is resizing. A value of zero means no snapping.
             */
            readonly snapWidth: number;

            /**
             * The vertical amount to snap the canvas by when the Scale Manager is resizing. A value of zero means no snapping.
             */
            readonly snapHeight: number;

            /**
             * Force Phaser to use a specific renderer. Can be `CONST.CANVAS`, `CONST.WEBGL`, `CONST.HEADLESS` or `CONST.AUTO` (default)
             */
            readonly renderType: number;

            /**
             * Force Phaser to use your own Canvas element instead of creating one.
             */
            readonly canvas: HTMLCanvasElement | null;

            /**
             * Force Phaser to use your own Canvas context instead of creating one.
             */
            readonly context: CanvasRenderingContext2D | WebGLRenderingContext | null;

            /**
             * Optional CSS attributes to be set on the canvas object created by the renderer.
             */
            readonly canvasStyle: string | null;

            /**
             * Is Phaser running under a custom (non-native web) environment? If so, set this to `true` to skip internal Feature detection. If `true` the `renderType` cannot be left as `AUTO`.
             */
            readonly customEnvironment: boolean;

            /**
             * The default Scene configuration object.
             */
            readonly sceneConfig: object | null;

            /**
             * A seed which the Random Data Generator will use. If not given, a dynamic seed based on the time is used.
             */
            readonly seed: string[];

            /**
             * The title of the game.
             */
            readonly gameTitle: string;

            /**
             * The URL of the game.
             */
            readonly gameURL: string;

            /**
             * The version of the game.
             */
            readonly gameVersion: string;

            /**
             * If `true` the window will automatically be given focus immediately and on any future mousedown event.
             */
            readonly autoFocus: boolean;

            /**
             * `false` or `0` = Use the built-in StableSort (needed for older browsers), `true` or `1` = Rely on ES2019 Array.sort being stable (modern browsers only), or `-1` = Try and determine this automatically based on browser inspection (not guaranteed to work, errs on side of caution).
             */
            readonly stableSort: number | boolean;

            /**
             * Should the game create a div element to act as a DOM Container? Only enable if you're using DOM Element objects. You must provide a parent object if you use this feature.
             */
            readonly domCreateContainer: boolean | null;

            /**
             * The default `pointerEvents` attribute set on the DOM Container.
             */
            readonly domPointerEvents: string | null;

            /**
             * Enable the Keyboard Plugin. This can be disabled in games that don't need keyboard input.
             */
            readonly inputKeyboard: boolean;

            /**
             * The DOM Target to listen for keyboard events on. Defaults to `window` if not specified.
             */
            readonly inputKeyboardEventTarget: any;

            /**
             * `preventDefault` will be called on every non-modified key which has a key code in this array. By default, it is empty.
             */
            readonly inputKeyboardCapture: number[] | null;

            /**
             * Enable the Mouse Plugin. This can be disabled in games that don't need mouse input.
             */
            readonly inputMouse: boolean | object;

            /**
             * The DOM Target to listen for mouse events on. Defaults to the game canvas if not specified.
             */
            readonly inputMouseEventTarget: any | null;

            /**
             * Should `mousedown` DOM events have `preventDefault` called on them?
             */
            readonly inputMousePreventDefaultDown: boolean;

            /**
             * Should `mouseup` DOM events have `preventDefault` called on them?
             */
            readonly inputMousePreventDefaultUp: boolean;

            /**
             * Should `mousemove` DOM events have `preventDefault` called on them?
             */
            readonly inputMousePreventDefaultMove: boolean;

            /**
             * Should `wheel` DOM events have `preventDefault` called on them?
             */
            readonly inputMousePreventDefaultWheel: boolean;

            /**
             * Enable the Touch Plugin. This can be disabled in games that don't need touch input.
             */
            readonly inputTouch: boolean;

            /**
             * The DOM Target to listen for touch events on. Defaults to the game canvas if not specified.
             */
            readonly inputTouchEventTarget: any | null;

            /**
             * Should touch events be captured? I.e. have prevent default called on them.
             */
            readonly inputTouchCapture: boolean;

            /**
             * The number of Pointer objects created by default. In a mouse-only, or non-multi touch game, you can leave this as 1.
             */
            readonly inputActivePointers: number;

            /**
             * The smoothing factor to apply during Pointer movement. See {@link Phaser.Input.Pointer#smoothFactor}.
             */
            readonly inputSmoothFactor: number;

            /**
             * Should Phaser listen for input events on the Window? If you disable this, events like 'POINTER_UP_OUTSIDE' will no longer fire.
             */
            readonly inputWindowEvents: boolean;

            /**
             * Enable the Gamepad Plugin. This can be disabled in games that don't need gamepad input.
             */
            readonly inputGamepad: boolean;

            /**
             * The DOM Target to listen for gamepad events on. Defaults to `window` if not specified.
             */
            readonly inputGamepadEventTarget: any;

            /**
             * Set to `true` to disable the right-click context menu.
             */
            readonly disableContextMenu: boolean;

            /**
             * The Audio Configuration object.
             */
            readonly audio: Phaser.Types.Core.AudioConfig;

            /**
             * Don't write the banner line to the console.log. See `Phaser.Types.Core.BannerConfig` for details of this object.
             */
            readonly hideBanner: boolean;

            /**
             * Omit Phaser's name and version from the banner.
             */
            readonly hidePhaser: boolean;

            /**
             * The color of the banner text.
             */
            readonly bannerTextColor: string;

            /**
             * The background colors of the banner.
             */
            readonly bannerBackgroundColor: string[];

            /**
             * The Frame Rate Configuration object, as parsed by the Timestep class.
             */
            readonly fps: Phaser.Types.Core.FPSConfig;

            /**
             * If iOS or Android detected, automatically restrict WebGL to use 1 texture per batch. This can help performance on some devices.
             */
            readonly autoMobileTextures: boolean;

            /**
             * When set to `true`, WebGL uses linear interpolation to draw scaled or rotated textures, giving a smooth appearance. When set to `false`, WebGL uses nearest-neighbor interpolation, giving a crisper appearance. `false` also disables antialiasing of the game canvas itself, if the browser supports it, when the game canvas is scaled.
             */
            readonly antialias: boolean;

            /**
             * Sets the `antialias` property when the WebGL context is created. Setting this value does not impact any subsequent textures that are created, or the canvas style attributes.
             */
            readonly antialiasGL: boolean;

            /**
             * Sets the mipmap magFilter to be used when creating WebGL textures. Don't set unless you wish to create mipmaps. Set to one of the following: 'NEAREST', 'LINEAR', 'NEAREST_MIPMAP_NEAREST', 'LINEAR_MIPMAP_NEAREST', 'NEAREST_MIPMAP_LINEAR' or 'LINEAR_MIPMAP_LINEAR'.
             */
            readonly mipmapFilter: string;

            /**
             * - Whether to regenerate mipmaps for framebuffers. If this is false, framebuffers will not use mipmaps. If this is true, framebuffers will use the `mipmapFilter` setting, and regenerate mipmaps if redrawn. This affects filters and DynamicTextures. Mipmap generation is expensive (10 microseconds or more per texture), so be careful with this setting.
             */
            readonly mipmapRegeneration: boolean;

            /**
             * When set to `true` it will create a desynchronized context for both 2D and WebGL. See https://developers.google.com/web/updates/2019/05/desynchronized for details.
             */
            readonly desynchronized: boolean;

            /**
             * Draw texture-based Game Objects at only whole-integer positions. Game Objects without textures, like Graphics, ignore this property.
             */
            readonly roundPixels: boolean;

            /**
             * On textured objects with lighting, this enables self-shadowing based on the diffuse map.
             */
            readonly selfShadow: boolean;

            /**
             * Threshold for combining points into a single path in the WebGL renderer for Graphics objects. This can be overridden at the Graphics object level.
             */
            readonly pathDetailThreshold: number;

            /**
             * Prevent pixel art from becoming blurred when scaled. It will remain crisp (tells the WebGL renderer to automatically create textures using a nearest-neighbor filter mode). When enabled, this also sets `antialias` and `antialiasGL` to `false` and `roundPixels` to `true`.
             */
            readonly pixelArt: boolean;

            /**
             * WebGL only. Sets `antialias` to true and `pixelArt` to false. Texture-based Game Objects use special shader setting that preserve blocky pixels, but smooth the edges between the pixels. This is only visible when objects are scaled up; otherwise, `antialias` is simpler.
             */
            readonly smoothPixelArt: boolean;

            /**
             * Whether the game canvas will have a transparent background.
             */
            readonly transparent: boolean;

            /**
             * Whether the game canvas will be cleared between each rendering frame. You can disable this if you have a full-screen background image or game object.
             */
            readonly clearBeforeRender: boolean;

            /**
             * If the value is true the WebGL buffers will not be cleared and will preserve their values until cleared or overwritten by the author.
             */
            readonly preserveDrawingBuffer: boolean;

            /**
             * In WebGL mode, sets the drawing buffer to contain colors with pre-multiplied alpha.
             */
            readonly premultipliedAlpha: boolean;

            /**
             * Avert stuttering during shader compilation, by enabling parallel shader compilation, where supported. Objects which request a shader that is not yet ready will not be drawn. This prevents stutter, but may cause "pop-in" of objects unless you use a pre-touch strategy.
             */
            readonly skipUnreadyShaders: boolean;

            /**
             * Let the browser abort creating a WebGL context if it judges performance would be unacceptable.
             */
            readonly failIfMajorPerformanceCaveat: boolean;

            /**
             * "high-performance", "low-power" or "default". A hint to the browser on how much device power the game might use.
             */
            readonly powerPreference: string;

            /**
             * The default WebGL Batch size. Represents the number of _quads_ that can be added to a single batch.
             */
            readonly batchSize: number;

            /**
             * When in WebGL mode, this sets the maximum number of GPU Textures to use. The default, -1, will use all available units. The WebGL1 spec says all browsers should provide a minimum of 8.
             */
            readonly maxTextures: number;

            /**
             * The maximum number of lights allowed to be visible within range of a single Camera in the LightManager.
             */
            readonly maxLights: number;

            /**
             * A map of custom Render Nodes to be added to the WebGL Renderer. The values will be added to the RenderNodeManager, using the keys as the names.
             */
            readonly renderNodes: {[key: string]: Phaser.Types.Core.RenderNodesConfig};

            /**
             * The background color of the game canvas. The default is black. This value is ignored if `transparent` is set to `true`.
             */
            readonly backgroundColor: Phaser.Display.Color;

            /**
             * Called before Phaser boots. Useful for initializing anything not related to Phaser that Phaser may require while booting.
             */
            readonly preBoot: Phaser.Types.Core.BootCallback;

            /**
             * A function to run at the end of the boot sequence. At this point, all the game systems have started and plugins have been loaded.
             */
            readonly postBoot: Phaser.Types.Core.BootCallback;

            /**
             * The Physics Configuration object.
             */
            readonly physics: Phaser.Types.Core.PhysicsConfig;

            /**
             * The default physics system. It will be started for each scene. Either 'arcade' or 'matter'.
             */
            readonly defaultPhysicsSystem: boolean | string;

            /**
             * A URL used to resolve paths given to the loader. Example: 'http://labs.phaser.io/assets/'.
             */
            readonly loaderBaseURL: string;

            /**
             * A URL path used to resolve relative paths given to the loader. Example: 'images/sprites/'.
             */
            readonly loaderPath: string;

            /**
             * The maximum number of files the Loader will attempt to download in parallel. Defaults to 32, or 6 on Android where parallel connections are more constrained.
             */
            readonly loaderMaxParallelDownloads: number;

            /**
             * 'anonymous', 'use-credentials', or `undefined`. If you're not making cross-origin requests, leave this as `undefined`. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes}.
             */
            readonly loaderCrossOrigin: string | undefined;

            /**
             * The response type of the XHR request, e.g. `blob`, `text`, etc.
             */
            readonly loaderResponseType: string;

            /**
             * Should the XHR request use async or not?
             */
            readonly loaderAsync: boolean;

            /**
             * Optional username for all XHR requests.
             */
            readonly loaderUser: string;

            /**
             * Optional password for all XHR requests.
             */
            readonly loaderPassword: string;

            /**
             * Optional XHR timeout value, in ms.
             */
            readonly loaderTimeout: number;

            /**
             * The number of times to retry a file load if it fails.
             */
            readonly loaderMaxRetries: number;

            /**
             * Optional XHR withCredentials value.
             */
            readonly loaderWithCredentials: boolean;

            /**
             * Optional load type for image, `XHR` is default, or `HTMLImageElement` for a lightweight way.
             */
            readonly loaderImageLoadType: string;

            /**
             * An array of schemes that the Loader considers as being 'local' files. Defaults to: `[ 'file://', 'capacitor://' ]`.
             */
            readonly loaderLocalScheme: string[];

            /**
             * The quality of the Glow filter (defaults to 10)
             */
            readonly glowQuality: number;

            /**
             * The distance of the Glow filter (defaults to 10)
             */
            readonly glowDistance: number;

            /**
             * An array of global plugins to be installed.
             */
            readonly installGlobalPlugins: any;

            /**
             * An array of Scene level plugins to be installed.
             */
            readonly installScenePlugins: any;

            /**
             * The plugins installed into every Scene (in addition to CoreScene and Global).
             */
            readonly defaultPlugins: any;

            /**
             * A base64 encoded PNG that will be used as the default blank texture.
             */
            readonly defaultImage: string;

            /**
             * A base64 encoded PNG that will be used as the default texture when a texture is assigned that is missing or not loaded.
             */
            readonly missingImage: string;

            /**
             * A base64 encoded PNG used as the default solid white texture. This small 4x4 white image is used internally by Phaser for colored Game Objects and tinting.
             */
            readonly whiteImage: string;

        }

        /**
         * Called automatically by Phaser.Game and responsible for creating the renderer it will use.
         * 
         * Inspects the game configuration to determine the appropriate render type (WebGL, Canvas, or Headless),
         * validates that the chosen renderer is supported by the current device, sets up the canvas element
         * (either adopting one provided in the game config or creating a new one from the CanvasPool), applies
         * any canvas CSS styles and pixel art interpolation settings, then instantiates and assigns the renderer
         * to `game.renderer`.
         * 
         * Relies upon two webpack global flags, `WEBGL_RENDERER` and `CANVAS_RENDERER`, which are defined at
         * build time and inlined into the bundle as compile-time constants. They are not available as runtime
         * variables and determine which renderer classes are included in the build.
         * @param game The Phaser.Game instance on which the renderer will be set.
         */
        function CreateRenderer(game: Phaser.Game): void;

        /**
         * Called automatically by Phaser.Game during initialization to output a styled banner to the browser
         * console. The banner displays the Phaser version number, the active renderer (WebGL, Canvas, or
         * Headless), the audio system in use (Web Audio, HTML5 Audio, or No Audio), and optionally the
         * game title, version, and URL as configured. In browsers that support CSS console styling the
         * banner is rendered with the colors defined in the Game Config; in IE it falls back to a plain
         * text log. The banner is skipped entirely when `config.hideBanner` is `true`.
         * 
         * You can customize or disable the header via the Game Config object.
         * @param game The Phaser.Game instance which will output this debug header.
         */
        function DebugHeader(game: Phaser.Game): void;

        /**
         * The core runner class that Phaser uses to handle the game loop. It can use either Request Animation Frame,
         * or SetTimeout, based on browser support and config settings, to create a continuous loop within the browser.
         * 
         * Each time the loop fires, `TimeStep.step` is called and this is then passed onto the core Game update loop,
         * it is the core heartbeat of your game. It will fire as often as Request Animation Frame is capable of handling
         * on the target device.
         * 
         * Note that there are lots of situations where a browser will stop updating your game. Such as if the player
         * switches tabs, or covers up the browser window with another application. In these cases, the 'heartbeat'
         * of your game will pause, and only resume when focus is returned to it by the player. There is no way to avoid
         * this situation, all you can do is use the visibility events the browser, and Phaser, provide to detect when
         * it has happened and then gracefully recover.
         */
        class TimeStep {
            /**
             * 
             * @param game A reference to the Phaser.Game instance that owns this Time Step.
             * @param config The FPS configuration object, as parsed by the Game Config.
             */
            constructor(game: Phaser.Game, config: Phaser.Types.Core.FPSConfig);

            /**
             * A reference to the Phaser.Game instance.
             */
            readonly game: Phaser.Game;

            /**
             * The Request Animation Frame DOM Event handler.
             */
            readonly raf: Phaser.DOM.RequestAnimationFrame;

            /**
             * A flag that is set once the TimeStep has started running and toggled when it stops.
             */
            readonly started: boolean;

            /**
             * A flag that is set once the TimeStep has started running and toggled when it stops.
             * The difference between this value and `started` is that `running` is toggled when
             * the TimeStep is sent to sleep, where-as `started` remains `true`, only changing if
             * the TimeStep is actually stopped, not just paused.
             */
            readonly running: boolean;

            /**
             * The minimum fps rate you want the Time Step to run at.
             * 
             * Setting this cannot guarantee the browser runs at this rate, it merely influences
             * the internal timing values to help the Timestep know when it has gone out of sync.
             */
            minFps: number;

            /**
             * The target fps rate for the Time Step to run at.
             * 
             * Setting this value will not actually change the speed at which the browser runs, that is beyond
             * the control of Phaser. Instead, it allows you to determine performance issues and if the Time Step
             * is spiraling out of control.
             */
            targetFps: number;

            /**
             * Enforce a frame rate limit. This forces how often the Game step will run. By default it is zero,
             * which means it will run at whatever limit the browser (via RequestAnimationFrame) can handle, which
             * is the optimum rate for fast-action or responsive games.
             * 
             * However, if you are building a non-game app, like a graphics generator, or low-intensity game that doesn't
             * require 60fps, then you can lower the step rate via this Game Config value:
             * 
             * ```js
             * fps: {
             *   limit: 30
             * }
             * ```
             * 
             * Setting this _beyond_ the rate of RequestAnimationFrame will make no difference at all.
             * 
             * Use it purely to _restrict_ updates in low-intensity situations only.
             */
            fpsLimit: number;

            /**
             * Is the FPS rate limited?
             * 
             * This is set by setting the Game Config `limit` value to a value above zero.
             * 
             * Consider this property as read-only.
             */
            hasFpsLimit: boolean;

            /**
             * An exponential moving average of the frames per second.
             */
            readonly actualFps: number;

            /**
             * The time at which the next fps rate update will take place.
             * 
             * When an fps update happens, the `framesThisSecond` value is reset.
             */
            readonly nextFpsUpdate: number;

            /**
             * The number of frames processed this second.
             */
            readonly framesThisSecond: number;

            /**
             * A callback to be invoked each time the TimeStep steps.
             */
            callback: Phaser.Types.Core.TimeStepCallback;

            /**
             * You can force the TimeStep to use SetTimeOut instead of Request Animation Frame by setting
             * the `forceSetTimeOut` property to `true` in the Game Configuration object. It cannot be changed at run-time.
             */
            readonly forceSetTimeOut: boolean;

            /**
             * The time, updated each step by adding the elapsed delta time to the previous value.
             * 
             * This differs from the `TimeStep.now` value, which is the high resolution time value
             * as provided by Request Animation Frame.
             */
            time: number;

            /**
             * The time at which the game started running.
             * 
             * This value is adjusted if the game is then paused and resumes.
             */
            startTime: number;

            /**
             * The time of the previous step.
             * 
             * This is typically a high resolution timer value, as provided by Request Animation Frame.
             */
            lastTime: number;

            /**
             * The current frame the game is on. This counter is incremented once every game step, regardless of how much
             * time has passed and is unaffected by delta smoothing.
             */
            readonly frame: number;

            /**
             * Is the browser currently considered in focus by the Page Visibility API?
             * 
             * This value is set in the `blur` method, which is called automatically by the Game instance.
             */
            readonly inFocus: boolean;

            /**
             * The duration of the most recent game pause, if any, in ms.
             */
            readonly pauseDuration: number;

            /**
             * The delta time, in ms, since the last game step. This is a clamped and smoothed average value.
             */
            delta: number;

            /**
             * Internal index of the delta history position.
             */
            deltaIndex: number;

            /**
             * Internal array holding the previous delta values, used for delta smoothing.
             */
            deltaHistory: number[];

            /**
             * The maximum number of delta values that are retained in order to calculate a smoothed moving average.
             * 
             * This can be changed in the Game Config via the `fps.deltaHistory` property. The default is 10.
             */
            deltaSmoothingMax: number;

            /**
             * The number of frames that the cooldown is set to after the browser panics over the FPS rate, usually
             * as a result of switching tabs and regaining focus.
             * 
             * This can be changed in the Game Config via the `fps.panicMax` property. The default is 120.
             */
            panicMax: number;

            /**
             * The actual elapsed time in ms between one update and the next.
             * 
             * Unlike with `delta`, no smoothing, capping, or averaging is applied to this value.
             * So please be careful when using this value in math calculations.
             */
            rawDelta: number;

            /**
             * The time, set at the start of the current step.
             * 
             * This is typically a high resolution timer value, as provided by Request Animation Frame.
             * 
             * This can differ from the `time` value in that it isn't calculated based on the delta value.
             */
            now: number;

            /**
             * Apply smoothing to the delta value used within Phaser's internal calculations?
             * 
             * This can be changed in the Game Config via the `fps.smoothStep` property. The default is `true`.
             * 
             * Smoothing helps settle down the delta values after browser tab switches, or other situations
             * which could cause significant delta spikes or dips. By default it has been enabled in Phaser 3
             * since the first version, but is now exposed under this property (and the corresponding game config
             * `smoothStep` value), to allow you to easily disable it, should you require.
             */
            smoothStep: boolean;

            /**
             * Called by the Game instance when the DOM window.onBlur event triggers.
             */
            blur(): void;

            /**
             * Called by the Game instance when the DOM window.onFocus event triggers.
             */
            focus(): void;

            /**
             * Called when the visibility API says the game is 'hidden' (tab switch out of view, etc)
             */
            pause(): void;

            /**
             * Called when the visibility API says the game is 'visible' again (tab switch back into view, etc)
             */
            resume(): void;

            /**
             * Resets the time, lastTime, fps averages and delta history.
             * Called automatically when a browser sleeps then resumes.
             */
            resetDelta(): void;

            /**
             * Starts the Time Step running, if it is not already doing so.
             * Called automatically by the Game Boot process.
             * @param callback The callback to be invoked each time the Time Step steps.
             */
            start(callback: Phaser.Types.Core.TimeStepCallback): void;

            /**
             * Takes the delta value and smooths it based on the previous frames.
             * 
             * Called automatically as part of the step.
             * @param delta The delta value for this step.
             * @returns The smoothed delta value.
             */
            smoothDelta(delta: number): number;

            /**
             * Update the estimate of the frame rate, `fps`. Every second, the number
             * of frames that occurred in that second are included in an exponential
             * moving average of all frames per second, with an alpha of 0.25. This
             * means that more recent seconds affect the estimated frame rate more than
             * older seconds.
             * 
             * When a browser window is NOT minimized, but is covered up (i.e. you're using
             * another app which has spawned a window over the top of the browser), then it
             * will start to throttle the raf callback time. It waits for a while, and then
             * starts to drop the frame rate at 1 frame per second until it's down to just over 1fps.
             * So if the game was running at 60fps, and the player opens a new window, then
             * after 60 seconds (+ the 'buffer time') it'll be down to 1fps, firing at just 1Hz.
             * 
             * When they make the game visible again, the frame rate is increased at a rate of
             * approx. 8fps, back up to 60fps (or the max it can obtain)
             * 
             * There is no easy way to determine if this drop in frame rate is because the
             * browser is throttling raf, or because the game is struggling with performance
             * because you're asking it to do too much on the device.
             * 
             * Compute the new exponential moving average with an alpha of 0.25.
             * @param time The timestamp passed in from RequestAnimationFrame or setTimeout.
             */
            updateFPS(time: number): void;

            /**
             * The main step method with an fps limiter. This is called each time the browser updates, either by Request Animation Frame,
             * or by Set Timeout. It is responsible for calculating the delta values, frame totals, cool down history and more.
             * You generally should never call this method directly.
             * @param time The timestamp passed in from RequestAnimationFrame or setTimeout.
             */
            stepLimitFPS(time: number): void;

            /**
             * The main step method. This is called each time the browser updates, either by Request Animation Frame,
             * or by Set Timeout. It is responsible for calculating the delta values, frame totals, cool down history and more.
             * You generally should never call this method directly.
             * @param time The timestamp passed in from RequestAnimationFrame or setTimeout.
             */
            step(time: number): void;

            /**
             * Manually advances the TimeStep by one step, using the current timestamp from `window.performance.now`.
             * Calls `TimeStep.stepLimitFPS` if an FPS limit is active, otherwise calls `TimeStep.step`.
             */
            tick(): void;

            /**
             * Sends the TimeStep to sleep, stopping Request Animation Frame (or SetTimeout) and toggling the `running` flag to false.
             */
            sleep(): void;

            /**
             * Wakes-up the TimeStep, restarting Request Animation Frame (or SetTimeout) and toggling the `running` flag to true.
             * The `seamless` argument controls if the wake-up should adjust the start time or not.
             * @param seamless Adjust the startTime based on the lastTime values. Default false.
             */
            wake(seamless?: boolean): void;

            /**
             * Gets the duration which the game has been running, in seconds.undefined
             * @returns The duration in seconds.
             */
            getDuration(): number;

            /**
             * Gets the duration which the game has been running, in ms.undefined
             * @returns The duration in ms.
             */
            getDurationMS(): number;

            /**
             * Stops the TimeStep running.undefined
             * @returns The TimeStep object.
             */
            stop(): this;

            /**
             * Destroys the TimeStep. This will stop Request Animation Frame, stop the step, clear the callbacks and null
             * any objects.
             */
            destroy(): void;

        }

        /**
         * The Visibility Handler is responsible for listening for document-level visibility change events and
         * window blur/focus events, then re-emitting them through the Game's Event Emitter so that the rest of
         * the framework can respond appropriately — for example, pausing the game loop when the player switches
         * tabs or minimizes the browser window, and resuming it when they return.
         * 
         * It listens for the standard `visibilitychange` event where supported, and falls back to vendor-prefixed
         * equivalents (`webkitvisibilitychange`, `mozvisibilitychange`, `msvisibilitychange`) for older browsers.
         * Window-level `blur` and `focus` events are also captured to handle cases where the tab remains visible
         * but the window loses focus.
         * 
         * If the game configuration has `autoFocus` enabled, the handler will also call `window.focus()` during
         * setup to ensure the game captures keyboard input immediately on load.
         * @param game The Game instance this Visibility Handler is working on.
         */
        function VisibilityHandler(game: Phaser.Game): void;

        namespace Events {
            /**
             * The Game Blur Event.
             * 
             * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded
             * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps
             * tab, or if they simply remove focus from the browser to another app.
             */
            const BLUR: string;

            /**
             * The Game Boot Event.
             * 
             * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.
             * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.
             */
            const BOOT: string;

            /**
             * The Game Context Lost Event.
             * 
             * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.
             * 
             * The renderer halts all rendering and cannot resume after this happens.
             */
            const CONTEXT_LOST: string;

            /**
             * The Game Destroy Event.
             * 
             * This event is dispatched when the game instance has been told to destroy itself.
             * Lots of internal systems listen to this event in order to clear themselves out.
             * Custom plugins and game code should also do the same.
             */
            const DESTROY: string;

            /**
             * The Game Focus Event.
             * 
             * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded
             * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.
             */
            const FOCUS: string;

            /**
             * The Game Hidden Event.
             * 
             * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded
             * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.
             * 
             * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which
             * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something
             * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)
             */
            const HIDDEN: string;

            /**
             * The Game Pause Event.
             * 
             * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.
             */
            const PAUSE: string;

            /**
             * The Game Post-Render Event.
             * 
             * This event is dispatched right at the end of the render process.
             * 
             * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.
             * Use it for any last minute post-processing before the next game step begins.
             */
            const POST_RENDER: string;

            /**
             * The Game Post-Step Event.
             * 
             * This event is dispatched after the Scene Manager has updated.
             * Hook into it from plugins or systems that need to do things before the render starts.
             */
            const POST_STEP: string;

            /**
             * The Game Pre-Render Event.
             * 
             * This event is dispatched immediately before any of the Scenes have started to render.
             * 
             * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.
             */
            const PRE_RENDER: string;

            /**
             * The Game Pre-Step Event.
             * 
             * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.
             * Hook into it from plugins or systems that need to update before the Scene Manager does.
             */
            const PRE_STEP: string;

            /**
             * The Game Ready Event.
             * 
             * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,
             * and all local systems are now able to start.
             */
            const READY: string;

            /**
             * The Game Resume Event.
             * 
             * This event is dispatched when the game loop leaves a paused state and resumes running.
             */
            const RESUME: string;

            /**
             * The Game Step Event.
             * 
             * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.
             * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.
             */
            const STEP: string;

            /**
             * This event is dispatched when the Scene Manager has created the System Scene,
             * which other plugins and systems may use to initialize themselves.
             * 
             * This event is dispatched just once by the Game instance.
             */
            const SYSTEM_READY: string;

            /**
             * The Game Visible Event.
             * 
             * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded
             * enters a visible state, previously having been hidden.
             * 
             * Only browsers that support the Visibility API will cause this event to be emitted.
             */
            const VISIBLE: string;

        }

    }

    namespace Curves {
        /**
         * A Cubic Bézier curve is a smooth parametric curve defined by four points: a start point (`p0`),
         * two control points (`p1` and `p2`) that shape the curvature, and an end point (`p3`). The curve
         * passes through `p0` and `p3` but is only pulled toward the control points, allowing you to create
         * a wide variety of smooth, flowing shapes.
         * 
         * Cubic Bézier curves are commonly used in Phaser for defining movement paths, animating objects
         * along arcs, and building complex `Path` objects. You can sample any position along the curve
         * using a normalised `t` value from 0 (start) to 1 (end), or use the inherited helper methods such
         * as `getPoints` and `getSpacedPoints` to obtain evenly distributed coordinates for rendering or
         * movement.
         */
        class CubicBezier extends Phaser.Curves.Curve {
            /**
             * 
             * @param p0 Start point, or an array of point pairs.
             * @param p1 Control Point 1.
             * @param p2 Control Point 2.
             * @param p3 End Point.
             */
            constructor(p0: Phaser.Math.Vector2 | Phaser.Math.Vector2[], p1: Phaser.Math.Vector2, p2: Phaser.Math.Vector2, p3: Phaser.Math.Vector2);

            /**
             * The start point of this curve.
             */
            p0: Phaser.Math.Vector2;

            /**
             * The first control point of this curve.
             */
            p1: Phaser.Math.Vector2;

            /**
             * The second control point of this curve.
             */
            p2: Phaser.Math.Vector2;

            /**
             * The end point of this curve.
             */
            p3: Phaser.Math.Vector2;

            /**
             * Gets the starting point on the curve.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getStartPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Returns the resolution of this curve, which is the number of points used to approximate it when calculating lengths or sampling. For a Cubic Bézier, the resolution is equal to the number of divisions requested.
             * @param divisions The amount of divisions used by this curve.
             * @returns The resolution of the curve.
             */
            getResolution(divisions: number): number;

            /**
             * Calculates the coordinates of the point at the given normalised position (`t`) along this curve using cubic Bézier interpolation.
             * @param t The position along the curve to return. Where 0 is the start and 1 is the end.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getPoint<O extends Phaser.Math.Vector2>(t: number, out?: O): O;

            /**
             * Draws this curve to the specified graphics object.
             * @param graphics The graphics object this curve should be drawn to.
             * @param pointsTotal The number of intermediary points that make up this curve. A higher number of points will result in a smoother curve. Default 32.
             * @returns The graphics object this curve was drawn to. Useful for method chaining.
             */
            draw<G extends Phaser.GameObjects.Graphics>(graphics: G, pointsTotal?: number): G;

            /**
             * Returns a JSON object that describes this curve.undefined
             * @returns The JSON object containing this curve data.
             */
            toJSON(): Phaser.Types.Curves.JSONCurve;

            /**
             * Generates a curve from a JSON object.
             * @param data The JSON object containing this curve data.
             * @returns The curve generated from the JSON object.
             */
            static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.CubicBezier;

        }

        /**
         * A Base Curve class, which all other curve types extend.
         * 
         * A Curve represents a mathematical path through 2D space and provides methods for
         * sampling points, calculating arc lengths, and obtaining tangent vectors along it.
         * Curves are the building blocks of `Phaser.Curves.Path`, which allows Game Objects
         * to follow complex routes through a scene.
         * 
         * This class is not intended to be instantiated directly. Instead, use one of the
         * concrete subclasses in the `Phaser.Curves` namespace, such as `LineCurve`,
         * `QuadraticBezier`, `CubicBezier`, `EllipseCurve`, or `SplineCurve`.
         * 
         * Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)
         */
        class Curve {
            /**
             * 
             * @param type The curve type.
             */
            constructor(type: string);

            /**
             * String based identifier for the type of curve.
             */
            type: string;

            /**
             * The default number of divisions within the curve.
             */
            defaultDivisions: number;

            /**
             * The quantity of arc length divisions within the curve.
             */
            arcLengthDivisions: number;

            /**
             * An array of cached arc length values.
             */
            cacheArcLengths: number[];

            /**
             * Does the data of this curve need updating?
             */
            needsUpdate: boolean;

            /**
             * For a curve on a Path, `false` means the Path will ignore this curve.
             */
            active: boolean;

            /**
             * Draws this curve on the given Graphics object.
             * 
             * The curve is drawn using `Graphics.strokePoints` so will be drawn at whatever the present Graphics stroke color is.
             * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.
             * @param graphics The Graphics instance onto which this curve will be drawn.
             * @param pointsTotal The resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance. Default 32.
             * @returns The Graphics object to which the curve was drawn.
             */
            draw<G extends Phaser.GameObjects.Graphics>(graphics: G, pointsTotal?: number): G;

            /**
             * Returns a Rectangle where the position and dimensions match the bounds of this Curve.
             * 
             * You can control the accuracy of the bounds. The value given is used to work out how many points
             * to plot across the curve. Higher values are more accurate at the cost of calculation speed.
             * @param out The Rectangle to store the bounds in. If falsey a new object will be created.
             * @param accuracy The accuracy of the bounds calculations. Default 16.
             * @returns A Rectangle object holding the bounds of this curve. If `out` was given it will be this object.
             */
            getBounds(out?: Phaser.Geom.Rectangle, accuracy?: number): Phaser.Geom.Rectangle;

            /**
             * Returns an array of points, spaced out X distance pixels apart.
             * The smaller the distance, the larger the array will be.
             * @param distance The distance, in pixels, between each point along the curve.
             * @returns An Array of Vector2 objects.
             */
            getDistancePoints(distance: number): Phaser.Math.Vector2[];

            /**
             * Get a point at the end of the curve.
             * @param out Optional Vector object to store the result in.
             * @returns Vector2 containing the coordinates of the curve's end point.
             */
            getEndPoint(out?: Phaser.Math.Vector2): Phaser.Math.Vector2;

            /**
             * Returns the total arc length of the curve, in pixels. The length is calculated by summing the distances between sampled points along the curve.undefined
             * @returns The total length of the curve.
             */
            getLength(): number;

            /**
             * Get a list of cumulative segment lengths.
             * 
             * These lengths are calculated and cached the first time this method is called.
             * 
             * - [0] 0
             * - [1] The first segment
             * - [2] The first and second segment
             * - ...
             * - [divisions] All segments
             * @param divisions The number of divisions or segments.
             * @returns An array of cumulative lengths.
             */
            getLengths(divisions?: number): number[];

            /**
             * Get a point at a relative position on the curve, by arc length.
             * @param u The relative position, [0..1].
             * @param out A point to store the result in.
             * @returns The point.
             */
            getPointAt<O extends Phaser.Math.Vector2>(u: number, out?: O): O;

            /**
             * Get a sequence of evenly spaced points from the curve.
             * 
             * You can pass `divisions`, `stepRate`, or neither.
             * 
             * The number of divisions will be
             * 
             * 1. `divisions`, if `divisions` > 0; or
             * 2. `this.getLength / stepRate`, if `stepRate` > 0; or
             * 3. `this.defaultDivisions`
             * 
             * `1 + divisions` points will be returned.
             * @param divisions The number of divisions to make.
             * @param stepRate The curve distance between points, implying `divisions`.
             * @param out An optional array to store the points in.
             * @returns An array of Vector2 points from the curve.
             */
            getPoints<O extends Phaser.Math.Vector2[]>(divisions?: number, stepRate?: number, out?: O): O;

            /**
             * Get a random point from the curve.
             * @param out A point object to store the result in.
             * @returns The point.
             */
            getRandomPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Get a sequence of equally spaced points (by arc distance) from the curve.
             * 
             * `1 + divisions` points will be returned.
             * @param divisions The number of divisions to make. Default this.defaultDivisions.
             * @param stepRate Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive.
             * @param out An optional array to store the points in.
             * @returns An array of Vector2 points.
             */
            getSpacedPoints(divisions?: number, stepRate?: number, out?: Phaser.Math.Vector2[]): Phaser.Math.Vector2[];

            /**
             * Get a point at the start of the curve.
             * @param out A point to store the result in.
             * @returns The point.
             */
            getStartPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Get a unit vector tangent at a relative position on the curve.
             * If a subclass does not override this method with an analytic tangent derivation,
             * the tangent is approximated by sampling two points a small delta apart and
             * computing the normalized direction vector between them.
             * @param t The relative position on the curve, [0..1].
             * @param out A vector to store the result in.
             * @returns Vector approximating the tangent line at the point t (delta +/- 0.0001)
             */
            getTangent<O extends Phaser.Math.Vector2>(t: number, out?: O): O;

            /**
             * Get a unit vector tangent at a relative position on the curve, by arc length.
             * @param u The relative position on the curve, [0..1].
             * @param out A vector to store the result in.
             * @returns The tangent vector.
             */
            getTangentAt<O extends Phaser.Math.Vector2>(u: number, out?: O): O;

            /**
             * Given a distance in pixels along the curve, returns the corresponding t parameter value that can be used with `getPoint()` to find the position at that distance. This gives you equidistant points along the curve.
             * @param distance The distance, in pixels.
             * @param divisions Optional amount of divisions.
             * @returns The t value (between 0 and 1) at the given distance along the curve.
             */
            getTFromDistance(distance: number, divisions?: number): number;

            /**
             * Maps a uniform parameter u (0 to 1, distributed evenly by arc length) to the raw curve parameter t. This mapping ensures that points sampled at regular intervals of u will be equidistant along the curve, unlike the raw t parameter which may produce uneven spacing.
             * @param u A float between 0 and 1.
             * @param distance The distance, in pixels.
             * @param divisions Optional amount of divisions.
             * @returns The equidistant value.
             */
            getUtoTmapping(u: number, distance: number, divisions?: number): number;

            /**
             * Calculate and cache the arc lengths.
             */
            updateArcLengths(): void;

        }

        /**
         * An Ellipse Curve is a smooth curve that describes the path of an ellipse. It can be used
         * to move Game Objects along an elliptical path, generate points distributed around an ellipse,
         * or draw elliptical arcs as part of a Path or Graphics object.
         * 
         * You can control the center position, horizontal and vertical radii, start and end angles,
         * rotation, and whether the curve runs clockwise or anti-clockwise. Passing only `xRadius`
         * will create a circle (both radii are equal by default).
         * 
         * This curve extends the base `Phaser.Curves.Curve` class and can be used anywhere a Curve
         * is accepted in Phaser, such as `Phaser.Curves.Path` or a `PathFollower` Game Object.
         * 
         * See https://en.wikipedia.org/wiki/Ellipse for more details.
         */
        class Ellipse extends Phaser.Curves.Curve {
            /**
             * 
             * @param x The x coordinate of the ellipse, or an Ellipse Curve configuration object. Default 0.
             * @param y The y coordinate of the ellipse. Default 0.
             * @param xRadius The horizontal radius of ellipse. Default 0.
             * @param yRadius The vertical radius of ellipse. Default 0.
             * @param startAngle The start angle of the ellipse, in degrees. Default 0.
             * @param endAngle The end angle of the ellipse, in degrees. Default 360.
             * @param clockwise Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`). Default false.
             * @param rotation The rotation of the ellipse, in degrees. Default 0.
             */
            constructor(x?: number | Phaser.Types.Curves.EllipseCurveConfig, y?: number, xRadius?: number, yRadius?: number, startAngle?: number, endAngle?: number, clockwise?: boolean, rotation?: number);

            /**
             * The center point of the ellipse. Used for calculating rotation.
             */
            p0: Phaser.Math.Vector2;

            /**
             * Gets the starting point on the curve.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getStartPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Returns the resolution of this curve, which is the number of points used to approximate it. For an Ellipse, this is double the requested divisions to provide accurate arc length calculations.
             * @param divisions Optional divisions value.
             * @returns The curve resolution.
             */
            getResolution(divisions: number): number;

            /**
             * Returns the point on this curve at the given normalized position `t`, where 0 is the start and 1 is the end. The result accounts for the start angle, end angle, clockwise direction, and rotation of the ellipse.
             * @param t The position along the curve to return. Where 0 is the start and 1 is the end.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getPoint<O extends Phaser.Math.Vector2>(t: number, out?: O): O;

            /**
             * Sets the horizontal radius of this curve.
             * @param value The horizontal radius of this curve.
             * @returns This curve object.
             */
            setXRadius(value: number): this;

            /**
             * Sets the vertical radius of this curve.
             * @param value The vertical radius of this curve.
             * @returns This curve object.
             */
            setYRadius(value: number): this;

            /**
             * Sets the width of this curve. The horizontal radius (`xRadius`) is set to half the given value.
             * @param value The width of this curve.
             * @returns This curve object.
             */
            setWidth(value: number): this;

            /**
             * Sets the height of this curve. The vertical radius (`yRadius`) is set to half the given value.
             * @param value The height of this curve.
             * @returns This curve object.
             */
            setHeight(value: number): this;

            /**
             * Sets the start angle of this curve.
             * @param value The start angle of this curve, in degrees.
             * @returns This curve object.
             */
            setStartAngle(value: number): this;

            /**
             * Sets the end angle of this curve.
             * @param value The end angle of this curve, in degrees.
             * @returns This curve object.
             */
            setEndAngle(value: number): this;

            /**
             * Sets if this curve extends clockwise or anti-clockwise.
             * @param value The clockwise state of this curve.
             * @returns This curve object.
             */
            setClockwise(value: boolean): this;

            /**
             * Sets the rotation of this curve.
             * @param value The rotation of this curve, in radians.
             * @returns This curve object.
             */
            setRotation(value: number): this;

            /**
             * The x coordinate of the center of the ellipse.
             */
            x: number;

            /**
             * The y coordinate of the center of the ellipse.
             */
            y: number;

            /**
             * The horizontal radius of the ellipse.
             */
            xRadius: number;

            /**
             * The vertical radius of the ellipse.
             */
            yRadius: number;

            /**
             * The start angle of the ellipse in degrees.
             */
            startAngle: number;

            /**
             * The end angle of the ellipse in degrees.
             */
            endAngle: number;

            /**
             * `true` if the ellipse rotation is clockwise or `false` if anti-clockwise.
             */
            clockwise: boolean;

            /**
             * The rotation of the ellipse, relative to the center, in degrees.
             */
            angle: number;

            /**
             * The rotation of the ellipse, relative to the center, in radians.
             */
            rotation: number;

            /**
             * JSON serialization of the curve.undefined
             * @returns The JSON object containing this curve data.
             */
            toJSON(): Phaser.Types.Curves.JSONEllipseCurve;

            /**
             * Creates a curve from the provided Ellipse Curve Configuration object.
             * @param data The JSON object containing this curve data.
             * @returns The ellipse curve constructed from the configuration object.
             */
            static fromJSON(data: Phaser.Types.Curves.JSONEllipseCurve): Phaser.Curves.Ellipse;

        }

        /**
         * A LineCurve is a straight line segment defined by exactly two endpoints. Despite being called a
         * "curve", it implements the full `Phaser.Curves.Curve` interface, meaning it can be used anywhere
         * a curve is expected — for example, as part of a `Phaser.Curves.Path` or as a motion path for a
         * Tween. Because the line is perfectly straight, arc length calculations are exact and efficient,
         * making LineCurve the most performant curve type. You can construct one from two `Vector2` points
         * or from a flat array of four numbers `[x0, y0, x1, y1]`.
         */
        class Line extends Phaser.Curves.Curve {
            /**
             * 
             * @param p0 The first endpoint.
             * @param p1 The second endpoint.
             */
            constructor(p0: Phaser.Math.Vector2 | number[], p1?: Phaser.Math.Vector2);

            /**
             * The first endpoint.
             */
            p0: Phaser.Math.Vector2;

            /**
             * The second endpoint.
             */
            p1: Phaser.Math.Vector2;

            /**
             * The quantity of arc length divisions within the curve.
             */
            arcLengthDivisions: number;

            /**
             * Returns a Rectangle where the position and dimensions match the bounds of this Curve.
             * @param out A Rectangle object to store the bounds in. If not given a new Rectangle will be created.
             * @returns A Rectangle object holding the bounds of this curve. If `out` was given it will be this object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(out?: O): O;

            /**
             * Gets the starting point on the curve.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getStartPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Returns the resolution of this curve. For a LineCurve the resolution is equal to the number of divisions requested, defaulting to 1 if none are provided.
             * @param divisions The number of divisions to consider. Default 1.
             * @returns The resolution. Equal to the number of divisions.
             */
            getResolution(divisions?: number): number;

            /**
             * Gets a point at a relative position along the line, where 0 is the start point and 1 is the end point.
             * @param t The position along the curve to return. Where 0 is the start and 1 is the end.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getPoint<O extends Phaser.Math.Vector2>(t: number, out?: O): O;

            /**
             * Gets a point at a given position on the line.
             * @param u The position along the curve to return. Where 0 is the start and 1 is the end.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getPointAt<O extends Phaser.Math.Vector2>(u: number, out?: O): O;

            /**
             * Gets the slope of the line as a unit vector.
             * @param t The relative position on the line, [0..1].
             * @param out A vector to store the result in.
             * @returns The tangent vector.
             */
            getTangent<O extends Phaser.Math.Vector2>(t?: number, out?: O): O;

            /**
             * Converts a distance-based position along the line into a normalized `t` value in the range 0 to 1.
             * If a `distance` is provided, the returned `t` represents that distance clamped to the line's total length.
             * If no distance is given, `u` is returned directly. This override exists because a straight line has
             * uniform arc length, so no iterative re-parameterization is needed.
             * @param u A float between 0 and 1.
             * @param distance The distance, in pixels.
             * @param divisions Optional amount of divisions.
             * @returns The equidistant value.
             */
            getUtoTmapping(u: number, distance: number, divisions?: number): number;

            /**
             * Draws this curve on the given Graphics object.
             * 
             * The curve is drawn using `Graphics.lineBetween` so will be drawn at whatever the present Graphics line color is.
             * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.
             * @param graphics The Graphics instance onto which this curve will be drawn.
             * @returns The Graphics object to which the curve was drawn.
             */
            draw<G extends Phaser.GameObjects.Graphics>(graphics: G): G;

            /**
             * Gets a JSON representation of the line.undefined
             * @returns The JSON object containing this curve data.
             */
            toJSON(): Phaser.Types.Curves.JSONCurve;

            /**
             * Configures this line from a JSON representation.
             * @param data The JSON object containing this curve data.
             * @returns A new LineCurve object.
             */
            static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.Line;

        }

        /**
         * A quadratic Bézier curve constructed from three points: a start point, a single control
         * point, and an end point. This is a second-degree Bézier curve, where the control point
         * influences the curvature of the path between the start and end points.
         */
        class QuadraticBezier extends Phaser.Curves.Curve {
            /**
             * 
             * @param p0 Start point, or an array of point pairs.
             * @param p1 Control Point 1.
             * @param p2 The end point of the curve.
             */
            constructor(p0: Phaser.Math.Vector2 | number[], p1: Phaser.Math.Vector2, p2: Phaser.Math.Vector2);

            /**
             * The start point.
             */
            p0: Phaser.Math.Vector2;

            /**
             * The first control point.
             */
            p1: Phaser.Math.Vector2;

            /**
             * The end point of the curve.
             */
            p2: Phaser.Math.Vector2;

            /**
             * Gets the starting point on the curve.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getStartPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Returns the resolution of this curve. For a Quadratic Bezier, the resolution is equal to the number of divisions requested.
             * @param divisions Optional divisions value.
             * @returns The curve resolution.
             */
            getResolution(divisions: number): number;

            /**
             * Get point at relative position in curve according to length.
             * @param t The position along the curve to return. Where 0 is the start and 1 is the end.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getPoint<O extends Phaser.Math.Vector2>(t: number, out?: O): O;

            /**
             * Draws this curve on the given Graphics object.
             * 
             * The curve is drawn using `Graphics.strokePoints` so will be drawn at whatever the present Graphics stroke color is.
             * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.
             * @param graphics `Graphics` object to draw onto.
             * @param pointsTotal Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing. Default 32.
             * @returns `Graphics` object that was drawn to.
             */
            draw<G extends Phaser.GameObjects.Graphics>(graphics: G, pointsTotal?: number): G;

            /**
             * Converts the curve into a JSON compatible object.undefined
             * @returns The JSON object containing this curve data.
             */
            toJSON(): Phaser.Types.Curves.JSONCurve;

            /**
             * Creates a curve from a JSON object, e.g. created by `toJSON`.
             * @param data The JSON object containing this curve data.
             * @returns The created curve instance.
             */
            static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.QuadraticBezier;

        }

        /**
         * A Spline Curve is a smooth curve that passes through a series of control points, using Catmull-Rom
         * interpolation to produce a natural-looking path. Unlike a Bezier curve, every control point is
         * visited exactly, making it easy to define a precise route for objects to follow.
         * 
         * Use a Spline Curve when you need a smooth path through multiple waypoints, such as a camera
         * dolly track, a projectile flight path, or a patrol route for a game character. Points can be
         * added at construction time or incrementally via `addPoint` and `addPoints`.
         */
        class Spline extends Phaser.Curves.Curve {
            /**
             * 
             * @param points The points that configure the curve.
             */
            constructor(points?: Phaser.Math.Vector2[] | number[] | number[][]);

            /**
             * The Vector2 points that configure the curve.
             */
            points: Phaser.Math.Vector2[];

            /**
             * Add a list of points to the current list of Vector2 points of the curve.
             * @param points The points to add. Accepts an array of `Vector2` objects, a flat array of interleaved `x, y` number pairs, or an array of two-element `[x, y]` number arrays.
             * @returns This curve object.
             */
            addPoints(points: Phaser.Math.Vector2[] | number[] | number[][]): this;

            /**
             * Add a point to the current list of Vector2 points of the curve.
             * @param x The x coordinate of the point to add.
             * @param y The y coordinate of the point to add.
             * @returns The new Vector2 added to the curve
             */
            addPoint(x: number, y: number): Phaser.Math.Vector2;

            /**
             * Gets the starting point on the curve.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getStartPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Returns the resolution of this curve, which is the number of points used to approximate it per segment. For a Spline, this scales with the number of points and the requested divisions.
             * @param divisions The number of divisions per segment used when approximating the curve.
             * @returns The curve resolution.
             */
            getResolution(divisions: number): number;

            /**
             * Get point at relative position in curve according to length.
             * @param t The position along the curve to return. Where 0 is the start and 1 is the end.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getPoint<O extends Phaser.Math.Vector2>(t: number, out?: O): O;

            /**
             * Exports a JSON object containing this curve data.undefined
             * @returns The JSON object containing this curve data.
             */
            toJSON(): Phaser.Types.Curves.JSONCurve;

            /**
             * Imports a JSON object containing this curve data.
             * @param data The JSON object containing this curve data.
             * @returns The spline curve created.
             */
            static fromJSON(data: Phaser.Types.Curves.JSONCurve): Phaser.Curves.Spline;

        }

        /**
         * A MoveTo Curve is a special curve type consisting of a single point. Unlike other curve types,
         * it does not draw anything — it simply repositions the current endpoint of a `Path`, analogous
         * to the SVG `moveto` command. Use it within a `Phaser.Curves.Path` to create a gap between
         * two sub-paths, or to begin drawing from a new position without connecting to the previous curve.
         */
        class MoveTo {
            /**
             * 
             * @param x `x` pixel coordinate. Default 0.
             * @param y `y` pixel coordinate. Default 0.
             */
            constructor(x?: number, y?: number);

            /**
             * A flag indicating that this curve is inactive and does not contribute to the bounds, length, or rendering of its parent Path. It is always `false` for a MoveTo, which marks it as a positional marker rather than a drawable segment.
             */
            active: boolean;

            /**
             * The lone point which this curve consists of.
             */
            p0: Phaser.Math.Vector2;

            /**
             * Returns the single point that this MoveTo curve represents. Because a MoveTo has only one point, the value of `t` is ignored and `p0` is always returned.
             * @param t The position along the curve to return. Where 0 is the start and 1 is the end.
             * @param out A Vector2 object to store the result in. If not given will be created.
             * @returns The coordinates of the point on the curve. If an `out` object was given this will be returned.
             */
            getPoint<O extends Phaser.Math.Vector2>(t: number, out?: O): O;

            /**
             * Retrieves the point at given position in the curve. This will always return this curve's only point.
             * @param u The position in the path to retrieve, between 0 and 1. Not used.
             * @param out An optional vector in which to store the point.
             * @returns The modified `out` vector, or a new `Vector2` if none was provided.
             */
            getPointAt<O extends Phaser.Math.Vector2>(u: number, out?: O): O;

            /**
             * Gets the resolution of this curve.undefined
             * @returns The resolution of this curve. For a MoveTo the value is always 1.
             */
            getResolution(): number;

            /**
             * Gets the length of this curve.undefined
             * @returns The length of this curve. For a MoveTo the value is always 0.
             */
            getLength(): number;

            /**
             * Converts this curve into a JSON-serializable object.undefined
             * @returns A primitive object with the curve's type and only point.
             */
            toJSON(): Phaser.Types.Curves.JSONCurve;

        }

        /**
         * A Path combines multiple Curves into one continuous compound curve. It can contain any number of
         * Curves of any type, including Line, Bezier, Ellipse, and Spline Curves. Paths are commonly used
         * in Phaser to define routes for Game Objects to follow, either via the PathFollower component or
         * by sampling points along the Path to drive a Tween or custom movement logic.
         * 
         * A Curve in a Path does not have to start where the previous Curve ends - that is to say, a Path does not
         * have to be an uninterrupted curve. Only the order of the Curves influences the actual points on the Path.
         */
        class Path {
            /**
             * 
             * @param x The X coordinate of the Path's starting point or a {@link Phaser.Types.Curves.JSONPath}. Default 0.
             * @param y The Y coordinate of the Path's starting point. Default 0.
             */
            constructor(x?: number, y?: number);

            /**
             * The name of this Path.
             * Empty by default and never populated by Phaser, this is left for developers to use.
             */
            name: string;

            /**
             * The default number of divisions within a curve.
             */
            defaultDivisions: number;

            /**
             * The list of Curves which make up this Path.
             */
            curves: Phaser.Curves.Curve[];

            /**
             * The cached length of each Curve in the Path.
             * 
             * Used internally by {@link #getCurveLengths}.
             */
            cacheLengths: number[];

            /**
             * Automatically closes the path.
             */
            autoClose: boolean;

            /**
             * The starting point of the Path.
             * 
             * This is not necessarily equivalent to the starting point of the first Curve in the Path. In an empty Path, it's also treated as the ending point.
             */
            startPoint: Phaser.Math.Vector2;

            /**
             * Appends a Curve to the end of the Path.
             * 
             * The Curve does not have to start where the Path ends or, for an empty Path, at its defined starting point.
             * @param curve The Curve to append.
             * @returns This Path object.
             */
            add(curve: Phaser.Curves.Curve): this;

            /**
             * Creates a circular Ellipse Curve positioned at the end of the Path.
             * @param radius The radius of the circle.
             * @param clockwise `true` to create a clockwise circle as opposed to a counter-clockwise circle. Default false.
             * @param rotation The rotation of the circle in degrees. Default 0.
             * @returns This Path object.
             */
            circleTo(radius: number, clockwise?: boolean, rotation?: number): this;

            /**
             * Ensures that the Path is closed.
             * 
             * A closed Path starts and ends at the same point. If the Path is not closed, a straight Line Curve will be created from the ending point directly to the starting point. During the check, the actual starting point of the Path, i.e. the starting point of the first Curve, will be used as opposed to the Path's defined {@link startPoint}, which could differ.
             * 
             * Calling this method on an empty Path will result in an error.undefined
             * @returns This Path object.
             */
            closePath(): this;

            /**
             * Creates a cubic bezier curve starting at the previous end point and ending at p3, using p1 and p2 as control points.
             * @param x The x coordinate of the end point. Or, if a Vector2, the p1 value.
             * @param y The y coordinate of the end point. Or, if a Vector2, the p2 value.
             * @param control1X The x coordinate of the first control point. Or, if a Vector2, the p3 value.
             * @param control1Y The y coordinate of the first control point. Not used if Vector2s are provided as the first 3 arguments.
             * @param control2X The x coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments.
             * @param control2Y The y coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments.
             * @returns This Path object.
             */
            cubicBezierTo(x: number | Phaser.Math.Vector2, y: number | Phaser.Math.Vector2, control1X: number | Phaser.Math.Vector2, control1Y?: number, control2X?: number, control2Y?: number): this;

            /**
             * Creates a Quadratic Bezier Curve starting at the ending point of the Path.
             * @param x The X coordinate of the second control point or, if it's a `Vector2`, the first control point.
             * @param y The Y coordinate of the second control point or, if `x` is a `Vector2`, the second control point.
             * @param controlX If `x` is not a `Vector2`, the X coordinate of the first control point.
             * @param controlY If `x` is not a `Vector2`, the Y coordinate of the first control point.
             * @returns This Path object.
             */
            quadraticBezierTo(x: number | Phaser.Math.Vector2[], y?: number, controlX?: number, controlY?: number): this;

            /**
             * Draws all Curves in the Path to a Graphics Game Object.
             * @param graphics The Graphics Game Object to draw to.
             * @param pointsTotal The number of points to draw for each Curve. Higher numbers result in a smoother curve but require more processing. Default 32.
             * @returns The Graphics object which was drawn to.
             */
            draw<G extends Phaser.GameObjects.Graphics>(graphics: Phaser.GameObjects.Graphics, pointsTotal?: number): G;

            /**
             * Creates an ellipse curve positioned at the previous end point, using the given parameters.
             * @param xRadius The horizontal radius of ellipse. Default 0.
             * @param yRadius The vertical radius of ellipse. Default 0.
             * @param startAngle The start angle of the ellipse, in degrees. Default 0.
             * @param endAngle The end angle of the ellipse, in degrees. Default 360.
             * @param clockwise Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`). Default false.
             * @param rotation The rotation of the ellipse, in degrees. Default 0.
             * @returns This Path object.
             */
            ellipseTo(xRadius?: number, yRadius?: number, startAngle?: number, endAngle?: number, clockwise?: boolean, rotation?: number): this;

            /**
             * Creates a Path from a Path Configuration object.
             * 
             * The provided object should be a {@link Phaser.Types.Curves.JSONPath}, as returned by {@link #toJSON}. Providing a malformed object may cause errors.
             * @param data The JSON object containing the Path data.
             * @returns This Path object.
             */
            fromJSON(data: Phaser.Types.Curves.JSONPath): this;

            /**
             * Returns a Rectangle with a position and size matching the bounds of this Path.
             * @param out The Rectangle to store the bounds in.
             * @param accuracy The accuracy of the bounds calculations. Higher values are more accurate at the cost of calculation speed. Default 16.
             * @returns The modified `out` Rectangle, or a new Rectangle if none was provided.
             */
            getBounds<O extends Phaser.Math.Vector2>(out?: O, accuracy?: number): O;

            /**
             * Returns an array containing the length of the Path at the end of each Curve.
             * 
             * The result of this method will be cached to avoid recalculating it in subsequent calls. The cache is only invalidated when the {@link #curves} array changes in length, leading to potential inaccuracies if a Curve in the Path is changed, or if a Curve is removed and another is added in its place.undefined
             * @returns An array containing the length of the Path at the end of each one of its Curves.
             */
            getCurveLengths(): number[];

            /**
             * Returns the Curve that forms the Path at the given normalized location (between 0 and 1).
             * @param t The normalized location on the Path, between 0 and 1.
             * @returns The Curve that is part of this Path at a given location, or `null` if no curve was found.
             */
            getCurveAt(t: number): Phaser.Curves.Curve | null;

            /**
             * Returns the ending point of the Path.
             * 
             * A Path's ending point is equivalent to the ending point of the last Curve in the Path. For an empty Path, the ending point is at the Path's defined {@link #startPoint}.
             * @param out The object to store the point in.
             * @returns The modified `out` object, or a new Vector2 if none was provided.
             */
            getEndPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Returns the total length of the Path.undefined
             * @returns The total length of the Path.
             */
            getLength(): number;

            /**
             * Calculates the coordinates of the point at the given normalized location (between 0 and 1) on the Path.
             * 
             * The location is relative to the entire Path, not to an individual Curve. A location of 0.5 is always in the middle of the Path and is thus an equal distance away from both its starting and ending points. In a Path with one Curve, it would be in the middle of the Curve; in a Path with two Curves, it could be anywhere on either one of them depending on their lengths.
             * @param t The location of the point to return, between 0 and 1.
             * @param out The object in which to store the calculated point.
             * @returns The modified `out` object, or a new `Vector2` if none was provided.
             */
            getPoint<O extends Phaser.Math.Vector2>(t: number, out?: O): O;

            /**
             * Get a sequence of points on the path.
             * @param divisions The number of divisions to make per resolution per curve.
             * @param stepRate The curve distance between points per curve, implying `divisions`.
             * @returns An array of Vector2 objects containing the points along the Path.
             */
            getPoints(divisions?: number, stepRate?: number): Phaser.Math.Vector2[];

            /**
             * Returns a randomly chosen point anywhere on the path. This follows the same rules as `getPoint` in that it may return a point on any Curve inside this path.
             * 
             * When calling this method multiple times, the points are not guaranteed to be equally spaced spatially.
             * @param out `Vector2` instance that should be used for storing the result. If `undefined` a new `Vector2` will be created.
             * @returns The modified `out` object, or a new `Vector2` if none was provided.
             */
            getRandomPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Divides this Path into a set of equally spaced points.
             * 
             * The resulting points are equally spaced with respect to the points' position on the path, but not necessarily equally spaced spatially.
             * @param divisions The amount of points to divide this Path into. Default 40.
             * @returns A list of the points this path was subdivided into.
             */
            getSpacedPoints(divisions?: number): Phaser.Math.Vector2[];

            /**
             * Returns the starting point of the Path.
             * @param out `Vector2` instance that should be used for storing the result. If `undefined` a new `Vector2` will be created.
             * @returns The modified `out` object, or a new Vector2 if none was provided.
             */
            getStartPoint<O extends Phaser.Math.Vector2>(out?: O): O;

            /**
             * Gets a unit vector tangent at a relative position on the path.
             * @param t The relative position on the path, [0..1].
             * @param out A vector to store the result in.
             * @returns Vector approximating the tangent line at the point t (delta +/- 0.0001)
             */
            getTangent<O extends Phaser.Math.Vector2>(t: number, out?: O): O;

            /**
             * Creates a line curve from the previous end point to x/y.
             * @param x The X coordinate of the line's end point, or a `Vector2` / `Vector2Like` containing the entire end point.
             * @param y The Y coordinate of the line's end point, if a number was passed as the X parameter.
             * @returns This Path object.
             */
            lineTo(x: number | Phaser.Math.Vector2 | Phaser.Types.Math.Vector2Like, y?: number): this;

            /**
             * Creates a spline curve starting at the previous end point, using the given points on the curve.
             * @param points The points the newly created spline curve should consist of.
             * @returns This Path object.
             */
            splineTo(points: Phaser.Math.Vector2[]): this;

            /**
             * Creates a "gap" in this path from the path's current end point to the given coordinates.
             * 
             * After calling this function, this Path's end point will be equal to the given coordinates.
             * @param x The X coordinate of the position to move the path's end point to, or a `Vector2` / `Vector2Like` containing the entire new end point.
             * @param y The Y coordinate of the position to move the path's end point to, if a number was passed as the X coordinate.
             * @returns This Path object.
             */
            moveTo(x: number | Phaser.Math.Vector2 | Phaser.Types.Math.Vector2Like, y?: number): this;

            /**
             * Converts this Path to a JSON object containing the path information and its constituent curves.undefined
             * @returns The JSON object containing this path's data.
             */
            toJSON(): Phaser.Types.Curves.JSONPath;

            /**
             * Clears the cached arc lengths and forces them to be recalculated on the next call to
             * {@link #getCurveLengths} or any method that depends on it. Call this if you have modified
             * a Curve within this Path in-place, since the cache is only automatically invalidated when
             * the number of Curves changes.
             */
            updateArcLengths(): void;

            /**
             * Disposes of this Path, clearing its internal references to objects so they can be garbage-collected.
             */
            destroy(): void;

        }

    }

    namespace Data {
        /**
         * The Data Manager provides a way to store, retrieve, and manage arbitrary key-value data on any
         * Game Object, System, or Plugin. Each entry is stored by a string key and can hold any value type.
         * 
         * Data changes are communicated through events: a `setdata` event fires when a new key is created,
         * and `changedata` / `changedata-key` events fire when an existing value is updated. This makes the
         * Data Manager well suited for driving UI, triggering game logic, or syncing state between systems.
         * 
         * The parent object must either extend `EventEmitter` directly, or expose a property called `events`
         * that is an instance of `EventEmitter`.
         */
        class DataManager {
            /**
             * 
             * @param parent The object that this DataManager belongs to.
             * @param eventEmitter The DataManager's event emitter.
             */
            constructor(parent: object, eventEmitter?: Phaser.Events.EventEmitter);

            /**
             * The object that this DataManager belongs to.
             */
            parent: any;

            /**
             * The DataManager's event emitter.
             */
            events: Phaser.Events.EventEmitter;

            /**
             * The data list.
             */
            list: {[key: string]:  any};

            /**
             * The public values list. You can use this to access anything you have stored
             * in this Data Manager. For example, if you set a value called `gold` you can
             * access it via:
             * 
             * ```javascript
             * this.data.values.gold;
             * ```
             * 
             * You can also modify it directly:
             * 
             * ```javascript
             * this.data.values.gold += 1000;
             * ```
             * 
             * Doing so will emit a `changedata` event from the parent of this Data Manager.
             * 
             * Do not modify this object directly. Adding properties directly to this object will not
             * emit any events. Always use `DataManager.set` to create new items the first time around.
             */
            values: {[key: string]:  any};

            /**
             * Retrieves the value for the given key, or undefined if it doesn't exist.
             * 
             * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:
             * 
             * ```javascript
             * this.data.get('gold');
             * ```
             * 
             * Or access the value directly:
             * 
             * ```javascript
             * this.data.values.gold;
             * ```
             * 
             * You can also pass in an array of keys, in which case an array of values will be returned:
             * 
             * ```javascript
             * this.data.get([ 'gold', 'armor', 'health' ]);
             * ```
             * 
             * This approach is useful for destructuring arrays in ES6.
             * @param key The key of the value to retrieve, or an array of keys.
             * @returns The value belonging to the given key, or an array of values, the order of which will match the input array.
             */
            get(key: string | string[]): any;

            /**
             * Retrieves all data values in a new object.undefined
             * @returns All data values.
             */
            getAll(): {[key: string]:  any};

            /**
             * Queries the DataManager for the values of keys matching the given regular expression.
             * @param search A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).
             * @returns The values of the keys matching the search string.
             */
            query(search: RegExp): {[key: string]:  any};

            /**
             * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.
             * 
             * ```javascript
             * data.set('name', 'Red Gem Stone');
             * ```
             * 
             * You can also pass in an object of key value pairs as the first argument:
             * 
             * ```javascript
             * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });
             * ```
             * 
             * To get a value back again you can call `get`:
             * 
             * ```javascript
             * data.get('gold');
             * ```
             * 
             * Or you can access the value directly via the `values` property, where it works like any other variable:
             * 
             * ```javascript
             * data.values.gold += 50;
             * ```
             * 
             * When the value is first set, a `setdata` event is emitted.
             * 
             * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.
             * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.
             * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.
             * 
             * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.
             * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.
             * @param key The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.
             * @param data The value to set for the given key. If an object is provided as the key this argument is ignored.
             * @returns This Data Manager instance.
             */
            set<T extends any>(key: (string|T), data?: any): this;

            /**
             * Increases a value for the given key. If the key doesn't already exist in the Data Manager then it is created with a value of 0 before being increased.
             * 
             * When the key is first created, a `setdata` event is emitted. If the key already exists, a `changedata` event
             * and a `changedata-key` event are emitted instead, where `key` is replaced with the actual key name.
             * @param key The key to change the value for.
             * @param amount The amount to increase the given key by. Pass a negative value to decrease the key. Default 1.
             * @returns This Data Manager instance.
             */
            inc(key: string, amount?: number): this;

            /**
             * Toggles a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is created with a value of `false` before being toggled.
             * 
             * When the key is first created, a `setdata` event is emitted. If the key already exists, a `changedata` event
             * and a `changedata-key` event are emitted instead, where `key` is replaced with the actual key name.
             * @param key The key to toggle the value for.
             * @returns This Data Manager instance.
             */
            toggle(key: string): this;

            /**
             * Passes all data entries to the given callback. The callback is invoked for every entry in the
             * Data Manager, receiving the parent object, the key, the value, and any additional arguments
             * provided to this method.
             * @param callback The function to call.
             * @param context Value to use as `this` when executing callback.
             * @param args Additional arguments that will be passed to the callback, after the game object, key, and data.
             * @returns This Data Manager instance.
             */
            each(callback: DataEachCallback, context?: any, ...args: any[]): this;

            /**
             * Merge the given object of key value pairs into this DataManager.
             * 
             * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)
             * will emit a `changedata` event.
             * @param data The data to merge.
             * @param overwrite Whether to overwrite existing data. Defaults to true. Default true.
             * @returns This Data Manager instance.
             */
            merge(data: {[key: string]:  any}, overwrite?: boolean): this;

            /**
             * Remove the value for the given key.
             * 
             * If the key is found in this Data Manager it is removed from the internal lists and a
             * `removedata` event is emitted.
             * 
             * You can also pass in an array of keys, in which case all keys in the array will be removed:
             * 
             * ```javascript
             * this.data.remove([ 'gold', 'armor', 'health' ]);
             * ```
             * @param key The key to remove, or an array of keys to remove.
             * @returns This Data Manager instance.
             */
            remove(key: string | string[]): this;

            /**
             * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.
             * @param key The key of the value to retrieve and delete.
             * @returns The value of the given key.
             */
            pop(key: string): any;

            /**
             * Determines whether the given key is set in this Data Manager.
             * 
             * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.
             * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.
             * @param key The key to check.
             * @returns Returns `true` if the key exists, otherwise `false`.
             */
            has(key: string): boolean;

            /**
             * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts
             * to create new values or update existing ones.
             * @param value Whether to freeze or unfreeze the Data Manager.
             * @returns This Data Manager instance.
             */
            setFreeze(value: boolean): this;

            /**
             * Delete all data in this Data Manager and unfreeze it.undefined
             * @returns This Data Manager instance.
             */
            reset(): this;

            /**
             * Destroys this Data Manager. All stored data is deleted, all event listeners are removed,
             * and the reference to the parent object is cleared. This is called automatically when the
             * parent emits a `destroy` event.
             */
            destroy(): void;

            /**
             * Gets or sets the frozen state of this Data Manager.
             * A frozen Data Manager will block all attempts to create new values or update existing ones.
             */
            freeze: boolean;

            /**
             * Return the total number of entries in this Data Manager.
             */
            count: number;

        }

        /**
         * The Data Manager Plugin is a Scene Plugin that provides data storage and retrieval
         * functionality for a Scene, integrated with the Scene lifecycle. It extends the base DataManager
         * class with automatic event handling for Scene shutdown and destroy events, ensuring that stored
         * data and event listeners are properly cleaned up when the Scene stops or is destroyed.
         * It is accessed via `scene.data` within any Scene.
         */
        class DataManagerPlugin extends Phaser.Data.DataManager {
            /**
             * 
             * @param scene A reference to the Scene that this DataManager belongs to.
             */
            constructor(scene: Phaser.Scene);

            /**
             * A reference to the Scene that this DataManager belongs to.
             */
            scene: Phaser.Scene;

            /**
             * A reference to the Scene's Systems.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * Destroys this DataManagerPlugin, calling the base DataManager destroy method,
             * removing all Scene event listeners, and clearing all internal references.
             * This is called automatically when the owning Scene is destroyed.
             */
            destroy(): void;

        }

        namespace Events {
            /**
             * The Change Data Event.
             * 
             * This event is dispatched by a Data Manager when an item in the data store is changed.
             * 
             * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for
             * a change data event from a Game Object you would use: `sprite.on('changedata', listener)`.
             * 
             * This event is dispatched for all items that change in the Data Manager.
             * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.
             */
            const CHANGE_DATA: string;

            /**
             * The Change Data Key Event.
             * 
             * This event is dispatched by a Data Manager when an item in the data store is changed.
             * 
             * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for
             * the change of a specific data item from a Game Object you would use: `sprite.on('changedata-key', listener)`,
             * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`
             * then you can listen for `sprite.on('changedata-gold')`.
             */
            const CHANGE_DATA_KEY: string;

            /**
             * The Data Manager Destroy Event.
             * 
             * The Data Manager will listen for the destroy event from its parent, and then close itself down.
             */
            const DESTROY: string;

            /**
             * The Remove Data Event.
             * 
             * This event is dispatched by a Data Manager when an item is removed from it.
             * 
             * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for
             * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`.
             */
            const REMOVE_DATA: string;

            /**
             * The Set Data Event.
             * 
             * This event is dispatched by a Data Manager when a new item is added to the data store.
             * 
             * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for
             * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.
             */
            const SET_DATA: string;

        }

    }

    /**
     * The Device class is a collection of properties and functions that describe the device on which the Phaser Game instance is running.
     * 
     * These values are read-only and populated during the boot sequence of the game. They are then referenced by internal game systems and are available for you to access
     * via `this.sys.game.device` from within any Scene.
     */
    namespace Device {
        /**
         * Determines the audio playback capabilities of the device running this Phaser Game instance.
         * These values are read-only and populated during the boot sequence of the game.
         * They are then referenced by internal game systems and are available for you to access
         * via `this.sys.game.device.audio` from within any Scene.
         */
        type Audio = {
            /**
             * Can this device play HTML Audio tags?
             */
            audioData: boolean;
            /**
             * Can this device play EC-3 Dolby Digital Plus files?
             */
            dolby: boolean;
            /**
             * Can this device play m4a files?
             */
            m4a: boolean;
            /**
             * Can this device play aac files?
             */
            aac: boolean;
            /**
             * Can this device play flac files?
             */
            flac: boolean;
            /**
             * Can this device play mp3 files?
             */
            mp3: boolean;
            /**
             * Can this device play ogg files?
             */
            ogg: boolean;
            /**
             * Can this device play opus files?
             */
            opus: boolean;
            /**
             * Can this device play wav files?
             */
            wav: boolean;
            /**
             * Does this device have the Web Audio API?
             */
            webAudio: boolean;
            /**
             * Can this device play webm files?
             */
            webm: boolean;
        };

        /**
         * Determines the browser type and version running this Phaser Game instance.
         * These values are read-only and populated during the boot sequence of the game.
         * They are then referenced by internal game systems and are available for you to access
         * via `this.sys.game.device.browser` from within any Scene.
         */
        type Browser = {
            /**
             * Set to true if running in Chrome.
             */
            chrome: boolean;
            /**
             * Set to true if running in Microsoft Edge browser.
             */
            edge: boolean;
            /**
             * Set to true if running in Firefox.
             */
            firefox: boolean;
            /**
             * Set to true if running in Internet Explorer 11 or less (not Edge).
             */
            ie: boolean;
            /**
             * Set to true if running in Mobile Safari.
             */
            mobileSafari: boolean;
            /**
             * Set to true if running in Opera.
             */
            opera: boolean;
            /**
             * Set to true if running in Safari.
             */
            safari: boolean;
            /**
             * Set to true if running in the Silk browser (as used on the Amazon Kindle).
             */
            silk: boolean;
            /**
             * Set to true if running a Trident version of Internet Explorer (IE11 or earlier).
             */
            trident: boolean;
            /**
             * Set to true if the browser appears to support ES2019 features.
             */
            es2019: boolean;
            /**
             * If running in Chrome this will contain the major version number.
             */
            chromeVersion: number;
            /**
             * If running in Firefox this will contain the major version number.
             */
            firefoxVersion: number;
            /**
             * If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.
             */
            ieVersion: number;
            /**
             * If running in Safari this will contain the major version number.
             */
            safariVersion: number;
            /**
             * If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}
             */
            tridentVersion: number;
        };

        /**
         * Determines the canvas features of the browser running this Phaser Game instance.
         * These values are read-only and populated during the boot sequence of the game.
         * They are then referenced by internal game systems and are available for you to access
         * via `this.sys.game.device.canvasFeatures` from within any Scene.
         */
        type CanvasFeatures = {
            /**
             * Set to true if the browser supports inverted alpha.
             */
            supportInverseAlpha: boolean;
            /**
             * Set to true if the browser supports new canvas blend modes.
             */
            supportNewBlendModes: boolean;
        };

        /**
         * Determines the features of the browser running this Phaser Game instance.
         * These values are read-only and populated during the boot sequence of the game.
         * They are then referenced by internal game systems and are available for you to access
         * via `this.sys.game.device.features` from within any Scene.
         */
        type Features = {
            /**
             * Indicates whether the HTML5 Canvas API (CanvasRenderingContext2D) is available in this browser. Required for the Canvas renderer to function.
             */
            canvas: boolean;
            /**
             * True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap. This is used for fast pixel copy operations. Will be `null` if it could not be determined, `false` on iOS and Safari where it is known not to work.
             */
            canvasBitBltShift: boolean | null;
            /**
             * Indicates whether the File, FileReader, FileList, and Blob APIs are all available, enabling file reading operations within the browser.
             */
            file: boolean;
            /**
             * Indicates whether the FileSystem API (requestFileSystem) is available, allowing sandboxed local file storage access.
             */
            fileSystem: boolean;
            /**
             * Indicates whether the getUserMedia API is available and functional. Used for accessing camera and microphone input. Note: older versions of Firefox (below 21) may report support but not actually work correctly.
             */
            getUserMedia: boolean;
            /**
             * Indicates whether the device uses little-endian byte ordering. Only detected if the browser supports TypedArrays. Will be `null` if endianness could not be determined.
             */
            littleEndian: boolean;
            /**
             * Indicates whether the Web Storage localStorage API is available for persisting key-value data between browser sessions.
             */
            localStorage: boolean;
            /**
             * Indicates whether the Pointer Lock API is available, which allows the mouse cursor to be hidden and locked to the game canvas for first-person style input.
             */
            pointerLock: boolean;
            /**
             * Indicates whether the browser's Array.sort implementation is stable, meaning equal elements retain their original relative order after sorting.
             */
            stableSort: boolean;
            /**
             * Indicates whether the device supports 32-bit pixel manipulation of canvas image data using ArrayBuffer and typed array views (Uint8ClampedArray / Int32Array). Requires little-endian byte ordering.
             */
            support32bit: boolean;
            /**
             * Indicates whether the Vibration API is available, enabling haptic feedback on supported mobile devices.
             */
            vibration: boolean;
            /**
             * Indicates whether WebGL is available in this browser. Required for the WebGL renderer to function.
             */
            webGL: boolean;
            /**
             * Indicates whether Web Workers are available, enabling background JavaScript execution on a separate thread.
             */
            worker: boolean;
        };

        /**
         * Determines the full screen support of the browser running this Phaser Game instance.
         * These values are read-only and populated during the boot sequence of the game.
         * They are then referenced by internal game systems and are available for you to access
         * via `this.sys.game.device.fullscreen` from within any Scene.
         */
        type Fullscreen = {
            /**
             * Does the browser support the Full Screen API?
             */
            available: boolean;
            /**
             * Does the browser support access to the Keyboard during Full Screen mode?
             */
            keyboard: boolean;
            /**
             * Is the browser currently in fullscreen mode? This is a read-only getter that checks the various vendor-prefixed fullscreen element properties on the document.
             */
            active: boolean;
            /**
             * If the browser supports the Full Screen API, this holds the name of the method to call on the document in order to exit fullscreen mode.
             */
            cancel: string;
            /**
             * If the browser supports the Full Screen API, this holds the name of the method to call on a DOM element in order to request fullscreen mode.
             */
            request: string;
        };

        /**
         * Determines the input support of the browser running this Phaser Game instance.
         * These values are read-only and populated during the boot sequence of the game.
         * They are then referenced by internal game systems and are available for you to access
         * via `this.sys.game.device.input` from within any Scene.
         */
        type Input = {
            /**
             * The most modern wheel/scroll event type supported by the browser: `'wheel'` (DOM3), `'mousewheel'` (legacy Chrome/IE/Safari), or `'DOMMouseScroll'` (legacy Firefox). `null` if no wheel event is supported.
             */
            wheelEvent: string | null;
            /**
             * Whether the Gamepad API (`navigator.getGamepads`) is available in this browser, allowing gamepad input to be read.
             */
            gamepads: boolean;
            /**
             * Whether the Microsoft Pointer API (`navigator.msPointerEnabled` or `navigator.pointerEnabled`) is available, used for pointer input on older IE/Edge browsers.
             */
            mspointer: boolean;
            /**
             * Whether touch input is supported, detected via the `ontouchstart` event or `navigator.maxTouchPoints`.
             */
            touch: boolean;
        };

        /**
         * Determines the operating system of the device running this Phaser Game instance.
         * These values are read-only and populated during the boot sequence of the game.
         * They are then referenced by internal game systems and are available for you to access
         * via `this.sys.game.device.os` from within any Scene.
         */
        type OS = {
            /**
             * Is running on Android?
             */
            android: boolean;
            /**
             * Is running on chromeOS?
             */
            chromeOS: boolean;
            /**
             * Is the game running under Apache Cordova?
             */
            cordova: boolean;
            /**
             * Is the game running under the Intel Crosswalk XDK?
             */
            crosswalk: boolean;
            /**
             * Is running on a desktop?
             */
            desktop: boolean;
            /**
             * Is the game running under Ejecta?
             */
            ejecta: boolean;
            /**
             * Is the game running under GitHub Electron?
             */
            electron: boolean;
            /**
             * Is running on iOS?
             */
            iOS: boolean;
            /**
             * Is running on iPad?
             */
            iPad: boolean;
            /**
             * Is running on iPhone?
             */
            iPhone: boolean;
            /**
             * Is running on an Amazon Kindle?
             */
            kindle: boolean;
            /**
             * Is running on Linux?
             */
            linux: boolean;
            /**
             * Is running on macOS?
             */
            macOS: boolean;
            /**
             * Is the game running under Node.js?
             */
            node: boolean;
            /**
             * Is the game running under Node-Webkit?
             */
            nodeWebkit: boolean;
            /**
             * Set to true if running as a WebApp, i.e. within a WebView
             */
            webApp: boolean;
            /**
             * Is running on Windows?
             */
            windows: boolean;
            /**
             * Is running on a Windows Phone?
             */
            windowsPhone: boolean;
            /**
             * If running in iOS this will contain the major version number.
             */
            iOSVersion: number;
            /**
             * The pixel ratio of the host device.
             */
            pixelRatio: number;
        };

        /**
         * Determines the video support of the browser running this Phaser Game instance.
         * 
         * These values are read-only and populated during the boot sequence of the game.
         * 
         * They are then referenced by internal game systems and are available for you to access
         * via `this.sys.game.device.video` from within any Scene.
         */
        type Video = {
            /**
             * Can this device play h264 mp4 video files?
             */
            h264: boolean;
            /**
             * Can this device play hls video files?
             */
            hls: boolean;
            /**
             * Can this device play mov video files?
             */
            mov: boolean;
            /**
             * Can this device play h264 mp4 video files?
             */
            mp4: boolean;
            /**
             * Can this device play m4v (typically mp4) video files?
             */
            m4v: boolean;
            /**
             * Can this device play ogg video files?
             */
            ogg: boolean;
            /**
             * Can this device play vp9 video files?
             */
            vp9: boolean;
            /**
             * Can this device play webm video files?
             */
            webm: boolean;
            /**
             * Does this device support the `requestVideoFrameCallback` API?
             */
            hasRequestVideoFrame: boolean;
            /**
             * Given an array of video URLs (or a single URL string), returns an object with `url` and `type` properties for the first entry that can be played by this browser, or `null` if none of the provided formats are supported.
             */
            getVideoURL: Function;
        };

    }

    type DeviceConf = {
        /**
         * The OS Device functions.
         */
        os: Phaser.Device.OS;
        /**
         * The Browser Device functions.
         */
        browser: Phaser.Device.Browser;
        /**
         * The Features Device functions.
         */
        features: Phaser.Device.Features;
        /**
         * The Input Device functions.
         */
        input: Phaser.Device.Input;
        /**
         * The Audio Device functions.
         */
        audio: Phaser.Device.Audio;
        /**
         * The Video Device functions.
         */
        video: Phaser.Device.Video;
        /**
         * The Fullscreen Device functions.
         */
        fullscreen: Phaser.Device.Fullscreen;
        /**
         * The Canvas Device functions.
         */
        canvasFeatures: Phaser.Device.CanvasFeatures;
    };

    namespace Display {
        /**
         * The ColorBand class represents a transition from one color to another.
         * It is used in a {@see Phaser.Display.ColorRamp}, and forms the basis
         * of a {@see Phaser.GameObjects.Gradient}.
         * 
         * ColorBand can control the transition by setting a middle point,
         * a color space for blending, and an interpolation style.
         * 
         * This class also records `start` and `end` points for use in a ramp.
         * These indicate its position within the ramp.
         * 
         * Colors are handled unpremultiplied, so RGB values may be larger than alpha.
         */
        class ColorBand {
            /**
             * 
             * @param config The configuration to use for the band.
             */
            constructor(config?: Phaser.Types.Display.ColorBandConfig);

            /**
             * Identifies this object as a ColorBand.
             * This property is read-only and must not be modified.
             */
            readonly isColorBand: boolean;

            /**
             * The color at the start of the color band.
             */
            colorStart: Phaser.Display.Color;

            /**
             * The color at the end of the color band.
             */
            colorEnd: Phaser.Display.Color;

            /**
             * The start point of this band within a ColorRamp.
             * This value should be normalized within the ramp,
             * between 0 (ramp start) and 1 (ramp end).
             */
            start: number;

            /**
             * The middle point of this band within a ColorRamp.
             * This value should be normalized within the band,
             * between 0 (band start) and 1 (band end).
             * Middle point alters the shape of the color interpolation.
             * 
             * Mathematically, the gradient should be 0.5 at the middle.
             * We use a gamma curve to adjust the gradient.
             * Thus, `0.5 = middle^gamma`.
             * By the properties of logarithms, therefore,
             * `gamma = log base middle of 0.5`.
             */
            middle: number;

            /**
             * The end point of this band within a ColorRamp.
             * This value should be normalized within the ramp,
             * between 0 (ramp start) and 1 (ramp end).
             */
            end: number;

            /**
             * The color interpolation.
             * This can be one of the following codes:
             * 
             * - 0: LINEAR - a straight blend.
             * - 1: CURVED - color changes quickly at start and end,
             *   flattening in the middle. Good for convex surfaces.
             * - 2: SINUSOIDAL - color changes quickly in the middle,
             *   flattening at start and end. Good for smooth transitions.
             * - 3: CURVE_START - color changes quickly at the start,
             *   flattening at the end.
             * - 4: CURVE_END - color changes quickly at the end,
             *   flattening at the start.
             * 
             * Modes 2, 3, and 4 use the circular easing function directly.
             * Mode 1 uses a related custom formula based on the unit circle.
             */
            interpolation: number;

            /**
             * The color space where interpolation should be done.
             * This can be one of the following codes:
             * 
             * - 0: RGBA - channels are blended directly.
             *   This can produce perceptually inaccurate results, as blending
             *   in RGB space does not account for how humans perceive color.
             * - 1: HSVA_NEAREST - colors are blended in HSVA space,
             *   better preserving saturation and lightness.
             *   The hue is blended with the shortest angle, e.g. red and blue
             *   blend via purple, not green.
             * - 2: HSVA_PLUS - as HSVA_NEAREST, but hue angle always increases.
             * - 3: HSVA_MINUS - as HSVA_NEAREST, but hue angle always decreases.
             */
            colorSpace: number;

            /**
             * Set the colors of the band, from a variety of color formats.
             * 
             * - A number is expected to be a 24 or 32 bit RGB or ARGB value.
             * - A string is expected to be a hex code.
             * - An array of numbers is expected to be RGB or RGBA in the range 0-1.
             * - A Color object can be used.
             * @param start The color at the start of the band. Default 0x000000.
             * @param end The color at the end of the band. If not specified, equals `start`.
             * @returns This ColorBand.
             */
            setColors(start?: number | string | number[] | Phaser.Display.Color, end?: number | string | number[] | Phaser.Display.Color): this;

            /**
             * Returns the blended color at a normalized position within this band.
             * The middle point gamma curve, interpolation mode, and color space are
             * all applied before blending between `colorStart` and `colorEnd`.
             * @param index The normalized position within the band, where 0 is the band start and 1 is the band end.
             * @returns The blended color at that position.
             */
            getColor(index: number): Phaser.Types.Display.ColorObject;

        }

        /**
         * The ColorMatrix class creates a 5x4 matrix that can be used in shaders and graphics
         * operations. It provides methods required to modify the color values, such as adjusting
         * the brightness, setting a sepia tone, hue rotation and more.
         * 
         * The matrix rows (indices 0, 1, 2, 3, 4 form the first row)
         * are summed to create the red, green, blue, and alpha channels in order.
         * The matrix columns (indices 0, 5, 10, 15 form the first column)
         * describe contributions from the initial channels,
         * typically in the range -1 to 1.
         * The last column (4, 9, 14, 19) contains an addition,
         * expected to be in the range 0-255 (although other values are valid).
         * For example, to set the red channel to the contents of the green channel,
         * the first row would be [0, 1, 0, 0, 0].
         * To set the red channel to full, regardless of current channels,
         * the first row would be [0, 0, 0, 0, 255].
         * 
         * These operations are the default use,
         * but you can use ColorMatrix to conveniently store data for other purposes.
         * 
         * Use the method `getData` to return a Float32Array containing the current color values.
         * This shrinks the addition column from the range 0-255 to 0-1
         * (but does not clamp it).
         */
        class ColorMatrix {
            /**
             * The value that determines how much of the original color is used
             * when mixing the colors. A value between 0 (all original) and 1 (all final)
             */
            alpha: number;

            /**
             * Sets this ColorMatrix from the given array of color values.
             * @param value The ColorMatrix values to set. Must have 20 elements.
             * @returns This ColorMatrix instance.
             */
            set(value: number[] | Float32Array): this;

            /**
             * Resets the ColorMatrix to default values and also resets
             * the `alpha` property back to 1.undefined
             * @returns This ColorMatrix instance.
             */
            reset(): this;

            /**
             * Gets the ColorMatrix as a Float32Array.
             * 
             * Can be used directly as a 1fv shader uniform value.undefined
             * @returns The ColorMatrix as a Float32Array.
             */
            getData(): Float32Array;

            /**
             * Changes the brightness of this ColorMatrix by the given amount.
             * @param value The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1. Default 0.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            brightness(value?: number, multiply?: boolean): this;

            /**
             * Changes the saturation of this ColorMatrix by the given amount.
             * @param value The amount of saturation to apply to this ColorMatrix. Default 0.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            saturate(value?: number, multiply?: boolean): this;

            /**
             * Desaturates this ColorMatrix (removes color from it).
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            desaturate(multiply?: boolean): this;

            /**
             * Rotates the hues of this ColorMatrix by the value given.
             * @param rotation The amount of hue rotation to apply to this ColorMatrix, in degrees. Default 0.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            hue(rotation?: number, multiply?: boolean): this;

            /**
             * Sets this ColorMatrix to be grayscale.
             * @param value The grayscale scale (0 is black). Default 1.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            grayscale(value?: number, multiply?: boolean): this;

            /**
             * Sets this ColorMatrix to be black and white.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            blackWhite(multiply?: boolean): this;

            /**
             * Sets this ColorMatrix to be black, only preserving alpha.
             * Useful for cases where you only want the alpha.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            black(multiply?: boolean): this;

            /**
             * Change the contrast of this ColorMatrix by the amount given.
             * @param value The amount of contrast to apply to this ColorMatrix. Default 0.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            contrast(value?: number, multiply?: boolean): this;

            /**
             * Converts this ColorMatrix to have negative values.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            negative(multiply?: boolean): this;

            /**
             * Apply a desaturated luminance to this ColorMatrix.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            desaturateLuminance(multiply?: boolean): this;

            /**
             * Applies a sepia tone to this ColorMatrix.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            sepia(multiply?: boolean): this;

            /**
             * Applies a night vision tone to this ColorMatrix.
             * @param intensity The intensity of this effect. Default 0.1.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            night(intensity?: number, multiply?: boolean): this;

            /**
             * Applies a trippy color tone to this ColorMatrix.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            lsd(multiply?: boolean): this;

            /**
             * Applies a brown tone to this ColorMatrix.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            brown(multiply?: boolean): this;

            /**
             * Applies a vintage pinhole color effect to this ColorMatrix.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            vintagePinhole(multiply?: boolean): this;

            /**
             * Applies a kodachrome color effect to this ColorMatrix.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            kodachrome(multiply?: boolean): this;

            /**
             * Applies a technicolor color effect to this ColorMatrix.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            technicolor(multiply?: boolean): this;

            /**
             * Applies a polaroid color effect to this ColorMatrix.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            polaroid(multiply?: boolean): this;

            /**
             * Applies an alpha-to-brightness color effect to this ColorMatrix.
             * This replaces the color with a grayscale depiction of the original alpha,
             * where black represents transparency and white represents opacity,
             * and sets the alpha to full.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            alphaToBrightness(multiply?: boolean): this;

            /**
             * Applies an alpha-to-brightness color effect to this ColorMatrix.
             * This replaces the color with a grayscale depiction of the original alpha,
             * where white represents transparency and black represents opacity,
             * and sets the alpha to full.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            alphaToBrightnessInverse(multiply?: boolean): this;

            /**
             * Applies a brightness-to-alpha color effect to this ColorMatrix.
             * This preserves RGB, but replaces the alpha with the brightness of the color.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            brightnessToAlpha(multiply?: boolean): this;

            /**
             * Applies a brightness-to-alpha color effect to this ColorMatrix.
             * This preserves RGB, but replaces the alpha with the brightness of the color,
             * inverted.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            brightnessToAlphaInverse(multiply?: boolean): this;

            /**
             * Shifts the values of this ColorMatrix into BGR order.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            shiftToBGR(multiply?: boolean): this;

            /**
             * Multiplies the given matrix `a` against the current `_matrix`.
             * @param a The 5x4 array to multiply with ColorMatrix._matrix.
             * @param multiply Multiply the resulting ColorMatrix (`true`), or set it (`false`) ? Default false.
             * @returns This ColorMatrix instance.
             */
            multiply(a: number[], multiply?: boolean): this;

            /**
             * A constant array used by the ColorMatrix class for black operations.
             */
            static readonly BLACK: number[];

            /**
             * A constant array used by the ColorMatrix class for black_white operations.
             */
            static readonly BLACK_WHITE: number[];

            /**
             * A constant array used by the ColorMatrix class for negative operations.
             */
            static readonly NEGATIVE: number[];

            /**
             * A constant array used by the ColorMatrix class for desaturated luminance operations.
             */
            static readonly DESATURATE_LUMINANCE: number[];

            /**
             * A constant array used by the ColorMatrix class for sepia operations.
             */
            static readonly SEPIA: number[];

            /**
             * A constant array used by the ColorMatrix class for lsd operations.
             */
            static readonly LSD: number[];

            /**
             * A constant array used by the ColorMatrix class for brown operations.
             */
            static readonly BROWN: number[];

            /**
             * A constant array used by the ColorMatrix class for vintage pinhole operations.
             */
            static readonly VINTAGE: number[];

            /**
             * A constant array used by the ColorMatrix class for kodachrome operations.
             */
            static readonly KODACHROME: number[];

            /**
             * A constant array used by the ColorMatrix class for technicolor operations.
             */
            static readonly TECHNICOLOR: number[];

            /**
             * A constant array used by the ColorMatrix class for polaroid shift operations.
             */
            static readonly POLAROID: number[];

            /**
             * A constant array used by the ColorMatrix class for alpha-to-brightness operations.
             */
            static readonly ALPHA_TO_BRIGHTNESS: number[];

            /**
             * A constant array used by the ColorMatrix class for inverse alpha-to-brightness operations.
             */
            static readonly ALPHA_TO_BRIGHTNESS_INVERSE: number[];

            /**
             * A constant array used by the ColorMatrix class for brightness-to-alpha operations.
             */
            static readonly BRIGHTNESS_TO_ALPHA: number[];

            /**
             * A constant array used by the ColorMatrix class for inverse brightness-to-alpha operations.
             */
            static readonly BRIGHTNESS_TO_ALPHA_INVERSE: number[];

            /**
             * A constant array used by the ColorMatrix class for shift BGR operations.
             */
            static readonly SHIFT_BGR: number[];

        }

        /**
         * The ColorRamp class represents a series of color transitions.
         * It is intended for use in a {@see Phaser.GameObjects.Gradient}.
         * 
         * You should make sure that your bands are arranged end-to-end,
         * with no gaps. The Gradient shader assumes this is so.
         * You may leave gaps at the start and end.
         * Overlaps and gaps may not act as expected.
         * 
         * By default, ColorRamp stores its data for use on the GPU
         * in a data texture. This is updated automatically on creation
         * and when you run `setBands()`, but if you edit the bands manually,
         * you should run `encode()` to rebuild the texture.
         * We don't update it automatically because we don't want to waste cycles
         * on rebuilds that you're about to overwrite.
         */
        class ColorRamp {
            /**
             * 
             * @param scene The current scene.
             * @param bands The bands which make up this ramp. This can be one entry or an array, and can be configs or existing instances. A band count over 1048576 may be unsafe.
             * @param gpuEncode Whether to create a data texture to use this ramp in shaders. Default true.
             */
            constructor(scene: Phaser.Scene, bands: Phaser.Types.Display.ColorBandConfig | Phaser.Display.ColorBand | (Phaser.Types.Display.ColorBandConfig|Phaser.Display.ColorBand)[], gpuEncode?: boolean);

            /**
             * The scene where the ColorRamp was created.
             */
            readonly scene: Phaser.Scene;

            /**
             * The color bands that make up this ramp.
             */
            bands: Phaser.Display.ColorBand[];

            /**
             * Whether to encode the ramp for shaders to use on the GPU.
             * An encoded ramp is stored as a texture.
             */
            gpuEncode: boolean;

            /**
             * The Phaser Texture wrapping the GPU data texture for this ramp.
             * This is registered with the Scene's Texture Manager under a unique key
             * so it can be referenced elsewhere. It is not intended for display.
             */
            readonly dataTexture: Phaser.Textures.Texture | null;

            /**
             * The texture containing the ramp encoded for the GPU.
             * This is used internally by effects such as the Gradient game object
             * to read complex ramp data.
             */
            readonly glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | null;

            /**
             * The texel index which contains the first band data
             * in `glTexture` if it has been encoded.
             * This is used internally.
             */
            readonly dataTextureFirstBand: number;

            /**
             * The number of levels in the band tree.
             * This is used internally to decode the data texture.
             */
            readonly bandTreeDepth: number;

            /**
             * The resolution of the data texture, if it has been encoded.
             * This is used internally.
             */
            readonly dataTextureResolution: number[];

            /**
             * Set or replace the color bands in this ramp.
             * Use this after creation to update the bands.
             * 
             * This will re-encode the data texture if `gpuEncode` is set
             * and `encode` is not `false`.
             * @param bands The bands to make up this ramp. This can be one entry or an array, and can be configs or existing instances.
             * @param encode Whether to encode the new ramp data to a data texture for use in shaders. Default true.
             * @returns - This ColorRamp instance.
             */
            setBands(bands: Phaser.Types.Display.ColorBandConfig | Phaser.Display.ColorBand | (Phaser.Types.Display.ColorBandConfig|Phaser.Display.ColorBand)[], encode?: boolean): this;

            /**
             * Encode a data texture from the color ramp bands.
             * 
             * This process runs automatically when `gpuEncode` is enabled
             * and the bands are set or updated with `setBands`.
             * If you modify the bands directly, you must call `encode` yourself.
             * 
             * The data is encoded in texels as follows:
             * 
             * Numbers are encoded in "RG.BA" form.
             * The number equals R * 255 + G + B / 255 + A / 255 / 255.
             * 
             * - First 2 texels: start and end.
             *   - Start is the start of the first band.
             *   - End is the end of the last band.
             * - Next block of texels: binary symmetrical tree of band ranges,
             *   represented as the end value of the midpoint band.
             * - Final block of texels, starting at `dataTextureFirstBand`:
             *   the band data, in blocks of 3:
             *   - colorStart
             *   - colorEnd
             *   - colorSpace * 255 + interpolation + (middle / 2)
             * 
             * The binary symmetrical tree breaks the bands list in half
             * with every node. It is intended to quickly find the band corresponding
             * to a given progress along the ramp.
             * For example, a ramp with 10 bands would store the ends in this order:
             * 
             * `[ 7, 3, 11, 1, 5, 9, 13, 0, 2, 4, 6, 8, 10, 12, 14 ]`
             * 
             * But because it doesn't have bands from index 10 and up, it's actually:
             * 
             * `[ 7, 3, 9, 1, 5, 9, 9, 0, 2, 4, 6, 8, 9, 9, 9 ]`
             * 
             * Note that, if you change the number of bands in the ramp,
             * `dataTexture` may no longer have the correct resolution.
             * It is not intended for display.
             */
            encode(): void;

            /**
             * Fix the fit of bands within this ColorRamp.
             * 
             * This sets the start of each band to the end of the previous band,
             * ensuring that there are no gaps.
             * 
             * Optionally, you can define start and end values to stretch the ramp
             * to some specific range, e.g. 0-1.
             * 
             * By default, any band that is now 0 length will be removed.
             * @param start Override the start of the first band.
             * @param end Override the end of the last band.
             * @param purgeZeroLength Whether to discard bands that now have 0 size.
             * @param encode Whether to reencode the data texture.
             * @returns - This ColorRamp instance.
             */
            fixFit(start: number, end: number, purgeZeroLength: boolean, encode: boolean): this;

            /**
             * Split a band from this ramp into several bands, and insert them into the ramp.
             * 
             * You can choose whether to "quantize" the bands, where each of them has
             * a flat color.
             * @param band The band to split, either an index on this ramp or the band instance. The band must be on this ramp.
             * @param steps The number of bands to create.
             * @param quantize Whether to quantize the bands to a single color. Default false.
             * @param encode Whether to rebuild the data texture. Default true.
             * @returns This ColorRamp instance.
             */
            splitBand(band: number | Phaser.Display.ColorBand, steps: number, quantize?: boolean, encode?: boolean): this;

            /**
             * Get the color value at the given index within this ramp.
             * 
             * If there is no band at that location, the color is transparent.
             * @param index Index of the color to get, from 0 (start) to 1 (end).
             * @returns The color at that index.
             */
            getColor(index: number): Phaser.Types.Display.ColorObject;

            /**
             * Destroy this ColorRamp.
             * If it has a data texture, destroy it.
             */
            destroy(): void;

        }

        /**
         * The RGB class holds a single color value expressed as normalized red, green, and blue
         * components, each in the range 0 to 1. It is used internally by WebGL pipelines and other
         * Phaser systems that need to track color state efficiently. Changes to any component
         * automatically set the `dirty` flag and invoke an optional `onChangeCallback`, making it
         * straightforward to react to color mutations without manual polling.
         */
        class RGB {
            /**
             * 
             * @param red The red color value. A number between 0 and 1. Default 0.
             * @param green The green color value. A number between 0 and 1. Default 0.
             * @param blue The blue color value. A number between 0 and 1. Default 0.
             */
            constructor(red?: number, green?: number, blue?: number);

            /**
             * This callback will be invoked each time one of the RGB color values change.
             * 
             * The callback receives the red, green, and blue values as three separate numeric
             * arguments, each in the range 0 to 1.
             */
            onChangeCallback: Function;

            /**
             * Is this color dirty?
             */
            dirty: boolean;

            /**
             * Sets the red, green and blue values of this RGB object, flags it as being
             * dirty and then invokes the `onChangeCallback`, if set.
             * @param red The red color value. A number between 0 and 1. Default 0.
             * @param green The green color value. A number between 0 and 1. Default 0.
             * @param blue The blue color value. A number between 0 and 1. Default 0.
             * @returns This RGB instance.
             */
            set(red?: number, green?: number, blue?: number): this;

            /**
             * Compares the given rgb parameters with those in this object and returns
             * a boolean `true` value if they are equal, otherwise it returns `false`.
             * @param red The red value to compare with this object.
             * @param green The green value to compare with this object.
             * @param blue The blue value to compare with this object.
             * @returns `true` if the given values match those in this object, otherwise `false`.
             */
            equals(red: number, green: number, blue: number): boolean;

            /**
             * Internal on change handler. Sets this object as being dirty and
             * then invokes the `onChangeCallback`, if set, passing in the
             * new RGB values.
             */
            onChange(): void;

            /**
             * The red color value. Between 0 and 1.
             * 
             * Changing this property will flag this RGB object as being dirty
             * and invoke the `onChangeCallback`, if set.
             */
            r: number;

            /**
             * The green color value. Between 0 and 1.
             * 
             * Changing this property will flag this RGB object as being dirty
             * and invoke the `onChangeCallback`, if set.
             */
            g: number;

            /**
             * The blue color value. Between 0 and 1.
             * 
             * Changing this property will flag this RGB object as being dirty
             * and invoke the `onChangeCallback`, if set.
             */
            b: number;

            /**
             * Destroys this RGB instance by nulling the `onChangeCallback` reference,
             * releasing any external listener held by this object.
             */
            destroy(): void;

        }

        namespace Align {
            /**
             * A constant representing a top-left alignment or position.
             */
            const TOP_LEFT: number;

            /**
             * A constant representing a top-center alignment or position.
             */
            const TOP_CENTER: number;

            /**
             * A constant representing a top-right alignment or position.
             */
            const TOP_RIGHT: number;

            /**
             * A constant representing a left-top alignment or position.
             */
            const LEFT_TOP: number;

            /**
             * A constant representing a left-center alignment or position.
             */
            const LEFT_CENTER: number;

            /**
             * A constant representing a left-bottom alignment or position.
             */
            const LEFT_BOTTOM: number;

            /**
             * A constant representing a center alignment or position.
             */
            const CENTER: number;

            /**
             * A constant representing a right-top alignment or position.
             */
            const RIGHT_TOP: number;

            /**
             * A constant representing a right-center alignment or position.
             */
            const RIGHT_CENTER: number;

            /**
             * A constant representing a right-bottom alignment or position.
             */
            const RIGHT_BOTTOM: number;

            /**
             * A constant representing a bottom-left alignment or position.
             */
            const BOTTOM_LEFT: number;

            /**
             * A constant representing a bottom-center alignment or position.
             */
            const BOTTOM_CENTER: number;

            /**
             * A constant representing a bottom-right alignment or position.
             */
            const BOTTOM_RIGHT: number;

            namespace In {
                /**
                 * Takes a given Game Object and aligns it so that its bottom edge matches the bottom edge of the `alignIn` Game Object, with its horizontal center aligned to the horizontal center of `alignIn`.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function BottomCenter<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is positioned in the bottom-left of the other.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function BottomLeft<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is positioned inside the bottom-right corner of the `alignIn` Game Object. The right edge of `gameObject` is matched to the right edge of `alignIn`, and the bottom edge of `gameObject` is matched to the bottom edge of `alignIn`.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function BottomRight<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is positioned in the center of the other.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function Center<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that its left edge is flush with the left edge of the `alignIn`
                 * Game Object, and its vertical center matches the vertical center of `alignIn`. This places the Game Object
                 * at the left-center interior position of the reference object. An optional offset can be applied to adjust
                 * the final position along either axis.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function LeftCenter<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is positioned relative to another Game Object.
                 * The alignment used is based on the `position` argument, which is an `ALIGN_CONST` value, such as `LEFT_CENTER` or `TOP_RIGHT`.
                 * @param child The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param position The position to align the Game Object with. This is an align constant, such as `ALIGN_CONST.LEFT_CENTER`.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function QuickSet<G extends Phaser.GameObjects.GameObject>(child: G, alignIn: Phaser.GameObjects.GameObject, position: number, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that its right edge is flush with the right edge of the `alignIn` Game Object, and its vertical center is aligned with the vertical center of the `alignIn` Game Object.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function RightCenter<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that its top edge is flush with the top edge of the `alignIn` Game Object, centered horizontally.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function TopCenter<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes the given Game Object and aligns it so that it is positioned in the top-left of the `alignIn` Game Object.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function TopLeft<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is positioned in the top-right of the `alignIn` Game Object.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignIn The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function TopRight<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignIn: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

            }

            namespace To {
                /**
                 * Takes a given Game Object and aligns it so that its top edge is flush with the bottom of the `alignTo` Game Object, centered horizontally on it.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function BottomCenter<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is placed directly below the `alignTo` Game Object, with its left edge aligned to the left edge of `alignTo`.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function BottomLeft<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is placed directly below and flush with the right edge of the other Game Object. The right edge of `gameObject` is aligned to the right edge of `alignTo`, and the top edge of `gameObject` is placed at the bottom edge of `alignTo`.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function BottomRight<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that its right edge touches the left edge of the `alignTo` Game Object, with its bottom edge aligned to the bottom edge of `alignTo`.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function LeftBottom<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that its right edge touches the left edge of the `alignTo` Game Object, with their vertical centers matched.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function LeftCenter<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that its right edge touches the left edge of the `alignTo` Game Object, with its top edge aligned to the top of `alignTo`.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function LeftTop<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a Game Object and aligns it next to another, at the given position.
                 * The alignment used is based on the `position` argument, which is a `Phaser.Display.Align` property such as `LEFT_CENTER` or `TOP_RIGHT`.
                 * @param child The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param position The position to align the Game Object 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 Game Object that was aligned.
                 */
                function QuickSet<G extends Phaser.GameObjects.GameObject>(child: G, alignTo: Phaser.GameObjects.GameObject, position: number, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is placed immediately to the right of the `alignTo` Game Object, with their bottom edges aligned.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function RightBottom<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that its left edge is flush with the right edge of the `alignTo` Game Object, with their vertical centers matching.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function RightCenter<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that its left edge is flush with the right edge of the `alignTo` Game Object, with its top edge matching the top edge of `alignTo`.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function RightTop<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is placed directly above the `alignTo` Game Object, centered horizontally on it. The bottom edge of `gameObject` is positioned flush with the top edge of `alignTo`, and their center X coordinates are matched.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function TopCenter<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that its bottom edge sits flush with the top edge of the `alignTo` Game Object, with their left edges aligned. The result is that `gameObject` appears directly above `alignTo`, anchored to its left side.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function TopLeft<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

                /**
                 * Takes a given Game Object and aligns it so that it is positioned directly above the `alignTo` Game Object, with their right edges aligned.
                 * @param gameObject The Game Object that will be positioned.
                 * @param alignTo The Game Object to base the alignment position on.
                 * @param offsetX Optional horizontal offset from the position. Default 0.
                 * @param offsetY Optional vertical offset from the position. Default 0.
                 * @returns The Game Object that was aligned.
                 */
                function TopRight<G extends Phaser.GameObjects.GameObject>(gameObject: G, alignTo: Phaser.GameObjects.GameObject, offsetX?: number, offsetY?: number): G;

            }

        }

        namespace Bounds {
            /**
             * Positions the Game Object so that it is centered on the given coordinates.
             * @param gameObject The Game Object that will be re-positioned.
             * @param x The horizontal coordinate to position the Game Object on.
             * @param y The vertical coordinate to position the Game Object on.
             * @returns The Game Object that was positioned.
             */
            function CenterOn<G extends Phaser.GameObjects.GameObject>(gameObject: G, x: number, y: number): G;

            /**
             * Returns the bottom coordinate from the bounds of the Game Object.
             * @param gameObject The Game Object to get the bounds value from.
             * @returns The bottom coordinate of the bounds of the Game Object.
             */
            function GetBottom(gameObject: Phaser.GameObjects.GameObject): number;

            /**
             * Returns the unrotated bounds of the Game Object as a rectangle.
             * @param gameObject The Game Object to get the bounds value from.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns - The bounds of the Game Object.
             */
            function GetBounds(gameObject: Phaser.GameObjects.GameObject, output?: Phaser.Geom.Rectangle | object): Phaser.Geom.Rectangle | object;

            /**
             * Returns the center x coordinate from the bounds of the Game Object.
             * @param gameObject The Game Object to get the bounds value from.
             * @returns The center x coordinate of the bounds of the Game Object.
             */
            function GetCenterX(gameObject: Phaser.GameObjects.GameObject): number;

            /**
             * Returns the center y coordinate from the bounds of the Game Object.
             * @param gameObject The Game Object to get the bounds value from.
             * @returns The center y coordinate of the bounds of the Game Object.
             */
            function GetCenterY(gameObject: Phaser.GameObjects.GameObject): number;

            /**
             * Returns the left coordinate from the bounds of the Game Object.
             * @param gameObject The Game Object to get the bounds value from.
             * @returns The left coordinate of the bounds of the Game Object.
             */
            function GetLeft(gameObject: Phaser.GameObjects.GameObject): number;

            /**
             * Returns the amount the Game Object is visually offset from its x coordinate.
             * This is the same as `width * origin.x`.
             * This value will only be > 0 if `origin.x` is not equal to zero.
             * @param gameObject The Game Object to get the bounds value from.
             * @returns The horizontal offset of the Game Object.
             */
            function GetOffsetX(gameObject: Phaser.GameObjects.GameObject): number;

            /**
             * Returns the amount the Game Object is visually offset from its y coordinate.
             * This is the same as `height * origin.y`.
             * This value will only be > 0 if `origin.y` is not equal to zero.
             * @param gameObject The Game Object to get the bounds value from.
             * @returns The vertical offset of the Game Object.
             */
            function GetOffsetY(gameObject: Phaser.GameObjects.GameObject): number;

            /**
             * Returns the right coordinate from the bounds of the Game Object.
             * @param gameObject The Game Object to get the bounds value from.
             * @returns The right coordinate of the bounds of the Game Object.
             */
            function GetRight(gameObject: Phaser.GameObjects.GameObject): number;

            /**
             * Returns the top coordinate from the bounds of the Game Object.
             * @param gameObject The Game Object to get the bounds value from.
             * @returns The top coordinate of the bounds of the Game Object.
             */
            function GetTop(gameObject: Phaser.GameObjects.GameObject): number;

            /**
             * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate.
             * @param gameObject The Game Object that will be re-positioned.
             * @param value The coordinate to position the Game Object bounds on.
             * @returns The Game Object that was positioned.
             */
            function SetBottom<G extends Phaser.GameObjects.GameObject>(gameObject: G, value: number): G;

            /**
             * Positions the Game Object so that the horizontal center of its bounds aligns with the given coordinate.
             * @param gameObject The Game Object that will be re-positioned.
             * @param x The coordinate to position the Game Object bounds on.
             * @returns The Game Object that was positioned.
             */
            function SetCenterX<G extends Phaser.GameObjects.GameObject>(gameObject: G, x: number): G;

            /**
             * Positions the Game Object so that the vertical center of its bounds aligns with the given coordinate.
             * @param gameObject The Game Object that will be re-positioned.
             * @param y The coordinate to position the Game Object bounds on.
             * @returns The Game Object that was positioned.
             */
            function SetCenterY<G extends Phaser.GameObjects.GameObject>(gameObject: G, y: number): G;

            /**
             * Positions the Game Object so that the left of its bounds aligns with the given coordinate.
             * @param gameObject The Game Object that will be re-positioned.
             * @param value The coordinate to position the Game Object bounds on.
             * @returns The Game Object that was positioned.
             */
            function SetLeft<G extends Phaser.GameObjects.GameObject>(gameObject: G, value: number): G;

            /**
             * Positions the Game Object so that the right of its bounds aligns with the given coordinate.
             * @param gameObject The Game Object that will be re-positioned.
             * @param value The coordinate to position the Game Object bounds on.
             * @returns The Game Object that was positioned.
             */
            function SetRight<G extends Phaser.GameObjects.GameObject>(gameObject: G, value: number): G;

            /**
             * Positions the Game Object so that the top of its bounds aligns with the given coordinate.
             * @param gameObject The Game Object that will be re-positioned.
             * @param value The coordinate to position the Game Object bounds on.
             * @returns The Game Object that was positioned.
             */
            function SetTop<G extends Phaser.GameObjects.GameObject>(gameObject: G, value: number): G;

        }

        namespace Canvas {
            /**
             * The Canvas Interpolation namespace contains helper functions for setting the CSS `image-rendering`
             * property on a canvas element. This controls how the browser scales the canvas when it is
             * displayed at a size different from its native resolution.
             * 
             * Use `setCrisp` for pixel art games where you want sharp, nearest-neighbor scaling with no
             * anti-aliasing. Use `setBicubic` to restore the default browser behavior, which applies smooth
             * interpolation when scaling up the canvas.
             */
            namespace CanvasInterpolation {
                /**
                 * Sets the CSS `image-rendering` property on the given canvas to use nearest-neighbor (crisp) scaling.
                 * This disables anti-aliasing so that each pixel is rendered as a hard-edged block, which is ideal
                 * for pixel art games. Multiple vendor-prefixed values are applied in sequence to ensure
                 * cross-browser compatibility, including Firefox (`-moz-crisp-edges`), Opera (`-o-crisp-edges`),
                 * WebKit (`-webkit-optimize-contrast`), and Internet Explorer (`msInterpolationMode: nearest-neighbor`).
                 * @param canvas The canvas object to have the style set on.
                 * @returns The canvas.
                 */
                function setCrisp(canvas: HTMLCanvasElement): HTMLCanvasElement;

                /**
                 * Sets the CSS `image-rendering` property on the given canvas to `auto`, restoring the default
                 * browser behavior. This allows the browser to apply smooth (typically bicubic) interpolation
                 * when scaling the canvas, which produces softer edges and is better suited to high-resolution
                 * textures or non-pixel-art content. Also sets the IE-specific `msInterpolationMode` to `bicubic`.
                 * @param canvas The canvas object to have the style set on.
                 * @returns The canvas.
                 */
                function setBicubic(canvas: HTMLCanvasElement): HTMLCanvasElement;

            }

            /**
             * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.
             * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,
             * which is useless for the Phaser renderer.
             * 
             * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.
             * Which means all instances of Phaser Games on the same page can share the one single pool.
             */
            namespace CanvasPool {
                /**
                 * Creates a new Canvas DOM element, or pulls one from the pool if free.
                 * @param parent The parent of the Canvas object.
                 * @param width The width of the Canvas. Default 1.
                 * @param height The height of the Canvas. Default 1.
                 * @param canvasType The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. Default Phaser.CANVAS.
                 * @param selfParent Use the generated Canvas element as the parent? Default false.
                 * @returns The canvas element that was created or pulled from the pool.
                 */
                function create(parent: any, width?: number, height?: number, canvasType?: number, selfParent?: boolean): HTMLCanvasElement;

                /**
                 * Creates a new 2D Canvas DOM element, or pulls one from the pool if free.
                 * 
                 * This is a convenience wrapper around `create` that forces `canvasType` to `Phaser.CANVAS`,
                 * ensuring the returned canvas is always intended for use with a 2D rendering context.
                 * @param parent The parent of the Canvas object.
                 * @param width The width of the Canvas. Default 1.
                 * @param height The height of the Canvas. Default 1.
                 * @returns The canvas element that was created or pulled from the pool.
                 */
                function create2D(parent: any, width?: number, height?: number): HTMLCanvasElement;

                /**
                 * Creates a new WebGL Canvas DOM element.
                 * 
                 * This is a convenience wrapper around `create` that forces `canvasType` to `Phaser.WEBGL`.
                 * WebGL canvases are never added to the pool, because once a WebGL context's options are set
                 * they cannot be changed, making pooling unsuitable for them.
                 * @param parent The parent of the Canvas object.
                 * @param width The width of the Canvas. Default 1.
                 * @param height The height of the Canvas. Default 1.
                 * @returns The created WebGL canvas.
                 */
                function createWebGL(parent: any, width?: number, height?: number): HTMLCanvasElement;

                /**
                 * Gets the first free canvas container from the pool.
                 * @param canvasType The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`. Default Phaser.CANVAS.
                 * @returns The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.
                 */
                function first(canvasType?: number): HTMLCanvasElement;

                /**
                 * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.
                 * The canvas has its width and height set to 1, and its parent attribute nulled.
                 * @param parent The canvas or the parent of the canvas to free.
                 */
                function remove(parent: any): void;

                /**
                 * Gets the total number of used canvas elements in the pool.undefined
                 * @returns The number of used canvases.
                 */
                function total(): number;

                /**
                 * Gets the total number of free canvas elements in the pool.undefined
                 * @returns The number of free canvases.
                 */
                function free(): number;

                /**
                 * Disable context smoothing on any new Canvas element created.
                 */
                function disableSmoothing(): void;

                /**
                 * Enable context smoothing on any new Canvas element created.
                 */
                function enableSmoothing(): void;

            }

            /**
             * The Smoothing namespace contains functions for controlling the image smoothing (anti-aliasing)
             * setting on a canvas rendering context. Image smoothing affects how the browser scales images:
             * when enabled, scaled images are blurred to reduce jagged edges; when disabled, pixels are
             * rendered sharply without interpolation. Disabling smoothing is commonly used in games that
             * rely on pixel art, where blurring would distort the intended aesthetic. The functions in this
             * namespace automatically detect and apply the correct vendor-prefixed property for the current
             * browser, supporting `imageSmoothingEnabled` as well as the `webkit`, `ms`, `moz`, and `o` prefixed variants.
             */
            namespace Smoothing {
                /**
                 * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.
                 * @param context The canvas context to check.
                 * @returns The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.
                 */
                function getPrefix(context: CanvasRenderingContext2D | WebGLRenderingContext): string;

                /**
                 * Enables the Image Smoothing property on the given context.
                 * By default browsers have image smoothing enabled, which isn't always what you visually want, especially
                 * when using pixel art in a game. Note that this sets the property on the context itself, so that any image
                 * drawn to the context will be affected. This sets the property across all current browsers but support is
                 * patchy on earlier browsers, especially on mobile.
                 * @param context The context on which to enable smoothing.
                 * @returns The provided context.
                 */
                function enable(context: CanvasRenderingContext2D | WebGLRenderingContext): CanvasRenderingContext2D | WebGLRenderingContext;

                /**
                 * Disables the Image Smoothing property on the given context.
                 * By default browsers have image smoothing enabled, which isn't always what you visually want, especially
                 * when using pixel art in a game. Note that this sets the property on the context itself, so that any image
                 * drawn to the context will be affected. This sets the property across all current browsers but support is
                 * patchy on earlier browsers, especially on mobile.
                 * @param context The context on which to disable smoothing.
                 * @returns The provided context.
                 */
                function disable(context: CanvasRenderingContext2D | WebGLRenderingContext): CanvasRenderingContext2D | WebGLRenderingContext;

                /**
                 * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.
                 * Returns null if no smoothing prefix is available.
                 * @param context The context to check.
                 * @returns `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.
                 */
                function isEnabled(context: CanvasRenderingContext2D | WebGLRenderingContext): boolean | null;

            }

            /**
             * Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.
             * @param canvas The canvas element to have the style applied to.
             * @param value The touch action value to set on the canvas. Set to `none` to disable touch actions. Default 'none'.
             * @returns The canvas element.
             */
            function TouchAction(canvas: HTMLCanvasElement, value?: string): HTMLCanvasElement;

            /**
             * Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.
             * @param canvas The canvas element to have the style applied to.
             * @param value The user-select value to set on the canvas. Set to `none` to disable default browser text selection and touch callouts. Default 'none'.
             * @returns The canvas element.
             */
            function UserSelect(canvas: HTMLCanvasElement, value?: string): HTMLCanvasElement;

        }

        namespace Color {
            namespace Interpolate {
                /**
                 * Interpolates between the two given RGB color values over the length supplied.
                 * @param r1 Red value.
                 * @param g1 Green value.
                 * @param b1 Blue value.
                 * @param r2 Red value.
                 * @param g2 Green value.
                 * @param b2 Blue value.
                 * @param length Distance to interpolate over. Default 100.
                 * @param index Index to start from. Default 0.
                 * @returns An object containing the interpolated color values.
                 */
                function RGBWithRGB(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, length?: number, index?: number): Phaser.Types.Display.ColorObject;

                /**
                 * Interpolates between the two given HSV color ranges over the length supplied.
                 * The `sign` parameter controls the direction of hue interpolation: 0 finds the
                 * nearest path, a positive value always increases hue, and a negative value always
                 * decreases hue.
                 * @param h1 Hue of the first color (0 to 1).
                 * @param s1 Saturation of the first color (0 to 1).
                 * @param v1 Value (brightness) of the first color (0 to 1).
                 * @param h2 Hue of the second color (0 to 1).
                 * @param s2 Saturation of the second color (0 to 1).
                 * @param v2 Value (brightness) of the second color (0 to 1).
                 * @param length Distance to interpolate over. Default 100.
                 * @param index Index to start from. Default 0.
                 * @param sign Hue interpolation direction. 0 = nearest, positive = always increase, negative = always decrease. Default 0.
                 * @returns An object containing the interpolated color values.
                 */
                function HSVWithHSV(h1: number, s1: number, v1: number, h2: number, s2: number, v2: number, length?: number, index?: number, sign?: number): Phaser.Types.Display.ColorObject;

                /**
                 * Interpolates between the two given color objects over the length supplied.
                 * @param color1 The first Color object.
                 * @param color2 The second Color object.
                 * @param length Distance to interpolate over. Default 100.
                 * @param index Index to start from. Default 0.
                 * @param hsv Whether to interpolate in HSV. Default false.
                 * @param hsvSign Preferred direction for HSV interpolation. 0 is nearest, negative always decreases hue, positive always increases hue. Default 0.
                 * @returns An object containing the interpolated color values.
                 */
                function ColorWithColor(color1: Phaser.Display.Color, color2: Phaser.Display.Color, length?: number, index?: number, hsv?: boolean, hsvSign?: number): Phaser.Types.Display.ColorObject;

                /**
                 * Interpolates between the Color object and color values over the length supplied.
                 * @param color The Color object.
                 * @param r Red value.
                 * @param g Green value.
                 * @param b Blue value.
                 * @param length Distance to interpolate over. Default 100.
                 * @param index Index to start from. Default 0.
                 * @returns An object containing the interpolated color values.
                 */
                function ColorWithRGB(color: Phaser.Display.Color, r: number, g: number, b: number, length?: number, index?: number): Phaser.Types.Display.ColorObject;

            }

        }

        /**
         * A mutable color representation that stores RGBA values (0-255 range) with automatic conversion
         * to WebGL-compatible normalized floats (0-1), HSV color space, CSS rgba strings, and packed
         * 24/32-bit integer formats. Provides methods for color manipulation including saturation,
         * lightness, brightness adjustments, grayscale, and randomization. Supports construction from
         * RGB integers, hex strings, HSV values, or color objects. Used throughout Phaser for tinting,
         * effects, and rendering.
         */
        class Color {
            /**
             * 
             * @param red The red color value. A number between 0 and 255. Default 0.
             * @param green The green color value. A number between 0 and 255. Default 0.
             * @param blue The blue color value. A number between 0 and 255. Default 0.
             * @param alpha The alpha value. A number between 0 and 255. Default 255.
             */
            constructor(red?: number, green?: number, blue?: number, alpha?: number);

            /**
             * An array containing the RGBA color components in WebGL-compatible normalized float format,
             * stored as `[red, green, blue, alpha]` with each value in the range 0 to 1.
             */
            gl: number[];

            /**
             * Sets this color to be transparent. Sets all values to zero.undefined
             * @returns This Color object.
             */
            transparent(): Phaser.Display.Color;

            /**
             * Sets the color of this Color component.
             * @param red The red color value. A number between 0 and 255.
             * @param green The green color value. A number between 0 and 255.
             * @param blue The blue color value. A number between 0 and 255.
             * @param alpha The alpha value. A number between 0 and 255. Default 255.
             * @param updateHSV Update the HSV values after setting the RGB values? Default true.
             * @returns This Color object.
             */
            setTo(red: number, green: number, blue: number, alpha?: number, updateHSV?: boolean): Phaser.Display.Color;

            /**
             * Sets the red, green, blue and alpha GL values of this Color component.
             * @param red The red color value. A number between 0 and 1.
             * @param green The green color value. A number between 0 and 1.
             * @param blue The blue color value. A number between 0 and 1.
             * @param alpha The alpha value. A number between 0 and 1. Default 1.
             * @returns This Color object.
             */
            setGLTo(red: number, green: number, blue: number, alpha?: number): Phaser.Display.Color;

            /**
             * Sets the color based on the color object given.
             * @param color An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255.
             * @returns This Color object.
             */
            setFromRGB(color: Phaser.Types.Display.InputColorObject): Phaser.Display.Color;

            /**
             * Sets the color based on the hue, saturation and value (HSV) components given.
             * @param h The hue, in the range 0 - 1. This is the base color.
             * @param s The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.
             * @param v The value, in the range 0 - 1. This controls how dark the color is. Where 1 is as bright as possible and 0 is black.
             * @returns This Color object.
             */
            setFromHSV(h: number, s: number, v: number): Phaser.Display.Color;

            /**
             * Returns a new Color component using the values from this one.undefined
             * @returns A new Color object.
             */
            clone(): Phaser.Display.Color;

            /**
             * Sets this Color object to be grayscaled based on the shade value given.
             * @param shade A value between 0 and 255.
             * @returns This Color object.
             */
            gray(shade: number): Phaser.Display.Color;

            /**
             * Sets this Color object to be a random color between the `min` and `max` values given.
             * @param min The minimum random color value. Between 0 and 255. Default 0.
             * @param max The maximum random color value. Between 0 and 255. Default 255.
             * @returns This Color object.
             */
            random(min?: number, max?: number): Phaser.Display.Color;

            /**
             * Sets this Color object to be a random grayscale color between the `min` and `max` values given.
             * @param min The minimum random color value. Between 0 and 255. Default 0.
             * @param max The maximum random color value. Between 0 and 255. Default 255.
             * @returns This Color object.
             */
            randomGray(min?: number, max?: number): Phaser.Display.Color;

            /**
             * Increase the saturation of this Color by the percentage amount given.
             * The saturation is the amount of the base color in the hue.
             * @param amount The percentage amount to change this color by. A value between 0 and 100.
             * @returns This Color object.
             */
            saturate(amount: number): Phaser.Display.Color;

            /**
             * Decrease the saturation of this Color by the percentage amount given.
             * The saturation is the amount of the base color in the hue.
             * @param amount The percentage amount to change this color by. A value between 0 and 100.
             * @returns This Color object.
             */
            desaturate(amount: number): Phaser.Display.Color;

            /**
             * Increase the lightness of this Color by the percentage amount given.
             * @param amount The percentage amount to change this color by. A value between 0 and 100.
             * @returns This Color object.
             */
            lighten(amount: number): Phaser.Display.Color;

            /**
             * Decrease the lightness of this Color by the percentage amount given.
             * @param amount The percentage amount to change this color by. A value between 0 and 100.
             * @returns This Color object.
             */
            darken(amount: number): Phaser.Display.Color;

            /**
             * Brighten this Color by the percentage amount given.
             * @param amount The percentage amount to change this color by. A value between 0 and 100.
             * @returns This Color object.
             */
            brighten(amount: number): Phaser.Display.Color;

            /**
             * The packed 24-bit RGB integer representation of this color, not including the alpha channel.
             */
            readonly color: number;

            /**
             * The packed 32-bit RGBA integer representation of this color, including the alpha channel.
             */
            readonly color32: number;

            /**
             * The color of this Color object as a CSS-compatible `rgba()` string, suitable for use with Canvas 2D or HTML elements.
             */
            readonly rgba: string;

            /**
             * The red color value, normalized to the range 0 to 1.
             */
            redGL: number;

            /**
             * The green color value, normalized to the range 0 to 1.
             */
            greenGL: number;

            /**
             * The blue color value, normalized to the range 0 to 1.
             */
            blueGL: number;

            /**
             * The alpha color value, normalized to the range 0 to 1.
             */
            alphaGL: number;

            /**
             * The red color value, in the range 0 to 255.
             */
            red: number;

            /**
             * The green color value, in the range 0 to 255.
             */
            green: number;

            /**
             * The blue color value, in the range 0 to 255.
             */
            blue: number;

            /**
             * The alpha color value, in the range 0 to 255.
             */
            alpha: number;

            /**
             * The hue color value. A number between 0 and 1.
             * This is the base color.
             */
            h: number;

            /**
             * The saturation color value. A number between 0 and 1.
             * This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.
             */
            s: number;

            /**
             * The value (brightness) component of this color in the HSV color space. A number between 0 and 1,
             * where 1 is fully bright and 0 is black.
             */
            v: number;

            /**
             * Returns an array of Color Objects representing a full color spectrum.
             * 
             * The spectrum colors cycle through the hue wheel in the order: red, yellow, green, cyan, blue, violet, and back to red.
             * 
             * By default this function will return an array with 1024 elements.
             * 
             * However, you can reduce this to a smaller quantity if needed, by specifying the `limit` parameter.
             * When a limit smaller than 1024 is given, the colors are sampled evenly across the full spectrum so
             * the hue distribution remains uniform regardless of the array size.
             * @param limit How many colors should be returned? The maximum is 1024 but you can set a smaller quantity if required. Default 1024.
             * @returns An array containing `limit` parameter number of elements, where each contains a Color Object.
             */
            static ColorSpectrum(limit?: number): Phaser.Types.Display.ColorObject[];

            /**
             * Converts the given color value into an object containing r, g, b and a properties.
             * 
             * The color value can be a 24-bit RGB integer (e.g. `0xRRGGBB`) or a 32-bit ARGB integer
             * (e.g. `0xAARRGGBB`). If the value is 24-bit (i.e. does not exceed `0xFFFFFF`), the alpha
             * component of the returned object defaults to 255 (fully opaque). Otherwise, the alpha is
             * extracted from the upper 8 bits of the value.
             * @param color A 24-bit RGB or 32-bit ARGB color integer, optionally including an alpha component in the most-significant byte.
             * @returns An object containing the parsed color values.
             */
            static ColorToRGBA(color: number): Phaser.Types.Display.ColorObject;

            /**
             * Returns a string containing a hex representation of the given color component.
             * @param color The color channel to get the hex value for, must be a value between 0 and 255.
             * @returns A string of length 2 characters, i.e. 255 = ff, 100 = 64.
             */
            static ComponentToHex(color: number): string;

            /**
             * Packs three separate red, green, and blue color component values into a single 24-bit integer in the format 0xRRGGBB.
             * @param red The red color value. A number between 0 and 255.
             * @param green The green color value. A number between 0 and 255.
             * @param blue The blue color value. A number between 0 and 255.
             * @returns The packed color value as a 24-bit integer in the format 0xRRGGBB.
             */
            static GetColor(red: number, green: number, blue: number): number;

            /**
             * Packs four ARGB component values (red, green, blue, and alpha) into a single 32-bit integer in ARGB format.
             * @param red The red color value. A number between 0 and 255.
             * @param green The green color value. A number between 0 and 255.
             * @param blue The blue color value. A number between 0 and 255.
             * @param alpha The alpha color value. A number between 0 and 255.
             * @returns The packed 32-bit ARGB color value.
             */
            static GetColor32(red: number, green: number, blue: number, alpha: number): number;

            /**
             * Converts HSL (hue, saturation and lightness) values to a Phaser Color object.
             * 
             * All three input values should be in the range 0 to 1. If the saturation is 0
             * the color is treated as achromatic (greyscale). Otherwise the standard HSL-to-RGB
             * algorithm is applied, using the lightness value to derive the intermediate q and p
             * coefficients before delegating each channel to `HueToComponent`.
             * @param h The hue value in the range 0 to 1.
             * @param s The saturation value in the range 0 to 1.
             * @param l The lightness value in the range 0 to 1.
             * @param color An optional Color object to populate with the converted values. If not provided, a new Color object is created and returned.
             * @returns The Color object populated with the RGB values derived from the given h, s and l inputs. This is either the `color` argument (if provided) or a newly created Color object.
             */
            static HSLToColor(h: number, s: number, l: number, color?: Phaser.Display.Color): Phaser.Display.Color;

            /**
             * Generates an HSV color wheel as an array of 360 ColorObject entries, one for each degree of hue from 0 to 359.
             * @param s The saturation, in the range 0 - 1. Default 1.
             * @param v The value, in the range 0 - 1. Default 1.
             * @returns An array of 360 ColorObject elements, each representing the RGB color at that hue step of the HSV color wheel.
             */
            static HSVColorWheel(s?: number, v?: number): Phaser.Types.Display.ColorObject[];

            /**
             * Converts a HSV (hue, saturation and value) color set to RGB.
             * 
             * Conversion formula from https://en.wikipedia.org/wiki/HSL_and_HSV
             * 
             * Assumes HSV values are contained in the set [0, 1].
             * @param h The hue, in the range 0 - 1. This is the base color.
             * @param s The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you a greyscale color.
             * @param v The value, in the range 0 - 1. This controls how bright the color is, where 1 is as bright as possible and 0 is black.
             * @param out A Color object to store the results in. If not given a new ColorObject will be created.
             * @returns An object with the red, green and blue values set in the r, g and b properties.
             */
            static HSVToRGB(h: number, s: number, v: number, out?: Phaser.Types.Display.ColorObject | Phaser.Display.Color): Phaser.Types.Display.ColorObject | Phaser.Display.Color;

            /**
             * Converts a hex string into a Phaser Color object.
             * 
             * The hex string can be supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed.
             * 
             * An alpha channel is _not_ supported.
             * @param hex The hex color value to convert, such as `#0033ff` or the short-hand format: `#03f`.
             * @param color The color where the new color will be stored. If not defined, a new color object is returned.
             * @returns A Color object populated by the values of the given string.
             */
            static HexStringToColor(hex: string, color?: Phaser.Display.Color): Phaser.Display.Color;

            /**
             * Calculates a single RGB channel value from a hue offset and the two intermediate
             * lightness values used during HSL to RGB conversion. Call this function once for each
             * channel (red, green, and blue), passing the appropriate hue offset each time.
             * Based on code by Michael Jackson (https://github.com/mjijackson)
             * @param p The first intermediate value derived from the lightness during HSL to RGB conversion.
             * @param q The second intermediate value derived from the lightness and saturation during HSL to RGB conversion.
             * @param t The hue offset for the color channel being calculated (red, green, or blue).
             * @returns The RGB channel value for the given hue offset, in the range 0 to 1.
             */
            static HueToComponent(p: number, q: number, t: number): number;

            /**
             * Converts the given color value into an instance of a Color object.
             * @param input The 32-bit integer color value to convert, such as a hex value like `0xff0000` for red.
             * @param color An optional Color object to store the result in. If not provided, a new Color object is created and returned.
             * @returns A Color object containing the red, green, blue, and alpha components extracted from the given integer.
             */
            static IntegerToColor(input: number, color?: Phaser.Display.Color): Phaser.Display.Color;

            /**
             * Return the component parts of a color as an Object with the properties alpha, red, green, blue.
             * 
             * If the color value includes an alpha component (0xAARRGGBB), it is extracted and set in the `a` property.
             * Otherwise, alpha defaults to 255 (fully opaque).
             * @param color The color value to convert into a Color object.
             * @returns An object with the alpha, red, green, and blue values set in the a, r, g, and b properties.
             */
            static IntegerToRGB(color: number): Phaser.Types.Display.ColorObject;

            /**
             * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance.
             * @param input An object containing `r`, `g`, `b` and `a` properties in the range 0 to 255.
             * @param color The color where the new color will be stored. If not defined, a new color object is returned.
             * @returns A Color object.
             */
            static ObjectToColor(input: Phaser.Types.Display.InputColorObject, color?: Phaser.Display.Color): Phaser.Display.Color;

            /**
             * Converts a CSS 'web' string into a Phaser Color object.
             * 
             * The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1].
             * @param rgb The CSS format color string, using the `rgb` or `rgba` format.
             * @param color An optional Color object to populate with the parsed values. If not provided, a new Color object is created and returned.
             * @returns The Color object populated with the parsed RGB or RGBA values.
             */
            static RGBStringToColor(rgb: string, color?: Phaser.Display.Color): Phaser.Display.Color;

            /**
             * Converts an RGB color value to HSV (hue, saturation and value).
             * Conversion formula from http://en.wikipedia.org/wiki/HSL_color_space.
             * Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1].
             * Based on code by Michael Jackson (https://github.com/mjijackson)
             * @param r The red color value. A number between 0 and 255.
             * @param g The green color value. A number between 0 and 255.
             * @param b The blue color value. A number between 0 and 255.
             * @param out An object to store the color values in. If not given an HSV Color Object will be created.
             * @returns An object with the properties `h`, `s` and `v` set.
             */
            static RGBToHSV(r: number, g: number, b: number, out?: Phaser.Types.Display.HSVColorObject | Phaser.Display.Color): Phaser.Types.Display.HSVColorObject | Phaser.Display.Color;

            /**
             * Converts the given red, green, blue, and alpha color component values into a hex color string.
             * 
             * When using the `#` prefix the result is a 6-character CSS-compatible hex string in `#rrggbb` format.
             * The alpha value is not included in this format.
             * 
             * When using the `0x` prefix the result is an 8-character ARGB hex string in `0xaarrggbb` format,
             * which includes the alpha component as the most significant byte.
             * @param r The red color value. A number between 0 and 255.
             * @param g The green color value. A number between 0 and 255.
             * @param b The blue color value. A number between 0 and 255.
             * @param a The alpha value. A number between 0 and 255. Default 255.
             * @param prefix The prefix of the string. Either `#` or `0x`. Default #.
             * @returns A hex color string in either `#rrggbb` or `0xaarrggbb` format, depending on the prefix.
             */
            static RGBToString(r: number, g: number, b: number, a?: number, prefix?: string): string;

            /**
             * Creates a new Color object where the r, g, and b values have been set to random values
             * based on the given min max values.
             * @param min The minimum value to set the random range from (between 0 and 255) Default 0.
             * @param max The maximum value to set the random range from (between 0 and 255) Default 255.
             * @returns A Color object.
             */
            static RandomRGB(min?: number, max?: number): Phaser.Display.Color;

            /**
             * Converts the given source color value into an instance of a Color class.
             * The value can be a string (either prefixed with `rgb` for an RGB color string, or a hex color string),
             * a number representing a packed RGB integer, or a plain object with `r`, `g`, and `b` properties.
             * @param input The source color value to convert.
             * @param color An existing Color object to store the result in. If not provided, a new Color object is created and returned.
             * @returns A Color object containing the converted color value.
             */
            static ValueToColor(input: string | number | Phaser.Types.Display.InputColorObject, color?: Phaser.Display.Color): Phaser.Display.Color;

        }

        namespace Masks {
            /**
             * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect
             * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only
             * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).
             * 
             * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)
             * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed
             * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and
             * alpha of the pixel from the Geometry Mask do not matter.
             * 
             * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.
             * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility
             * of any masked objects), whereas moving or transforming a masked object will not affect the mask.
             * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed
             * in front of all masked objects which has its own visual properties and, naturally, respects the camera's
             * visual properties, but isn't affected by and doesn't follow the masked objects by itself.
             * 
             * GeometryMask is only supported in the Canvas Renderer.
             * If you want to use geometry to mask objects in WebGL,
             * see {@link Phaser.GameObjects.Components.FilterList#addMask}.
             */
            class GeometryMask {
                /**
                 * 
                 * @param scene This parameter is not used.
                 * @param graphicsGeometry The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.
                 */
                constructor(scene: Phaser.Scene, graphicsGeometry: Phaser.GameObjects.Graphics);

                /**
                 * The Graphics object which describes the Geometry Mask.
                 */
                geometryMask: Phaser.GameObjects.Graphics;

                /**
                 * Sets a new Graphics object for the Geometry Mask.
                 * @param graphicsGeometry The Graphics object which will be used for the Geometry Mask.
                 * @returns This Geometry Mask
                 */
                setShape(graphicsGeometry: Phaser.GameObjects.Graphics): this;

                /**
                 * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.
                 * @param renderer The Canvas Renderer instance to set the clipping path on.
                 * @param mask The Game Object being rendered.
                 * @param camera The camera the Game Object is being rendered through.
                 */
                preRenderCanvas(renderer: Phaser.Renderer.Canvas.CanvasRenderer, mask: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void;

                /**
                 * Restores the canvas context's previous clipping path, thus turning off the mask for it.
                 * @param renderer The Canvas Renderer instance being restored.
                 */
                postRenderCanvas(renderer: Phaser.Renderer.Canvas.CanvasRenderer): void;

                /**
                 * Destroys this GeometryMask and nulls any references it holds.
                 * 
                 * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,
                 * so be sure to call `clearMask` on any Game Object using it, before destroying it.
                 */
                destroy(): void;

            }

        }

        /**
         * A BaseShader is a small resource class that contains GLSL code for a shader.
         * 
         * It contains the key of the shader, the source code, and optional metadata.
         * Phaser does not enforce a specific shader type: the source could be a
         * fragment shader, a vertex shader, or even an incomplete snippet of GLSL.
         * It is stored as raw source code and may be retrieved and compiled as you wish.
         * These keys can be used by `Phaser.GameObjects.Shader` and
         * `Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader`.
         * 
         * BaseShaders are stored in the Shader Cache, available in a Scene via `this.cache.shaders` and are referenced
         * by a unique key-based string. Retrieve them via `this.cache.shaders.get(key)`.
         * 
         * BaseShaders are created automatically by the GLSL File Loader when loading an external shader resource.
         * They can also be created at runtime, allowing you to use dynamically generated shader source code.
         */
        class BaseShader {
            /**
             * 
             * @param key The key of this shader. Must be unique within the shader cache.
             * @param glsl The GLSL source code for the shader.
             * @param metadata Additional metadata for this shader code.
             */
            constructor(key: string, glsl: string, metadata?: object);

            /**
             * The key of this shader code,
             * unique within the shader cache of this Phaser game instance.
             */
            key: string;

            /**
             * GLSL source code for a shader.
             * The use of this code is not specified by Phaser.
             * You can add metadata to further describe its purpose.
             */
            glsl: string;

            /**
             * Additional metadata for this shader. This is not used by Phaser,
             * but it may be used by your game code or external tools.
             * For example, you could add properties that describe
             * the shader's purpose, author, version, etc.
             */
            metadata: object;

        }

    }

    namespace DOM {
        /**
         * Adds the given element to the DOM. If a parent is provided, the element is added as a child of the parent element, resolved either by
         * passing a string ID to `getElementById` or by using the HTMLElement directly. If no parent is given and the element already has an
         * existing `parentElement`, or if `parent` is explicitly `null`, the element is returned immediately without modification. If no valid
         * target parent can be resolved, the element is appended to `document.body` as a fallback.
         * @param element The element to be added to the DOM. Usually a Canvas object.
         * @param parent The parent in which to add the element. Can be a string which is passed to `getElementById` or an actual DOM object.
         * @returns The element that was passed to this function.
         */
        function AddToDOM(element: HTMLElement, parent?: string | HTMLElement): HTMLElement;

        /**
         * Creates a DOM container div element for use with DOM Game Objects.
         * 
         * The container is an absolutely positioned div that overlays the game canvas,
         * matching its dimensions, and is added to the game's parent element.
         * It has pointer events set according to the game configuration and
         * serves as the parent for any DOM Element Game Objects added to a Scene.
         * 
         * This function is called automatically during game boot if the game config
         * has both a `parent` element and `domCreateContainer` set to `true`.
         * @param game The Phaser Game instance to create the DOM container for.
         */
        function CreateDOMContainer(game: Phaser.Game): void;

        /**
         * Inspects the readyState of the document. If the document is already complete or interactive, it invokes the given
         * callback immediately. If not, it registers event listeners to detect when the document becomes ready. On Cordova
         * environments it listens for the `deviceready` event; otherwise it listens for `DOMContentLoaded` and the window
         * `load` event, invoking the callback whichever fires first. If the document body is not yet available, it falls
         * back to a short timeout before invoking the callback.
         * Called automatically by the Phaser.Game instance. Should not usually be accessed directly.
         * @param callback The callback to be invoked when the device is ready and the DOM content is loaded.
         */
        function DOMContentLoaded(callback: ContentLoadedCallback): void;

        /**
         * Attempts to determine the document inner height across iOS and standard devices.
         * On non-iOS devices this simply returns `window.innerHeight`. On iOS, Safari's dynamic
         * browser chrome (such as the address bar appearing or hiding on scroll) can cause
         * `window.innerHeight` to report an inaccurate value. To work around this, a temporary
         * fixed-position element sized to `100vh` is injected into the DOM, its measured height
         * is used instead, and the element is immediately removed. The result is also adjusted
         * for landscape orientation using `window.orientation`.
         * Based on code by @tylerjpeterson
         * @param iOS Is this running on iOS?
         * @returns The inner height of the viewport, in pixels.
         */
        function GetInnerHeight(iOS: boolean): number;

        /**
         * Attempts to determine the screen orientation using a series of browser APIs,
         * falling back to comparing the viewport dimensions if none are available.
         * 
         * It checks, in order: the Screen Orientation API (`screen.orientation`,
         * `screen.mozOrientation`, `screen.msOrientation`), the legacy `window.orientation`
         * property (used on iOS), the `window.matchMedia` API, and finally a simple
         * width-versus-height comparison as a last resort.
         * @param width The width of the viewport.
         * @param height The height of the viewport.
         * @returns Either a `Phaser.Scale.PORTRAIT` or `Phaser.Scale.LANDSCAPE` string constant, or the raw orientation type string returned by the Screen Orientation API.
         */
        function GetScreenOrientation(width: number, height: number): string;

        /**
         * Attempts to get the target DOM element based on the given value, which can be either
         * a string, in which case it will be looked-up by ID, or an element node. If nothing
         * can be found it will return a reference to the document.body.
         * @param element The DOM element to look-up. Can be either a string, in which case it is used as an element ID to look up via `document.getElementById`, or a direct reference to an existing HTMLElement node.
         * @returns The DOM element matching the given ID or node reference, or `document.body` if no valid target was found.
         */
        function GetTarget(element: HTMLElement): HTMLElement;

        /**
         * Takes the given data string and parses it as XML.
         * First tries to use the window.DOMParser and reverts to the Microsoft.XMLDOM if that fails.
         * The parsed XML object is returned, or `null` if there was an error while parsing the data.
         * @param data The XML source stored in a string.
         * @returns The parsed XML data, or `null` if the data could not be parsed.
         */
        function ParseXML(data: string): XMLDocument | null;

        /**
         * Attempts to remove the element from its parentNode in the DOM.
         * @param element The DOM element to remove from its parent node.
         */
        function RemoveFromDOM(element: HTMLElement): void;

        /**
         * Abstracts away the use of `requestAnimationFrame` or `setTimeout` for the core game update loop,
         * providing a unified interface regardless of which mechanism is in use.
         * 
         * When `requestAnimationFrame` is available and not overridden, it is used to drive the game loop,
         * which ties updates to the display refresh rate and pauses automatically when the tab is hidden.
         * If `forceSetTimeOut` is enabled in the Game Config, `setTimeout` is used instead, which runs
         * at a fixed interval regardless of visibility or display sync.
         * 
         * This class is instantiated and managed automatically by the Phaser.Game instance.
         */
        class RequestAnimationFrame {
            /**
             * True if RequestAnimationFrame is running, otherwise false.
             */
            isRunning: boolean;

            /**
             * The callback to be invoked each step.
             */
            callback: FrameRequestCallback;

            /**
             * True if the step is using setTimeout instead of RAF.
             */
            isSetTimeOut: boolean;

            /**
             * The setTimeout or RAF callback ID used when canceling them.
             */
            timeOutID: number | null;

            /**
             * The delay, in milliseconds, between each step when using setTimeout.
             */
            delay: number;

            /**
             * The RAF step function.
             * 
             * Invokes the callback and schedules another call to requestAnimationFrame.
             */
            step: FrameRequestCallback;

            /**
             * The SetTimeout step function.
             * 
             * Invokes the callback and schedules another call to setTimeout.
             */
            stepTimeout: Function;

            /**
             * Starts the requestAnimationFrame or setTimeout process running.
             * @param callback The callback to invoke each step.
             * @param forceSetTimeOut Should it use SetTimeout, even if RAF is available?
             * @param delay The delay, in milliseconds, between each step when using setTimeout.
             */
            start(callback: FrameRequestCallback, forceSetTimeOut: boolean, delay: number): void;

            /**
             * Stops the requestAnimationFrame or setTimeout from running.
             */
            stop(): void;

            /**
             * Stops the step from running and clears the callback reference.
             */
            destroy(): void;

        }

    }

    namespace Events {
        /**
         * EventEmitter is a Scene Systems plugin compatible wrapper around the `eventemitter3` library,
         * providing a full-featured event emitter used throughout Phaser for event-driven communication
         * between game objects, scenes, and systems.
         * 
         * Every Scene has an instance of this class available via `scene.events`, and many Phaser objects
         * extend or embed it to dispatch and receive events. It supports persistent listeners via `on` /
         * `addListener`, one-time listeners that auto-remove after firing via `once`, and listener removal
         * via `off` / `removeListener`.
         * 
         * You can also instantiate it directly when you need a standalone event bus within your own code.
         */
        class EventEmitter {
            /**
             * Removes all listeners from this EventEmitter. This method is called automatically
             * by the Scene Systems when the parent Scene shuts down, ensuring that all event
             * bindings are cleared and no stale references remain.
             */
            shutdown(): void;

            /**
             * Removes all listeners from this EventEmitter and prepares it for garbage collection.
             * This method is called automatically when the parent object is destroyed and should
             * not be called directly unless you are tearing down the emitter manually.
             */
            destroy(): void;

            /**
             * Return an array listing the events for which the emitter has registered listeners.undefined
             * @returns undefined
             */
            eventNames(): (string|symbol)[];

            /**
             * Return the listeners registered for a given event.
             * @param event The event name.
             * @returns The registered listeners.
             */
            listeners(event: string | symbol): Function[];

            /**
             * Return the number of listeners listening to a given event.
             * @param event The event name.
             * @returns The number of listeners.
             */
            listenerCount(event: string | symbol): number;

            /**
             * Calls each of the listeners registered for a given event.
             * @param event The event name.
             * @param args Additional arguments that will be passed to the event handler.
             * @returns `true` if the event had listeners, else `false`.
             */
            emit(event: string | symbol, ...args: any[]): boolean;

            /**
             * Add a listener for a given event.
             * @param event The event name.
             * @param fn The listener function.
             * @param context The context to invoke the listener with. Default this.
             * @returns `this`.
             */
            on(event: string | symbol, fn: Function, context?: any): this;

            /**
             * Add a listener for a given event.
             * @param event The event name.
             * @param fn The listener function.
             * @param context The context to invoke the listener with. Default this.
             * @returns `this`.
             */
            addListener(event: string | symbol, fn: Function, context?: any): this;

            /**
             * Add a one-time listener for a given event. The listener is automatically removed
             * the first time the event is emitted, so it will never be called more than once.
             * @param event The event name.
             * @param fn The listener function.
             * @param context The context to invoke the listener with. Default this.
             * @returns `this`.
             */
            once(event: string | symbol, fn: Function, context?: any): this;

            /**
             * Remove the listeners of a given event.
             * @param event The event name.
             * @param fn Only remove the listeners that match this function.
             * @param context Only remove the listeners that have this context.
             * @param once Only remove one-time listeners.
             * @returns `this`.
             */
            removeListener(event: string | symbol, fn?: Function, context?: any, once?: boolean): this;

            /**
             * Remove the listeners of a given event.
             * @param event The event name.
             * @param fn Only remove the listeners that match this function.
             * @param context Only remove the listeners that have this context.
             * @param once Only remove one-time listeners.
             * @returns `this`.
             */
            off(event: string | symbol, fn?: Function, context?: any, once?: boolean): this;

            /**
             * Remove all listeners, or those of the specified event.
             * @param event The event name.
             * @returns `this`.
             */
            removeAllListeners(event?: string | symbol): this;

        }

    }

    namespace Filters {
        /**
         * The Barrel Filter Controller.
         * 
         * This filter controller manages the barrel distortion effect for a Camera.
         * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to
         * the view. The amount of the effect can be modified in real-time.
         * 
         * A Barrel effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addBarrel();
         * camera.filters.external.addBarrel();
         * ```
         */
        class Barrel extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param amount The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1. Default 1.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, amount?: number);

            /**
             * The amount of distortion applied to the barrel effect.
             * 
             * A value of 1 applies no distortion. Values above 1 expand the view outward
             * (barrel distortion), while values below 1 pinch the view inward (pincushion
             * distortion). Typically keep this within ±1 of the default value of 1.
             */
            amount: number;

        }

        /**
         * The Blend Filter Controller.
         * 
         * This filter controller manages the blend effect for a Camera.
         * A blend effect allows you to apply another texture to the view
         * using a specific blend mode.
         * This supports blend modes not otherwise available in WebGL.
         * 
         * A Blend effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * camera.filters.internal.addBlend();
         * camera.filters.external.addBlend();
         * ```
         */
        class Blend extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param texture The texture to apply to the view. Default '__WHITE'.
             * @param blendMode The blend mode to apply to the view. Default Phaser.BlendModes.NORMAL.
             * @param amount The amount of the blend effect to apply to the view. At 0, the original image is preserved. At 1, the blend texture is fully applied. The expected range is 0 to 1, but you can go outside that range for different effects. Default 1.
             * @param color The color to apply to the blend texture. Each value corresponds to a color channel in RGBA. The expected range is 0 to 1, but you can go outside that range for different effects. Default [1, 1, 1, 1].
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, texture?: string, blendMode?: Phaser.BlendModes, amount?: number, color?: number[]);

            /**
             * The underlying texture used for the blend.
             */
            glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * The blend mode to apply to the view.
             * This supports blend modes not otherwise available in WebGL.
             */
            blendMode: Phaser.BlendModes;

            /**
             * The amount of the blend effect to apply to the view.
             * At 0, the original image is preserved. At 1, the blend texture is fully applied.
             */
            amount: number;

            /**
             * The color to apply to the blend texture.
             * Each value corresponds to a color channel in RGBA.
             * The expected range is 0 to 1, but you can go outside that range for different effects.
             */
            color: number[];

            /**
             * Sets the texture used for the blend.
             * @param texture The unique string-based key of the texture to use for the blend, which must exist in the Texture Manager. Default '__WHITE'.
             * @returns This Filter Controller.
             */
            setTexture(texture?: string): this;

        }

        /**
         * The Blocky Filter Controller.
         * 
         * This filter controller manages a blocky effect.
         * 
         * The blocky effect works by taking the central pixel of a block of pixels
         * and using it to fill the entire block, creating a pixelated effect.
         * 
         * It reduces the resolution of an image,
         * creating a pixelated or blocky appearance.
         * This is often used for stylistic purposes, such as pixel art.
         * One technique is to render the game at a higher resolution,
         * scaled up by a factor of N,
         * and then apply the blocky effect at size N.
         * This creates large, visible pixels, suitable for further stylization.
         * The effect can also be used to obscure certain elements within the game,
         * such as during a transition or to censor specific content.
         * 
         * Blocky works best on games with no anti-aliasing,
         * so it can read unfiltered pixel colors from the original image.
         * It preserves the colors of the original art, instead of blending them
         * like the Pixelate filter.
         * 
         * A Blocky effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * camera.filters.internal.addBlocky({ size: 4 });
         * camera.filters.external.addBlocky({ size: { x: 2, y: 4 }, offset: { x: 1, y: 2 } });
         * ```
         */
        class Blocky extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param config The configuration object for the Blocky effect.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, config?: Phaser.Types.Filters.BlockyConfig);

            /**
             * The size of the blocks.
             * You can set the x and y values to any numbers,
             * but the filter will limit them to a minimum of 1.
             */
            size: Phaser.Types.Math.Vector2Like;

            /**
             * The offset of the blocks from the top left corner of the image.
             */
            offset: Phaser.Types.Math.Vector2Like;

        }

        /**
         * The Blur Filter Controller.
         * 
         * This filter controller manages a blur effect.
         * 
         * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,
         * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a
         * smooth blur resembling that of viewing the image through a translucent screen, distinctly different
         * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.
         * 
         * This effect samples across an area. To avoid missing data at the edges,
         * use `controller.setPaddingOverride(null)` to automatically pad game objects,
         * or `camera.getPaddingWrapper(x)` to enlarge a camera.
         * 
         * A Blur effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addBlur();
         * camera.filters.external.addBlur();
         * ```
         */
        class Blur extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param quality The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality. Default 0.
             * @param x The horizontal offset of the blur effect. Default 2.
             * @param y The vertical offset of the blur effect. Default 2.
             * @param strength The strength of the blur effect. Default 1.
             * @param color The color of the blur, as a hex value. Default 0xffffff.
             * @param steps The number of steps to run the blur effect for. This value should always be an integer. Default 4.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, quality?: number, x?: number, y?: number, strength?: number, color?: number, steps?: number);

            /**
             * The quality of the blur effect.
             * 
             * This can be:
             * 
             * 0 for Low Quality
             * 1 for Medium Quality
             * 2 for High Quality
             * 
             * The higher the quality, the more complex the shader used,
             * and the more processing time is spent on the GPU calculating
             * the final blur. This value is used in conjunction with the
             * `steps` value, as one has a direct impact on the other.
             * 
             * Keep this value as low as you can, while still achieving the
             * desired effect you need for your game.
             */
            quality: number;

            /**
             * The horizontal offset of the blur effect. This controls the distance
             * between blur sample points along the x axis. A larger value increases
             * the spread of the blur horizontally.
             */
            x: number;

            /**
             * The vertical offset of the blur effect. This controls the distance
             * between blur sample points along the y axis. A larger value increases
             * the spread of the blur vertically.
             */
            y: number;

            /**
             * The strength of the blur effect. This value is multiplied with the
             * x and y offsets and the number of steps to determine the total blur
             * radius. Increase this to make the blur more pronounced without
             * changing the quality or step count.
             */
            strength: number;

            /**
             * The internal gl color array.
             */
            glcolor: number[];

            /**
             * The number of steps to run the Blur effect for.
             * 
             * This value should always be an integer.
             * 
             * The higher the value, the smoother the blur,
             * but at the cost of exponentially more gl operations.
             * 
             * Keep this to the lowest possible number you can have it, while
             * still looking correct for your game.
             */
            steps: number;

            /**
             * The color of the blur effect, as a packed RGB hex integer (e.g. `0xff0000`
             * for red). This tints the blur samples, allowing colored bloom-style effects.
             * Defaults to white (`0xffffff`), which produces a neutral blur with no tint.
             */
            color: number;

            /**
             * Returns the amount of extra padding, in pixels, that this filter requires when rendering.
             * This accounts for the blur radius extending beyond the original bounds of the
             * filtered Game Object.undefined
             * @returns The padding Rectangle.
             */
            getPadding(): Phaser.Geom.Rectangle;

        }

        /**
         * The Bokeh Filter Controller.
         * 
         * This filter controller manages the bokeh effect for a Camera.
         * 
         * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.
         * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground
         * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering
         * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.
         * 
         * This effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature
         * effect by blurring everything except a small area of the image. This effect is achieved by blurring the
         * top and bottom elements, while keeping the center area in focus.
         * 
         * This effect samples across an area. To avoid missing data at the edges,
         * use `controller.setPaddingOverride(null)` to automatically pad game objects,
         * or `camera.getPaddingWrapper(x)` to enlarge a camera.
         * 
         * A Bokeh effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addBokeh();
         * camera.filters.external.addBokeh();
         * ```
         */
        class Bokeh extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param radius The radius of the bokeh effect. Default 0.5.
             * @param amount The amount of the bokeh effect. Default 1.
             * @param contrast The color contrast of the bokeh effect. Default 0.2.
             * @param isTiltShift Is this a bokeh or Tilt Shift effect? Default false.
             * @param blurX If Tilt Shift, the amount of horizontal blur. Default 1.
             * @param blurY If Tilt Shift, the amount of vertical blur. Default 1.
             * @param strength If Tilt Shift, the strength of the blur. Default 1.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, radius?: number, amount?: number, contrast?: number, isTiltShift?: boolean, blurX?: number, blurY?: number, strength?: number);

            /**
             * The radius of the bokeh effect.
             * 
             * This is a float value, where a radius of 0 will result in no effect being applied,
             * and a radius of 1 will result in a strong bokeh. However, you can exceed this value
             * for even stronger effects.
             */
            radius: number;

            /**
             * The amount of the bokeh effect. This controls how many samples are taken
             * during the blur pass. Higher values produce a denser, more pronounced bokeh
             * at the cost of additional GPU work. This property applies to the standard
             * bokeh effect only; use `strength` to adjust the intensity of a Tilt Shift effect.
             */
            amount: number;

            /**
             * The color contrast of the bokeh effect. This controls how strongly the
             * out-of-focus areas differ in luminance from the in-focus areas. Higher values
             * increase the brightness contrast between the bokeh highlights and their surroundings,
             * making the effect more visually distinct.
             */
            contrast: number;

            /**
             * Is this a Tilt Shift effect or a standard bokeh effect?
             */
            isTiltShift: boolean;

            /**
             * If a Tilt Shift effect this controls the amount of horizontal blur.
             * 
             * Setting this value on a non-Tilt Shift effect will have no effect.
             */
            blurX: number;

            /**
             * If a Tilt Shift effect this controls the amount of vertical blur.
             * 
             * Setting this value on a non-Tilt Shift effect will have no effect.
             */
            blurY: number;

            /**
             * If a Tilt Shift effect this controls the strength of the blur.
             * 
             * Setting this value on a non-Tilt Shift effect will have no effect.
             */
            strength: number;

            /**
             * Returns the amount of extra padding, in pixels, that this filter requires when rendering.
             * The padding accounts for the bokeh effect extending beyond the original bounds
             * of the filtered Camera.undefined
             * @returns The padding Rectangle.
             */
            getPadding(): Phaser.Geom.Rectangle;

        }

        /**
         * The ColorMatrix Filter Controller.
         * 
         * This filter controller manages the color matrix effect for a Camera.
         * 
         * The color matrix effect is a visual technique that involves manipulating the colors of an image
         * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,
         * allowing developers to create various stylistic appearances or mood settings within the game.
         * Common applications include simulating different lighting conditions, applying color filters,
         * or achieving a specific visual style.
         * 
         * A ColorMatrix effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * const cmFilter = camera.filters.internal.addColorMatrix();
         * camera.filters.external.addColorMatrix();
         * 
         * // To set the matrix values:
         * cmFilter.colorMatrix.sepia();
         * ```
         */
        class ColorMatrix extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera);

            /**
             * The color matrix instance for this effect. Use this to apply
             * preset or custom color transformations such as sepia, grayscale,
             * saturation, brightness, hue rotation, and more.
             */
            colorMatrix: Phaser.Display.ColorMatrix;

            /**
             * Destroys this filter, releasing all references and resources.
             */
            destroy(): void;

        }

        /**
         * The CombineColorMatrix Filter controller.
         * 
         * This filter combines color channels from two textures: a base input and a
         * secondary transfer texture. Each source is transformed independently by its
         * own `ColorMatrix` (`colorMatrixSelf` and `colorMatrixTransfer`), and the
         * results are then blended per-channel using configurable addition weights
         * (`additions`) and multiplication weights (`multiplications`). This makes it
         * suitable for a wide range of compositing effects, though its primary use is
         * alpha channel manipulation — for example, using a greyscale transfer texture
         * as a soft mask or applying a brightness-derived alpha to the base image.
         * Use `setupAlphaTransfer` to configure the matrices and weights for common
         * alpha-transfer patterns, or set the `colorMatrixSelf`, `colorMatrixTransfer`,
         * `additions`, and `multiplications` properties directly for custom effects.
         * 
         * A CombineColorMatrix filter is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * camera.filters.internal.addCombineColorMatrix();
         * camera.filters.external.addCombineColorMatrix();
         * ```
         */
        class CombineColorMatrix extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param texture The texture or texture key to use for the transfer texture. Default '__WHITE'.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, texture?: string | Phaser.Textures.Texture);

            /**
             * The transfer texture used to provide extra channels.
             */
            glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * The color matrix which contributes values from the base input.
             */
            colorMatrixSelf: Phaser.Display.ColorMatrix;

            /**
             * The color matrix which contributes values from the transfer texture.
             */
            colorMatrixTransfer: Phaser.Display.ColorMatrix;

            /**
             * Weight of addition for each channel (R, G, B, A).
             * The final output includes values from the self and transfer matrices
             * added together; those values are multiplied by this array.
             * So values of 1 are kept, while values of 0 are discarded.
             * 
             * By default, RGB values are added together in the final output.
             */
            additions: number[];

            /**
             * Weight of multiplication for each channel (R, G, B, A).
             * The final output includes values from the self and transfer matrices
             * multiplied together; those values are multiplied by this array.
             * So values of 1 are kept, while values of 0 are discarded.
             * 
             * By default, alpha values are multiplied together in the final output.
             */
            multiplications: number[];

            /**
             * Set the transfer texture. This is used as an extra channel source,
             * transferring its data into the filtered image.
             * @param texture The texture or texture key to use for the transfer texture.
             * @returns This filter instance.
             */
            setTexture(texture: string | Phaser.Textures.Texture): this;

            /**
             * Resets both color matrices and the `additions` and `multiplications`
             * weighting arrays, then applies a preset configuration for alpha transfer
             * — a common use case for this filter. In the preset, RGB channels are
             * combined by addition and the alpha channel is combined by multiplication.
             * The boolean parameters control which color and brightness-to-alpha
             * transformations are applied to each source before blending.
             * @param colorSelf Whether to keep color from the base image.
             * @param colorTransfer Whether to keep color from the transfer texture.
             * @param brightnessToAlphaSelf Whether to determine the base alpha from the base brightness.
             * @param brightnessToAlphaTransfer Whether to determine the transfer alpha from the transfer brightness.
             * @param brightnessToAlphaInverseSelf Whether to determine the base alpha from the base brightness, inverted. This overrides `brightnessToAlphaSelf`.
             * @param brightnessToAlphaInverseTransfer Whether to determine the transfer alpha from the transfer brightness, inverted. This overrides `brightnessToAlphaTransfer`.
             * @returns This filter instance.
             */
            setupAlphaTransfer(colorSelf?: boolean, colorTransfer?: boolean, brightnessToAlphaSelf?: boolean, brightnessToAlphaTransfer?: boolean, brightnessToAlphaInverseSelf?: boolean, brightnessToAlphaInverseTransfer?: boolean): this;

            /**
             * Destroys this filter, releasing all references and resources.
             */
            destroy(): void;

        }

        /**
         * The base class for a post-processing filter effect applied to a Camera.
         * 
         * Filters are visual effects rendered on top of a Camera's output, such as blur, glow, or color grading.
         * Each filter is managed by a Controller, which holds its configuration and provides padding information to the renderer.
         * 
         * You should not normally create an instance of this class directly, but instead use one of the built-in filters that extend it,
         * such as those found in the `Phaser.Filters` namespace.
         * 
         * You should not use a Controller for more than one Camera.
         * Create a new instance for each Camera that you wish to apply the filter to.
         * If you share Controllers, and destroy one owner, the Controller will be destroyed.
         */
        class Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param renderNode The ID of the RenderNode that this filter uses.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, renderNode: string);

            /**
             * Toggle this boolean to enable or disable this filter,
             * without removing it from and re-adding it to the Camera's filter list.
             */
            active: boolean;

            /**
             * A reference to the Camera that owns this filter.
             */
            camera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The ID of the RenderNode that this filter uses.
             */
            renderNode: string;

            /**
             * Padding override. This is on by default. If this is set,
             * the filter will use this padding instead of calculating it.
             * Prefer using `setPaddingOverride` instead of modifying this directly.
             */
            paddingOverride: Phaser.Geom.Rectangle;

            /**
             * The padding currently being used by this filter.
             * This is read during rendering via `getPadding`, and may be updated by subclass implementations.
             * It is necessary for filters being used in an external list.
             * You should not modify this value directly.
             */
            currentPadding: Phaser.Geom.Rectangle;

            /**
             * If `true`, this filter will be permitted to draw to the base texture.
             * This can be unwanted if, for example, the filter doesn't actually
             * draw anything.
             * 
             * This is an internal flag used by the renderer.
             * You should not modify this value directly.
             */
            readonly allowBaseDraw: boolean;

            /**
             * Whether this filter controller will be destroyed when the FilterList
             * that owns it is destroyed. If you enable this, you must ensure that
             * you clean up the filter controller at an appropriate time.
             * This allows you to reuse a controller for multiple objects;
             * this is not recommended unless you know what you're doing.
             * It tends to work best with external filters.
             */
            ignoreDestroy: boolean;

            /**
             * Returns the raw padding required for this filter.
             * This is typically not what you want to call; use `getPaddingCeil` instead.
             * Values from this method are not rounded, which can cause quality loss.
             * 
             * Override this method when creating a Filter that requires extra room,
             * e.g. a blur or glow effect.undefined
             * @returns The padding required by this filter.
             */
            getPadding(): Phaser.Geom.Rectangle;

            /**
             * Returns the rounded padding required for this filter.
             * 
             * Most filters don't need extra padding,
             * but some may sample beyond the texture boundaries, such as a blur or glow effect.
             * 
             * The bounds are encoded as a Rectangle.
             * To enlarge the bounds, the top and left values should be negative,
             * and the bottom and right values should be positive.
             * 
             * This method calls `getPadding()` to get the raw padding values,
             * and uses `Math.ceil()` to set the values of `paddingOverride`
             * and `currentPadding`.undefined
             * @returns The rounded padding required by this filter.
             */
            getPaddingCeil(): Phaser.Geom.Rectangle;

            /**
             * Sets the padding override.
             * If this is set, the filter will use this padding instead of calculating it.
             * Call `setPaddingOverride(null)` to clear the override.
             * Call `setPaddingOverride()` to set the padding to 0.
             * @param left The left padding. Default 0.
             * @param top The top padding. Default 0.
             * @param right The right padding. Default 0.
             * @param bottom The bottom padding. Default 0.
             */
            setPaddingOverride(left?: number | null, top?: number, right?: number, bottom?: number): void;

            /**
             * Sets the active state of this filter.
             * 
             * A disabled filter will not be used.
             * @param value `true` to enable this filter, or `false` to disable it.
             * @returns This filter instance.
             */
            setActive(value: boolean): this;

            /**
             * Destroys this Controller and nulls any references it holds.
             */
            destroy(): void;

        }

        /**
         * The Displacement Filter Controller.
         * 
         * This Filter controller manages the displacement effect.
         * 
         * The displacement effect is a visual technique that alters the position of pixels in an image
         * or texture based on the values of a displacement map. This effect is used to create the illusion
         * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to
         * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various
         * stylistic appearances.
         * 
         * This effect samples across an area. To avoid missing data at the edges,
         * use `controller.setPaddingOverride(null)` to automatically pad game objects,
         * or `camera.getPaddingWrapper(x)` to enlarge a camera.
         * 
         * A Displacement effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addDisplacement();
         * camera.filters.external.addDisplacement();
         * ```
         */
        class Displacement extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param texture The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager. Default '__WHITE'.
             * @param x The amount of horizontal displacement to apply. A very small float number, such as 0.005. Default 0.005.
             * @param y The amount of vertical displacement to apply. A very small float number, such as 0.005. Default 0.005.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, texture?: string, x?: number, y?: number);

            /**
             * The amount of horizontal displacement to apply.
             * The maximum horizontal displacement in pixels is `x`
             * multiplied by 0.5 times the width of the camera rendering the filter.
             */
            x: number;

            /**
             * The amount of vertical displacement to apply.
             * The maximum vertical displacement in pixels is `y`
             * multiplied by 0.5 times the height of the camera rendering the filter.
             */
            y: number;

            /**
             * The underlying texture used for displacement.
             */
            texture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * Sets the Texture to be used for the displacement effect.
             * 
             * You can only use a whole texture, not a frame from a texture atlas or sprite sheet.
             * @param texture The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager. Default '__WHITE'.
             * @returns This Filter Controller.
             */
            setTexture(texture?: string): this;

            /**
             * Returns the amount of extra padding, in pixels, that this filter requires when rendering.
             * The padding accounts for the displacement effect extending beyond the original bounds
             * of the Camera's rendered output.undefined
             * @returns The padding Rectangle.
             */
            getPadding(): Phaser.Geom.Rectangle;

        }

        /**
         * The Glow Filter controller.
         * 
         * This filter controller manages the glow effect for a Camera.
         * 
         * The glow effect is a visual technique that creates a soft, luminous halo around game objects,
         * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,
         * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on
         * the inside of edges. The color and strength of the glow can be modified.
         * 
         * This effect samples across an area. To avoid missing data at the edges,
         * use `controller.setPaddingOverride(null)` to automatically pad game objects,
         * or `camera.getPaddingWrapper(x)` to enlarge a camera.
         * 
         * A Glow effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addGlow();
         * camera.filters.external.addGlow();
         * ```
         * 
         * Conversion note from Phaser 3:
         * - The shader now uses stochastic sampling instead of sampling along straight lines. This improves quality, especially around corners.
         * - `scale` has been added to the parameter list, before `knockout`.
         * - `quality` is no longer a fraction, but an integer value. The default has changed from 0.1 to 10. This is not a linear conversion, because of the quality improvement. Judge the quality by eye and adjust the value accordingly.
         */
        class Glow extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param color The color of the glow effect as a number value. Default 0xffffff.
             * @param outerStrength The strength of the glow outward from the edge of textures. Default 4.
             * @param innerStrength The strength of the glow inward from the edge of textures. Default 0.
             * @param scale The scale of the glow effect. This multiplies the fixed distance. Default 1.
             * @param knockout If `true` only the glow is drawn, not the texture itself. Default false.
             * @param quality The quality of the glow effect. This cannot be changed after the filter has been created. Default 10.
             * @param distance The distance of the glow effect. This cannot be changed after the filter has been created. Default 10.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, color?: number, outerStrength?: number, innerStrength?: number, scale?: number, knockout?: boolean, quality?: number, distance?: number);

            /**
             * The strength of the glow outward from the edge of textures.
             */
            outerStrength: number;

            /**
             * The strength of the glow inward from the edge of textures.
             */
            innerStrength: number;

            /**
             * The scale of the glow effect. This multiplies the fixed distance.
             */
            scale: number;

            /**
             * If `true` only the glow is drawn, not the texture itself.
             */
            knockout: boolean;

            /**
             * The internal RGBA color of the glow, stored as four normalized
             * floating-point values (red, green, blue, alpha) in the range 0 to 1,
             * for direct use by the WebGL renderer. To set the glow color, use the
             * `color` property instead.
             */
            glcolor: number[];

            /**
             * The color of the glow effect, expressed as a hex color value in the
             * format 0xRRGGBB. Getting this value converts it from the internal
             * normalized `glcolor` array. Setting it updates `glcolor` for use by
             * the WebGL renderer.
             */
            color: number;

            /**
             * The distance of the glow effect.
             * This cannot be changed after the filter has been created.
             * This controls the distance of the glow effect, in pixels.
             * Integer values only.
             */
            readonly distance: number;

            /**
             * The quality of the glow effect.
             * This cannot be changed after the filter has been created.
             * This controls the number of samples that the glow effect will run for.
             * A higher number is higher quality, but slower to process.
             * Integer values only.
             */
            readonly quality: number;

            /**
             * Returns the amount of extra padding, in pixels, that this filter requires when rendering.
             * The padding accounts for the glow effect extending beyond the original bounds
             * of the Camera's rendered output.undefined
             * @returns The padding Rectangle.
             */
            getPadding(): Phaser.Geom.Rectangle;

        }

        /**
         * The GradientMap Filter Controller.
         * 
         * This controller manages the GradientMap effect for a Camera.
         * 
         * GradientMap recolors an image using a ColorRamp.
         * The image is converted to a progress value at each point,
         * and that progress is evaluated as a color along the ramp.
         * 
         * The progress value is normally the brightness of the image.
         * You can use the `colorFactor` and `color` properties to customize it.
         */
        class GradientMap extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param config The configuration object for the GradientMap effect.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, config?: Phaser.Types.Filters.GradientMapConfig);

            /**
             * The ColorRamp used to recolor the image. Each pixel's brightness
             * (or custom progress value derived from `colorFactor` and `color`)
             * is looked up along this ramp to determine its output color.
             */
            ramp: Phaser.Display.ColorRamp;

            /**
             * Whether to use Interleaved Gradient Noise to dither the ramp.
             * This can reduce banding, but the effect is easily lost if the image
             * is later transformed.
             */
            dither: boolean;

            /**
             * RGBA offset values added directly to the ramp progress after `colorFactor`
             * has been applied. Each element corresponds to a channel: red, green, blue,
             * and alpha. For example, setting a channel to `1` when its corresponding
             * `colorFactor` entry is `-1` effectively inverts that channel's contribution
             * to the progress value.
             */
            color: number[];

            /**
             * RGBA multipliers applied to each channel of the source image to compute
             * the ramp progress value. The results are summed together. The defaults
             * `[ 0.3, 0.6, 0.1, 0 ]` approximate standard luminance weights, producing
             * a perceptually accurate grayscale progress. Keep the sum of factors equal
             * to 1 for a normalized result, or use negative values (paired with `color`
             * offsets) to invert a channel's contribution.
             */
            colorFactor: number[];

            /**
             * Whether the input should be unpremultiplied before computing progress.
             * This means that transparent colors are considered at full brightness.
             * It is usually desirable.
             */
            unpremultiply: boolean;

            /**
             * The blend strength of the gradient map effect over the original image,
             * in the range 0 (no effect, original image fully visible) to 1 (full
             * gradient map effect, original image fully replaced).
             */
            alpha: number;

        }

        /**
         * The ImageLight Filter Controller.
         * 
         * This filter controller manages the ImageLight effect for a Camera.
         * 
         * ImageLight is a filter for image based lighting (IBL).
         * It is used to simulate the lighting of an image
         * using an environment map and a normal map.
         * 
         * The environment map is an image that describes the lighting of the scene.
         * This filter uses a single panorama image as the environment map.
         * The top of the image is the sky, the bottom is the ground,
         * and the X axis covers a full rotation.
         * This kind of image is distorted towards the top and bottom,
         * as the X axis is stretched wider and wider,
         * so be careful if you're creating your own environment maps.
         * 
         * Cube maps are not supported by Phaser at the time of writing.
         * 
         * The effect is basically a reflection of the environment at infinite range.
         * A sharp environment map will produce a sharp reflection,
         * while a blurry environment map will produce a diffuse reflection.
         * Use the PanoramaBlur filter to create correctly blurred environment maps.
         * Use the NormalTools filter to manipulate the normal map if necessary,
         * using a DynamicTexture to capture the output.
         * 
         * An ImageLight effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addImageLight({ texture: 'lightmap' });
         * camera.filters.external.addImageLight({ texture: 'lightmap' });
         * ```
         */
        class ImageLight extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param config The configuration object for the ImageLight effect.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, config?: Phaser.Types.Filters.ImageLightConfig);

            /**
             * The underlying texture used for the ImageLight effect normal map.
             */
            normalGlTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * The underlying texture used for the ImageLight effect environment map.
             */
            environmentGlTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * The view matrix used for the ImageLight effect.
             * This controls the orientation of the environment map.
             * You should set this to reflect the perspective of the camera.
             */
            viewMatrix: Phaser.Math.Matrix4;

            /**
             * The initial rotation of the model in radians.
             * This will be overridden by the modelRotationSource if it is set.
             */
            modelRotation: number;

            /**
             * The source of the model rotation, used when the filter renders.
             * If a function, it will be called to get the rotation.
             * If a GameObject, it will be used to get the rotation from the GameObject's world transform.
             * If null, the model rotation will be taken from the modelRotation property.
             */
            modelRotationSource: Phaser.GameObjects.GameObject | Phaser.Types.Filters.ImageLightSourceCallback | null;

            /**
             * The amount of bulge to apply to the ImageLight effect.
             * This distorts the surface slightly, preventing flat areas in the normal map from reflecting a single flat color.
             * A value of 0.1 is often plenty.
             */
            bulge: number;

            /**
             * The color factor to apply to the ImageLight effect. This multiplies the intensity of the light in each color channel. Use values above 1 to substitute for high dynamic range lighting.
             */
            colorFactor: number[];

            /**
             * Sets the texture to use for the ImageLight effect environment map.
             * @param texture The texture to use for the ImageLight effect environment map.
             * @returns This ImageLight instance.
             */
            setEnvironmentMap(texture: string | Phaser.Textures.Texture): this;

            /**
             * Sets the texture to use for the ImageLight effect normal map.
             * This should match the object being filtered.
             * @param texture The texture to use for the ImageLight effect normal map.
             * @returns This ImageLight instance.
             */
            setNormalMap(texture: string | Phaser.Textures.Texture): this;

            /**
             * Sets the normal texture to use for the ImageLight effect from a GameObject.
             * This will use the first data source image in the object's texture.
             * Use this to extract a normal map which was loaded as a data source.
             * @param gameObject The GameObject to use for the ImageLight effect normal map.
             * @returns This ImageLight instance.
             */
            setNormalMapFromGameObject(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the rotation to use for the ImageLight effect.
             * This will use the modelRotationSource if it is set.undefined
             * @returns The rotation to use for the ImageLight effect in radians.
             */
            getModelRotation(): number;

        }

        /**
         * The Key filter controller.
         * 
         * The Key effect removes or isolates a specific color from an image.
         * It can be used to remove a background color from an image,
         * or to isolate a specific color for further processing.
         * 
         * By default, Key will remove pixels that match the key color.
         * You can instead keep only the matching pixels by setting `isolate`.
         * 
         * The threshold and feather settings control how closely the key color matches.
         * A match is measured by "distance between color vectors";
         * that is, how close the RGB values of the pixel are to the RGB values of the key color.
         * 
         * A Key filter is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * camera.filters.internal.addKey({ color: '#ff00ff' });
         * camera.filters.external.addKey({ color: 0x00ff00 });
         * ```
         */
        class Key extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param config The configuration for the filter. Default {}.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, config?: Phaser.Types.Filters.KeyConfig);

            /**
             * The color to use for the key.
             * It is an array of 4 numbers between 0 and 1, representing the RGBA values.
             */
            color: number[];

            /**
             * Whether to keep the region matching the key color.
             * If true, the region matching the key color will be kept,
             * and the rest will be removed.
             * If false, the region matching the key color will be removed,
             * and the rest will be kept.
             */
            isolate: boolean;

            /**
             * The threshold for the key color.
             * A pixel is considered to be the key color if the difference between
             * the pixel and the key color is less than the threshold.
             * This should be between 0 and 1.
             * The default threshold is 1 / 16, which is a good starting point for most images.
             */
            threshold: number;

            /**
             * The feathering amount for the key color.
             * Pixels outside the threshold, but still within the feather,
             * will be a partial match.
             * This should be a value between 0 and 1.
             */
            feather: number;

            /**
             * Sets the alpha value to use for the key.
             * Alpha controls the opacity of pixels matched by the key color, in the range 0 to 1.
             * This is stored in the fourth element of the color array.
             * The RGB color values are preserved.
             * @param alpha The alpha value to set on the key texture, between 0 (fully transparent) and 1 (fully opaque).
             * @returns This Filter Controller.
             */
            setAlpha(alpha: number): this;

            /**
             * Sets the color to use for the key.
             * This is stored in the first three elements of the color array.
             * The alpha value is preserved.
             * @param color The color to use for the key. It can be a hexcode number or string, an array of 3 numbers between 0 and 1, or a Color object.
             * @returns This Filter Controller.
             */
            setColor(color: number | string | number[] | Phaser.Display.Color): this;

        }

        /**
         * The Mask Filter Controller.
         * 
         * This filter controller manages a mask effect.
         * 
         * A mask uses a texture to hide parts of an input.
         * It multiplies the color and alpha of the input
         * by the alpha of the mask in the corresponding texel.
         * 
         * Masks can be inverted, which switches what they hide and what they show.
         * 
         * Masks can use either a texture or a GameObject.
         * If a GameObject is used, the mask will render the GameObject
         * to a DynamicTexture and use that.
         * The mask will automatically update when the GameObject changes,
         * unless the `autoUpdate` flag is set to `false`.
         * 
         * When the mask filter is used as an internal filter,
         * the mask will match the object/view being filtered.
         * This is useful for creating effects that follow the object,
         * such as effects intended to match an animated sprite.
         * 
         * When the mask filter is used as an external filter,
         * the mask will match the context of the camera.
         * This is useful for creating effects that cover the entire view.
         * 
         * An optional `viewCamera` can be specified when creating the mask.
         * If not used, mask objects will be viewed through the current camera,
         * or through a default camera if no other option is set.
         * For example, when rendering to a DynamicTexture outside the normal rendering
         * flow.
         * 
         * A Mask effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * const texture = 'MyMask';
         * 
         * camera.filters.internal.addMask(texture);
         * camera.filters.external.addMask(texture, true, myCamera);
         * ```
         */
        class Mask extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param mask The source of the mask. This can be a unique string-based key of the texture to use for the mask, which must exist in the Texture Manager. Or it can be a GameObject, in which case the mask will render the GameObject to a DynamicTexture and use that. Default '__WHITE'.
             * @param invert Whether to invert the mask. Default false.
             * @param viewCamera The Camera to use when rendering the mask with a GameObject. If not specified, uses the scene's `main` camera.
             * @param viewTransform The transform to use when rendering the mask with a GameObject. 'local' uses the GameObject's own properties. 'world' uses the GameObject's `parentContainer` value to compute a world position. Default 'world'.
             * @param scaleFactor The scale factor to apply to the underlying mask texture. Can be used to balance memory usage and needed mask precision. This just adjusts the size of the texture; you must also adjust mask size to match, e.g. if scaleFactor is 0.5, your mask might be a Container with scale 0.5. It's easy to make things complicated when combining scale factor, object transform, and camera transform, so try to be precise when using this option. Default 1.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, mask?: string | Phaser.GameObjects.GameObject, invert?: boolean, viewCamera?: Phaser.Cameras.Scene2D.Camera, viewTransform?: 'local' | 'world', scaleFactor?: number);

            /**
             * The underlying texture used for the mask.
             */
            glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * The GameObject used for the mask.
             * This is only set if the mask is a GameObject.
             */
            maskGameObject: Phaser.GameObjects.GameObject;

            /**
             * Whether to invert the mask.
             * An inverted mask switches what it hides and what it shows.
             */
            invert: boolean;

            /**
             * Whether the mask should automatically update.
             * This only applies when the mask is a GameObject.
             * If `false`, the mask will not change even if the GameObject changes.
             */
            autoUpdate: boolean;

            /**
             * Whether the mask needs updating, once.
             * This only applies when the mask is a GameObject.
             * If `true`, the mask will be updated before the next render.
             * This is automatically set to `true` when the mask is a GameObject,
             * but it turns off after the mask is updated.
             */
            needsUpdate: boolean;

            /**
             * The transform type to use when rendering the mask with a GameObject.
             * 'local' uses the GameObject's own properties.
             * 'world' uses the GameObject's `parentContainer` value to compute a world position.
             * This only applies when the mask is a GameObject.
             */
            viewTransform: 'local' | 'world';

            /**
             * The Camera to use when rendering the mask.
             * If not specified, uses the currently rendering camera,
             * or failing that, an internal Camera.
             */
            viewCamera: Phaser.Cameras.Scene2D.Camera | null;

            /**
             * The scale factor to apply to the underlying mask texture.
             * A value less than 1 reduces the texture resolution to save memory
             * at the cost of mask precision. A value greater than 1 increases
             * resolution for sharper masking but uses more memory. When changing
             * this value, you must also scale the mask GameObject or Container
             * to match, so that its rendered output fills the texture correctly.
             */
            scaleFactor: number;

            /**
             * Updates the DynamicTexture for the mask.
             * The DynamicTexture is created or resized if necessary.
             * This is called automatically during rendering
             * when the mask is a GameObject
             * and the `needsUpdate` or `autoUpdate` flags are set.
             * It should not be called directly.
             * @param width The width of the DynamicTexture.
             * @param height The height of the DynamicTexture.
             */
            updateDynamicTexture(width: number, height: number): void;

            /**
             * Sets the GameObject used for the mask. The GameObject will be rendered
             * to an internal DynamicTexture on the next render pass. Setting a new
             * GameObject also sets `needsUpdate` to `true`, ensuring the texture is
             * refreshed before the next frame is drawn.
             * @param gameObject The GameObject to use for the mask.
             * @returns This Filter Controller.
             */
            setGameObject(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Sets a static texture to use as the mask, looked up by key from the
             * Texture Manager. Any previously assigned mask GameObject is cleared.
             * Unlike a GameObject mask, a static texture mask does not update
             * automatically between frames.
             * @param texture The unique string-based key of the texture to use for the mask, which must exist in the Texture Manager. Default '__WHITE'.
             * @returns This Filter Controller.
             */
            setTexture(texture?: string): this;

            /**
             * Destroys this filter, releasing all references and resources.
             * 
             * If a dynamic texture was created for a mask GameObject,
             * it will also be destroyed.
             */
            destroy(): void;

        }

        /**
         * The NormalTools Filter Controller.
         * 
         * This filter controller manages the NormalTools effect for a Camera.
         * 
         * NormalTools is a filter for manipulating the normals of a normal map.
         * It has several functions:
         * 
         * - Rotate or reorient the normal map.
         * - Change how strongly the normals face the camera.
         * - Output a grayscale texture showing how strongly the normals face the camera, or some other vector.
         * 
         * The output can be used for various purposes, such as:
         * 
         * - Editing a normal map for special applications.
         * - Altering the apparent visual depth of a normal map by manipulating the facing power.
         * - Creating a base for other effects, such as a mask for a gradient or other effect.
         * 
         * You can even use the output as a normal map for regular lighting.
         * Ordinarily, normal maps are loaded alongside the main texture,
         * but you can override this.
         * 
         * ```js
         * // Given a dynamic texture `dyn` where the filter output is drawn,
         * // and a texture `spiderTex` with lighting enabled,
         * // we can inject the WebGL texture straight into the scene lighting as a normal map.
         * spiderTex.setDataSource(dyn.getWebGLTexture());
         * ```
         * 
         * A NormalTools effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * camera.filters.internal.addNormalTools({
         *     rotation: 0,
         *     facingPower: 1,
         *     outputRatio: false,
         *     ratioVector: [ 0, 0, 1 ],
         *     ratioRadius: 1
         * });
         * camera.filters.external.addNormalTools({});
         * ```
         */
        class NormalTools extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param config The configuration object for the NormalTools effect.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, config?: Phaser.Types.Filters.NormalToolsConfig);

            /**
             * The view matrix used for the NormalTools effect.
             * This controls the orientation of the normal map.
             * Use this to control 3D rotation of the normal map.
             * Ordinarily, you would just use `setRotation` for 2D rotation.
             */
            viewMatrix: Phaser.Math.Matrix4;

            /**
             * The source of the rotation.
             * If a function, it will be called to get the rotation.
             * If a GameObject, it will be used to get the rotation from the GameObject's world transform.
             * If null, the rotation will not be updated by the filter.
             */
            rotationSource: Phaser.GameObjects.GameObject | Phaser.Types.Filters.NormalToolsSourceCallback | null;

            /**
             * The power of the facing effect.
             * Higher values bend normals toward the camera; lower values bend them away.
             * This can be useful for suggesting depth in a 2D scene.
             */
            facingPower: number;

            /**
             * Whether to output the ratio of the normal map.
             * If true, the output will be a grayscale texture, with the white area
             * being the areas where the normals are facing the camera,
             * fading to black when they're orthogonal.
             * You can manipulate this ratio with `ratioVector` and `ratioRadius`.
             * This can be useful as a base for other effects.
             */
            outputRatio: boolean;

            /**
             * The vector to use for the ratio output.
             * This is the direction in which the ratio will be calculated.
             * The default is the camera's forward direction.
             * Manipulate this to highlight parts of the map which are facing in a specific direction.
             * 
             * This is only used if outputRatio is true.
             */
            ratioVector: Phaser.Math.Vector3;

            /**
             * How much of a hemisphere to consider for the ratio output.
             * At 1, the ratio will be calculated for the entire hemisphere.
             * At 0, the ratio will be calculated for a single point.
             * This uses the same algorithm as `PanoramaBlur.radius`.
             * 
             * This is only used if outputRatio is true.
             */
            ratioRadius: number;

            /**
             * Gets the 2D rotation of the normal map,
             * as set by `setRotation` or the `rotationSource`.
             * 
             * This value is not accurate if the `viewMatrix` is manipulated directly,
             * e.g. for 3D rotation. There is no single value which can
             * accurately represent 3D rotation.undefined
             * @returns The rotation in radians.
             */
            getRotation(): number;

            /**
             * Sets the rotation of the normal map.
             * This sets the `viewMatrix` to a rotation around the Z axis,
             * suitable for 2D rotation.
             * For more advanced controls, manipulate the filter's `viewMatrix` to control 3D rotation.
             * @param rotation The rotation in radians.
             * @returns This NormalTools instance.
             */
            setRotation(rotation: number): this;

            /**
             * Updates the rotation of the normal map from the rotationSource,
             * if it is set. This is called automatically during rendering.undefined
             * @returns This NormalTools instance.
             */
            updateRotation(): this;

        }

        /**
         * The PanoramaBlur Filter Controller.
         * 
         * This filter controller manages the PanoramaBlur effect for a Camera.
         * 
         * PanoramaBlur is a filter for blurring a panorama image.
         * This is intended for use with filters like ImageLight that use a panorama image as the environment map.
         * The blur treats a rectangular map as a sphere,
         * and applies heavy distortion close to the poles to get a correct result.
         * You should not use it for general purpose blurring.
         * 
         * The effect can be very slow, as it uses a grid of samples.
         * Total samples equals samplesX * samplesY. This can get very high,
         * very quickly, so be careful when increasing these values.
         * They don't need to be too high for good results.
         * 
         * By default, the blur is fully diffuse, sampling an entire hemisphere per point.
         * If you reduce the radius, the effect will be more focused.
         * Use this to control different levels of glossiness in objects using environment maps.
         * 
         * A PanoramaBlur effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addPanoramaBlur({});
         * camera.filters.external.addPanoramaBlur({});
         * ```
         */
        class PanoramaBlur extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param config The configuration object for the PanoramaBlur effect.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, config?: Phaser.Types.Filters.PanoramaBlurConfig);

            /**
             * The radius of the blur effect. 1 samples an entire hemisphere; 0 samples a single point.
             */
            radius: number;

            /**
             * The number of samples to take along the X axis. More samples produces a more accurate blur, but at the cost of performance. The X axis in a panorama is usually wider than the Y axis.
             * 
             * Altering this value triggers a shader re-compile.
             */
            samplesX: number;

            /**
             * The number of samples to take along the Y axis. More samples produces a more accurate blur, but at the cost of performance.
             * 
             * Altering this value triggers a shader re-compile.
             */
            samplesY: number;

            /**
             * An exponent applied to samples. Power above 1 darkens the samples overall, but bright colors are suppressed less than dark ones, causing them to become relatively more dominant in the result. Power below 1 brightens samples overall, reducing the contrast between bright and dark colors. To simulate an HDR environment with bright sunlight that cannot be represented in sRGB color, use high power.
             */
            power: number;

        }

        /**
         * The Parallel Filters Controller.
         * 
         * This filter controller splits the input into two lists of filters,
         * runs each list separately, and then blends the results together.
         * 
         * The Parallel Filters effect is useful for reusing an input.
         * Ordinarily, a filter modifies the input and passes it to the next filter.
         * This effect allows you to split the input and re-use it elsewhere.
         * It does not gain performance benefits from parallel processing;
         * it is a convenience for reusing the input.
         * 
         * The Parallel Filters effect is not a filter itself.
         * It is a controller that manages two FilterLists,
         * and the final Blend filter that combines the results.
         * The FilterLists are named 'top' and 'bottom'.
         * The 'top' output is applied as a blend texture to the 'bottom' output.
         * 
         * You do not have to populate both lists. If only one is populated,
         * it will be blended with the original input at the end.
         * This is useful when you want to retain image data that would be lost
         * in the filter process.
         * 
         * A Parallel Filters effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * camera.filters.internal.addParallelFilters();
         * camera.filters.external.addParallelFilters();
         * ```
         */
        class ParallelFilters extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera);

            /**
             * The top FilterList. Filters added to this list receive the original
             * input and are processed independently from the bottom list. The final
             * output of this list is passed to the Blend controller as a blend
             * texture, which is then composited onto the bottom output.
             */
            top: Phaser.GameObjects.Components.FilterList;

            /**
             * The bottom FilterList. Filters added to this list receive the original
             * input and are processed independently from the top list. The final
             * output of this list serves as the base image onto which the top
             * output is blended by the Blend controller.
             */
            bottom: Phaser.GameObjects.Components.FilterList;

            /**
             * The Blend filter controller that composites the top and bottom
             * FilterList outputs into a single result. It is a standard
             * {@link Phaser.Filters.Blend} controller whose blend mode and amount
             * can be configured to control how the two outputs are combined.
             * See {@link Phaser.Filters.Blend} for more information.
             * 
             * The `texture` property of the Blend controller will be
             * overwritten during rendering.
             */
            blend: Phaser.Filters.Blend;

        }

        /**
         * The Pixelate Filter Controller.
         * 
         * This filter controller manages the pixelate effect for a Camera.
         * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,
         * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic
         * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as
         * during a transition or to censor specific content.
         * 
         * A Pixelate effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * camera.filters.internal.addPixelate();
         * ```
         */
        class Pixelate extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param amount The amount of pixelation to apply. Default 1.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, amount?: number);

            /**
             * The amount of pixelation to apply.
             * 
             * The size of the pixels is equal to 2 + the amount.
             */
            amount: number;

        }

        /**
         * The Quantize Filter Controller.
         * 
         * This controller manages the Quantize effect on a Camera.
         * 
         * Quantization reduces the unique number of colors in an image,
         * based on some limited number of steps per color channel.
         * This is good for creating a retro or stylized effect.
         * 
         * Basic quantization breaks each channel up into a number of `steps`.
         * These steps are normally regular. You can bias them towards the top or bottom
         * by changing that channel's `gamma` value.
         * You can adjust the lowest step, thus all subsequent steps, with the `offset`.
         * 
         * Quantization is done in either RGBA or HSVA space.
         * The steps, gamma, and offset always apply in the same order,
         * but depending on color mode, they are either applied to
         * `[ red, green, blue, alpha ]` or `[ hue, saturation, value, alpha ]`.
         * 
         * The output may optionally be dithered, to eliminate banding
         * and create the illusion that there are many more colors in use.
         */
        class Quantize extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param config The configuration object for the Quantize effect.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, config?: Phaser.Types.Filters.QuantizeConfig);

            /**
             * How many steps to divide each channel into.
             * 
             * It's often useful to drop the last place to 1,
             * because it's alpha in both RGBA and HSVA,
             * and alpha is often either on or off.
             * 
             * In RGBA mode, the first 3 channels (RGB) should
             * probably be the same, unless there's a stylistic need.
             * In HSVA mode, the first channel (H) should probably have
             * many divisions to distinguish different hues,
             * while the second and third channels (SV) may need fewer steps.
             */
            steps: number[];

            /**
             * Gamma curve applied to the input channels.
             * This can help prioritize nuances in dark or light areas.
             * 
             * In RGBA mode, the RGB channels can be treated the same.
             * In HSVA mode, you probably want to apply gamma to just
             * the value and saturation channels.
             */
            gamma: number[];

            /**
             * Offset to apply to the channels during quantization.
             * This mainly exists to slide the hue angle for HSVA quantization.
             */
            offset: number[];

            /**
             * The color space to use. 0 is RGBA, 1 is HSVA.
             * Use HSVA to control many hues with fewer levels
             * of lightness/saturation.
             * 
             * When the mode changes to HSVA, `steps`, `gamma`, and `offset`
             * now apply to the hue, saturation, value, and alpha channels.
             * They are otherwise unchanged.
             */
            mode: number;

            /**
             * Whether to apply dither to the quantization,
             * creating a smoother output with the reduced colors.
             */
            dither: boolean;

        }

        /**
         * The Sampler Filter Controller.
         * 
         * This controller reads pixel data from the camera's rendered output and passes
         * it to a user-defined callback. Unlike other filter controllers, the Sampler
         * does not alter the rendered image in any way — it is purely a data extraction
         * tool. It can sample a single point, a rectangular region, or the entire
         * camera view, and is useful for techniques such as color picking, pixel-perfect
         * hit detection, or runtime visual analysis.
         * 
         * This operation is expensive, so use sparingly.
         * 
         * A Sampler is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addSampler(callback, region);
         * camera.filters.external.addSampler(callback, region);
         * ```
         */
        class Sampler extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param callback The callback to call with the results of the sampler.
             * @param region The region to sample. If `null`, the entire camera view is sampled. If a `Phaser.Types.Math.Vector2Like`, a point is sampled. If a `Phaser.Geom.Rectangle`, the region is sampled. Default null.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, region?: null | Phaser.Types.Math.Vector2Like | Phaser.Geom.Rectangle);

            /**
             * The callback to invoke once the pixel data has been read from the
             * sampled region. It receives the snapshot result, which may be an
             * `HTMLImageElement` (for region snapshots) or a `Phaser.Display.Color`
             * (for point snapshots), depending on the `region` type.
             */
            callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback;

            /**
             * The region to sample. If `null`, the entire camera view is sampled.
             * If a `Phaser.Types.Math.Vector2Like`, a point is sampled.
             * If a `Phaser.Geom.Rectangle`, the region is sampled.
             */
            region: null | Phaser.Types.Math.Vector2Like | Phaser.Geom.Rectangle;

        }

        /**
         * The Shadow Filter.
         * 
         * This filter controller manages the shadow effect for a Camera.
         * 
         * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,
         * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows
         * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.
         * 
         * This effect samples across an area. To avoid missing data at the edges,
         * use `controller.setPaddingOverride(null)` to automatically pad game objects,
         * or `camera.getPaddingWrapper(x)` to enlarge a camera.
         * 
         * A Shadow effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addShadow();
         * camera.filters.external.addShadow();
         * ```
         */
        class Shadow extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param x The horizontal offset of the shadow effect. Default 0.
             * @param y The vertical offset of the shadow effect. Default 0.
             * @param decay The amount of decay for the shadow effect. Default 0.1.
             * @param power The power of the shadow effect. Default 1.
             * @param color The color of the shadow, as a hex value. Default 0x000000.
             * @param samples The number of samples that the shadow effect will run for. Default 6.
             * @param intensity The intensity of the shadow effect. Default 1.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, x?: number, y?: number, decay?: number, power?: number, color?: number, samples?: number, intensity?: number);

            /**
             * The horizontal offset of the shadow effect.
             */
            x: number;

            /**
             * The vertical offset of the shadow effect.
             */
            y: number;

            /**
             * Controls how quickly the shadow fades over distance. Lower values produce longer,
             * more gradual shadows; higher values produce shorter, more concentrated shadows.
             */
            decay: number;

            /**
             * An exponent applied to the shadow falloff curve. Higher values create sharper
             * shadow edges; lower values create softer, more diffuse shadows.
             */
            power: number;

            /**
             * The internal WebGL color array used by the shader. Stores the shadow color
             * as normalized RGBA float values in the range 0 to 1. This array is updated
             * automatically when the `color` property is set.
             */
            glcolor: number[];

            /**
             * The number of samples that the shadow effect will run for.
             * 
             * This should be an integer with a minimum value of 1 and a maximum of 12.
             */
            samples: number;

            /**
             * A multiplier for the overall shadow visibility. Higher values produce darker,
             * more prominent shadows.
             */
            intensity: number;

            /**
             * The color of the shadow, expressed as a hex RGB value (e.g. `0xff0000` for red,
             * `0x000000` for black). Setting this property updates the internal `glcolor` array
             * used by the WebGL shader.
             */
            color: number;

            /**
             * Returns the amount of extra padding, in pixels, that this filter requires when rendering.
             * The padding accounts for the shadow effect extending beyond the original bounds
             * of the filtered Game Object.undefined
             * @returns The padding Rectangle.
             */
            getPadding(): Phaser.Geom.Rectangle;

        }

        /**
         * The Threshold Filter Controller.
         * 
         * This controller manages a threshold filter.
         * Input values are compared to a threshold value or range.
         * Values below the threshold are set to 0, and values above the threshold are set to 1.
         * Values within the range are linearly interpolated between 0 and 1.
         * 
         * This is useful for creating effects such as sharp edges from gradients,
         * or for creating binary effects.
         * 
         * The threshold is stored as a range, with two edges.
         * Each edge has a value for each channel, between 0 and 1.
         * If the two edges are the same, the threshold has no interpolation,
         * and will output either 0 or 1.
         * Each channel can also be inverted.
         * 
         * A Threshold effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addThreshold();
         * camera.filters.external.addThreshold();
         * ```
         */
        class Threshold extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The Camera that owns this filter.
             * @param edge1 The first edge of the threshold. This may be an array of the RGBA channels, or a single number to apply to all 4 channels. Default 0.5.
             * @param edge2 The second edge of the threshold. This may be an array of the RGBA channels, or a single number to apply to all 4 channels. Default 0.5.
             * @param invert Whether each channel is inverted. This may be an array of the RGBA channels, or a single boolean to apply to all 4 channels. Default false.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, edge1?: number | number[], edge2?: number | number[], invert?: boolean | boolean[]);

            /**
             * The first edge of the threshold.
             * This contains the lowest value for each channel.
             */
            edge1: number[];

            /**
             * The second edge of the threshold.
             * This contains the highest value for each channel.
             * If it is the same as the first edge, the threshold is a single value.
             */
            edge2: number[];

            /**
             * Whether each channel is inverted. When a channel is inverted, its
             * output is flipped so that values that would normally output 0 instead
             * output 1, and vice versa. This applies per-channel to the RGBA
             * components of the threshold result.
             */
            invert: boolean[];

            /**
             * Set the edges of the threshold.
             * If the second edge is not provided, it will be set to the first edge.
             * 
             * This ensures that the first edge is not greater than the second edge.
             * It may swap channels between edges to ensure this.
             * @param edge1 The first edge of the threshold. This may be an array of the RGBA channels, or a single number to apply to all 4 channels. Default 0.5.
             * @param edge2 The second edge of the threshold. This may be an array of the RGBA channels, or a single number to apply to all 4 channels. Default 0.5.
             * @returns This Threshold instance.
             */
            setEdge(edge1?: number | number[], edge2?: number | number[]): Phaser.Filters.Threshold;

            /**
             * Sets the invert state for each channel of the threshold filter.
             * When a channel is inverted, its output is flipped: pixels that would
             * output 0 instead output 1, and vice versa. This can be used to create
             * negative or reversed threshold effects per channel.
             * If `invert` is not provided, all channels default to `false`.
             * @param invert Whether each channel is inverted. This may be an array of the RGBA channels, or a single boolean to apply to all 4 channels. Default false.
             * @returns This Threshold instance.
             */
            setInvert(invert?: boolean | boolean[]): Phaser.Filters.Threshold;

        }

        /**
         * The Vignette Filter Controller.
         * 
         * This controller manages the vignette effect for a Camera.
         * 
         * The vignette effect is a visual technique where the edges of the screen,
         * or a Game Object, gradually darken or blur,
         * creating a frame-like appearance. This effect is used to draw the player's
         * focus towards the central action or subject, enhance immersion,
         * and provide a cinematic or artistic quality to the game's visuals.
         * 
         * This filter supports colored borders, and a limited set of blend modes,
         * to increase its stylistic power.
         * 
         * A Vignette effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * 
         * camera.filters.internal.addVignette();
         * camera.filters.external.addVignette();
         * ```
         */
        class Vignette extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param x The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1. Default 0.5.
             * @param y The vertical offset of the vignette effect. This value is normalized to the range 0 to 1. Default 0.5.
             * @param radius The radius of the vignette effect. This value is normalized to the range 0 to 1. Default 0.5.
             * @param strength The strength of the vignette effect. Default 0.5.
             * @param color The color of the vignette effect, as a hex code or Color object. Default 0x000000.
             * @param blendMode The blend mode to use with the vignette. Only NORMAL, ADD, MULTIPLY, and SCREEN are supported. Default Phaser.BlendModes.NORMAL.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, x?: number, y?: number, radius?: number, strength?: number, color?: number | string | Phaser.Types.Display.InputColorObject | Phaser.Display.Color, blendMode?: number);

            /**
             * The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.
             */
            x: number;

            /**
             * The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.
             */
            y: number;

            /**
             * The radius of the vignette effect. This value is normalized to the range 0 to 1.
             */
            radius: number;

            /**
             * The strength of the vignette effect. Higher values produce a more
             * intense, opaque vignette overlay at the edges, while lower values
             * produce a subtler, more transparent effect.
             */
            strength: number;

            /**
             * The color of the vignette effect.
             */
            color: Phaser.Display.Color;

            /**
             * The blend mode used to combine the vignette color with the input.
             * Note that only NORMAL, ADD, MULTIPLY and SCREEN are supported.
             */
            blendMode: Phaser.BlendModes;

            /**
             * Sets the color of the vignette overlay.
             * @param color The color to set. Note that a Color object will be copied, not attached.
             * @returns This filter instance.
             */
            setColor(color: number | string | Phaser.Types.Display.InputColorObject | Phaser.Display.Color): this;

        }

        /**
         * The Wipe Filter Controller.
         * 
         * This controller manages the wipe effect for a Camera.
         * 
         * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements
         * in the game, such as images, text, or scene transitions. This effect is often used to create
         * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition
         * between game states.
         * 
         * You can set both the direction and the axis of the wipe effect. The following combinations are possible:
         * 
         * * left to right: direction 0, axis 0
         * * right to left: direction 1, axis 0
         * * top to bottom: direction 1, axis 1
         * * bottom to top: direction 0, axis 1
         * 
         * It is up to you to set the `progress` value yourself, e.g. via a Tween, in order to transition the effect.
         * 
         * A Wipe effect is added to a Camera via the FilterList component:
         * 
         * ```js
         * const camera = this.cameras.main;
         * camera.filters.internal.addWipe();
         * camera.filters.external.addWipe();
         * ```
         */
        class Wipe extends Phaser.Filters.Controller {
            /**
             * 
             * @param camera The camera that owns this filter.
             * @param wipeWidth The width of the wipe effect. This value is normalized in the range 0 to 1. Default 0.1.
             * @param direction The direction of the wipe effect. Either 0 (left to right, or top to bottom) or 1 (right to left, or bottom to top). Set in conjunction with the axis property. Default 0.
             * @param axis The axis of the wipe effect. Either 0 (X) or 1 (Y). Set in conjunction with the direction property. Default 0.
             * @param reveal Is this a reveal (1) or a wipe (0) effect? Reveal shows the input in wiped areas; wipe shows the input in unwiped areas. Default 0.
             * @param wipeTexture Texture or texture key to use where the input texture is not shown. The default texture is blank. Use another texture for a wipe transition. Default '__DEFAULT'.
             */
            constructor(camera: Phaser.Cameras.Scene2D.Camera, wipeWidth?: number, direction?: number, axis?: number, reveal?: number, wipeTexture?: string | Phaser.Textures.Texture);

            /**
             * The progress of the Wipe effect. This value is normalized to the range 0 to 1.
             * 
             * Adjust this value to make the wipe transition (e.g. via a Tween).
             */
            progress: number;

            /**
             * The width of the wipe effect. This value is normalized in the range 0 to 1.
             */
            wipeWidth: number;

            /**
             * The direction of the wipe effect. Either 0 (left to right, or top to bottom) or 1 (right to left, or bottom to top). Set in conjunction with the axis property.
             */
            direction: number;

            /**
             * The axis of the wipe effect. Either 0 (X) or 1 (Y). Set in conjunction with the direction property.
             */
            axis: number;

            /**
             * Is this a reveal (1) or a wipe (0) effect?
             * Reveal shows the input in wiped areas;
             * wipe shows the input in unwiped areas.
             */
            reveal: number;

            /**
             * The texture to use where the input is removed.
             * The default texture '__DEFAULT' is blank.
             * Use another texture for a wipe transition.
             */
            wipeTexture: Phaser.Textures.Texture;

            /**
             * Set the width of the wipe effect.
             * @param width The width of the wipe effect. This value is normalized in the range 0 to 1.
             * @returns - This filter instance.
             */
            setWipeWidth(width: number): this;

            /**
             * Set the wipe effect to run left to right.undefined
             * @returns - This filter instance.
             */
            setLeftToRight(): this;

            /**
             * Set the wipe effect to run right to left.undefined
             * @returns - This filter instance.
             */
            setRightToLeft(): this;

            /**
             * Set the wipe effect to run top to bottom.undefined
             * @returns - This filter instance.
             */
            setTopToBottom(): this;

            /**
             * Set the wipe effect to run bottom to top.undefined
             * @returns - This filter instance.
             */
            setBottomToTop(): this;

            /**
             * Configures this filter to run as a wipe effect, where the input is removed
             * as the transition progresses. Also resets `progress` to 0.
             * Use `setRevealEffect` for the opposite behavior.undefined
             * @returns - This filter instance.
             */
            setWipeEffect(): this;

            /**
             * Configures this filter to run as a reveal effect, where the input is gradually
             * uncovered as the transition progresses. Also resets the texture to the default
             * blank texture and resets `progress` to 0.
             * Use `setWipeEffect` for the opposite behavior.undefined
             * @returns - This filter instance.
             */
            setRevealEffect(): this;

            /**
             * Set the texture to use where the input is removed.
             * The default texture is blank, so the input is just hidden.
             * @param texture Texture or texture key to use for regions where the input is removed. Default '__DEFAULT'.
             * @returns - This filter instance.
             */
            setTexture(texture?: string | Phaser.Textures.Texture): this;

            /**
             * Sets the progress of the wipe effect, controlling how far along the transition
             * has advanced. A value of 0 means the transition has not started, and 1 means it
             * is complete. You would typically drive this via a Tween rather than setting it directly.
             * @param value Progress, normalized to the range 0-1.
             * @returns - This filter instance.
             */
            setProgress(value: number): this;

        }

    }

    namespace GameObjects {
        /**
         * Builds a Game Object using the provided configuration object, applying properties such as
         * position, depth, flip, scale, scroll factor, rotation, alpha, origin, blend mode, and
         * visibility. If the config's `add` property is `true` (the default), the Game Object is
         * added to the Scene's Display List. If the Game Object has a `preUpdate` method it is also
         * added to the Scene's Update List. This function is used internally by Game Object factories
         * and creators, and is not typically called directly.
         * @param scene A reference to the Scene.
         * @param gameObject The initial GameObject.
         * @param config The config to build the GameObject with.
         * @returns The built Game Object.
         */
        function BuildGameObject(scene: Phaser.Scene, gameObject: Phaser.GameObjects.GameObject, config: Phaser.Types.GameObjects.GameObjectConfig): Phaser.GameObjects.GameObject;

        /**
         * Reads the `anims` property from a Game Object configuration object and uses it to
         * configure the animation state of the given Sprite. If the `anims` property is absent,
         * the Sprite is returned unchanged.
         * 
         * The `anims` value may be either a string or an object. If it is a string, it is treated
         * as an animation key and the animation is played immediately. If it is an object, the
         * animation key and playback options (such as `delay`, `repeat`, `yoyo`, and `startFrame`)
         * are read from it. Depending on the `play` and `delayedPlay` properties, the animation
         * will be played immediately, played after a delay, or simply loaded ready to play later.
         * @param sprite The Sprite whose animation state will be configured.
         * @param config The Game Object configuration object. The `anims` property of this object is used to configure the animation.
         * @returns The updated Sprite.
         */
        function BuildGameObjectAnimation(sprite: Phaser.GameObjects.Sprite, config: object): Phaser.GameObjects.Sprite;

        /**
         * The Display List is a Scene plugin that maintains the ordered list of Game Objects
         * to be rendered each frame. Game Objects are automatically sorted by depth before
         * rendering. You do not normally interact with the Display List directly; instead use
         * `addToDisplayList` and `removeFromDisplayList` on individual Game Objects.
         */
        class DisplayList extends Phaser.Structs.List<Phaser.GameObjects.GameObject> {
            /**
             * 
             * @param scene The Scene that this Display List belongs to.
             */
            constructor(scene: Phaser.Scene);

            /**
             * The flag that determines whether Game Objects should be sorted when `depthSort()` is called.
             */
            sortChildrenFlag: boolean;

            /**
             * The Scene that this Display List belongs to.
             */
            scene: Phaser.Scene;

            /**
             * The Scene's Systems.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * The Scene's Event Emitter.
             */
            events: Phaser.Events.EventEmitter;

            /**
             * Force a sort of the display list on the next call to depthSort.
             */
            queueDepthSort(): void;

            /**
             * Immediately sorts the display list if the flag is set.
             */
            depthSort(): void;

            /**
             * Compare the depth of two Game Objects.
             * @param childA The first Game Object.
             * @param childB The second Game Object.
             * @returns The difference between the depths of each Game Object.
             */
            sortByDepth(childA: Phaser.GameObjects.GameObject, childB: Phaser.GameObjects.GameObject): number;

            /**
             * Returns an array which contains all objects currently on the Display List.
             * This is a reference to the main list array, not a copy of it, so be careful not to modify it.undefined
             * @returns The group members.
             */
            getChildren(): Phaser.GameObjects.GameObject[];

        }

        /**
         * The base class that all Game Objects in Phaser extend.
         * 
         * A Game Object is anything that can be added to a Scene's display list and rendered to screen,
         * such as a Sprite, Image, Text, or Graphics object. Game Objects are the building blocks of
         * every Phaser game — they represent visual entities that live in a Scene, can be positioned,
         * scaled, rotated, and interacted with.
         * 
         * This class provides the core shared functionality used by all Game Objects: lifecycle management
         * (active/destroy), data storage via the Data Manager, input handling, physics body attachment,
         * display list and update list membership, and event emission.
         * 
         * You do not instantiate `GameObject` directly. Instead, use it as the base class for your own
         * custom Game Object types by extending it through Phaser's `Class` utility, or simply use one
         * of the many built-in Game Object types provided by Phaser.
         */
        class GameObject extends Phaser.Events.EventEmitter implements Phaser.GameObjects.Components.Filters, Phaser.GameObjects.Components.RenderSteps {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param type A textual representation of the type of Game Object, i.e. `sprite`.
             */
            constructor(scene: Phaser.Scene, type: string);

            /**
             * A reference to the Scene to which this Game Object belongs.
             * 
             * Game Objects can only belong to one Scene.
             * 
             * You should consider this property as being read-only. You cannot move a
             * Game Object to another Scene by simply changing it.
             */
            scene: Phaser.Scene;

            /**
             * Holds a reference to the Display List that contains this Game Object.
             * 
             * This is set automatically when this Game Object is added to a Scene or Layer.
             * 
             * You should treat this property as being read-only.
             */
            displayList: Phaser.GameObjects.DisplayList | Phaser.GameObjects.Layer;

            /**
             * A textual representation of this Game Object, i.e. `sprite`.
             * Used internally by Phaser but is available for your own custom classes to populate.
             */
            type: string;

            /**
             * The current state of this Game Object.
             * 
             * Phaser itself will never modify this value, although plugins may do so.
             * 
             * Use this property to track the state of a Game Object during its lifetime. For example, it could change from
             * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant
             * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.
             * If you need to store complex data about your Game Object, look at using the Data Component instead.
             */
            state: number | string;

            /**
             * The parent Container of this Game Object, if it has one.
             */
            parentContainer: Phaser.GameObjects.Container;

            /**
             * The name of this Game Object.
             * Empty by default and never populated by Phaser, this is left for developers to use.
             */
            name: string;

            /**
             * The active state of this Game Object.
             * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.
             * An active object is one which is having its logic and internal systems updated.
             */
            active: boolean;

            /**
             * The Tab Index of the Game Object.
             * Reserved for future use by plugins and the Input Manager.
             */
            tabIndex: number;

            /**
             * A Data Manager.
             * It allows you to store, query and get key/value paired information specific to this Game Object.
             * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.
             */
            data: Phaser.Data.DataManager;

            /**
             * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.
             * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.
             * If those components are not used by your custom class then you can use this bitmask as you wish.
             */
            renderFlags: number;

            /**
             * A bitmask that controls if this Game Object is drawn by a Camera or not.
             * Not usually set directly, instead call `Camera.ignore`, however you can
             * set this property directly using the Camera.id property:
             */
            cameraFilter: number;

            /**
             * The current vertex rounding mode of this Game Object.
             * This is used by the WebGL Renderer to determine how to round the vertex positions.
             * It can have several values:
             * 
             * - `off` - No rounding is applied.
             * - `safe` - Rounding is applied if the object is 'safe'.
             * - `safeAuto` - Rounding is applied if the object is 'safe' and the camera has `roundPixels` enabled.
             * - `full` - Rounding is always applied.
             * - `fullAuto` - Rounding is always applied if the camera has `roundPixels` enabled.
             * 
             * A 'safe' object is one that is not rotated or scaled
             * by any transform matrix while rendering.
             * The effective transform is a simple translation.
             * In such cases, rounding will affect all vertices the same way.
             * 
             * Using full rounding can cause vertices to wobble, because they might
             * not be aligned to the pixel grid.
             * Full rounding gives a janky look like PS1 games.
             * 
             * You can use other values if you want to create your own custom rounding modes.
             */
            vertexRoundMode: string;

            /**
             * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.
             * Not usually set directly. Instead call `GameObject.setInteractive()`.
             */
            input: Phaser.Types.Input.InteractiveObject | null;

            /**
             * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.
             */
            body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody | MatterJS.BodyType | null;

            /**
             * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.
             * This includes calls that may come from a Group, Container or the Scene itself.
             * While it allows you to persist a Game Object across Scenes, please understand you are entirely
             * responsible for managing references to and from this Game Object.
             */
            ignoreDestroy: boolean;

            /**
             * Whether this Game Object has been destroyed.
             * Check this property to avoid bugs caused by calling methods on a
             * destroyed Game Object, e.g. in a Tween or Timer.
             * 
             * This is a read-only property that is automatically set to `true`
             * when the Game Object is destroyed.
             * You should not set this property directly.
             * It is set before `preDestroy` is called or the DESTROY event is emitted.
             */
            readonly isDestroyed: boolean;

            /**
             * Sets the `active` property of this Game Object and returns this Game Object for further chaining.
             * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.
             * @param value True if this Game Object should be set as active, false if not.
             * @returns This GameObject.
             */
            setActive(value: boolean): this;

            /**
             * Sets the `name` property of this Game Object and returns this Game Object for further chaining.
             * The `name` property is not populated by Phaser and is presented for your own use.
             * @param value The name to be given to this Game Object.
             * @returns This GameObject.
             */
            setName(value: string): this;

            /**
             * Sets the current state of this Game Object.
             * 
             * Phaser itself will never modify the State of a Game Object, although plugins may do so.
             * 
             * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.
             * The state value should typically be an integer (ideally mapped to a constant
             * in your game code), but could also be a string. It is recommended to keep it light and simple.
             * If you need to store complex data about your Game Object, look at using the Data Component instead.
             * @param value The state of the Game Object.
             * @returns This GameObject.
             */
            setState(value: number | string): this;

            /**
             * Adds a Data Manager component to this Game Object.undefined
             * @returns This GameObject.
             */
            setDataEnabled(): this;

            /**
             * Allows you to store a key value pair within this Game Objects Data Manager.
             * 
             * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled
             * before setting the value.
             * 
             * If the key doesn't already exist in the Data Manager then it is created.
             * 
             * ```javascript
             * sprite.setData('name', 'Red Gem Stone');
             * ```
             * 
             * You can also pass in an object of key value pairs as the first argument:
             * 
             * ```javascript
             * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });
             * ```
             * 
             * To get a value back again you can call `getData`:
             * 
             * ```javascript
             * sprite.getData('gold');
             * ```
             * 
             * Or you can access the value directly via the `values` property, where it works like any other variable:
             * 
             * ```javascript
             * sprite.data.values.gold += 50;
             * ```
             * 
             * When the value is first set, a `setdata` event is emitted from this Game Object.
             * 
             * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.
             * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.
             * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.
             * 
             * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.
             * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.
             * @param key The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.
             * @param value The value to set for the given key. If an object is provided as the key this argument is ignored.
             * @returns This GameObject.
             */
            setData<T extends any>(key: (string|T), value?: any): this;

            /**
             * Increase a value for the given key within this Game Object's Data Manager. If the key doesn't already exist in the Data Manager then it is created with a value of 0 before being increased.
             * 
             * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled
             * before setting the value.
             * 
             * If the key doesn't already exist in the Data Manager then it is created.
             * 
             * When the value is first set, a `setdata` event is emitted from this Game Object.
             * @param key The key to change the value for.
             * @param amount The amount to increase the given key by. Pass a negative value to decrease the key. Default 1.
             * @returns This GameObject.
             */
            incData(key: string, amount?: number): this;

            /**
             * Toggle a boolean value for the given key within this Game Object's Data Manager. If the key doesn't already exist in the Data Manager then it is created with a value of `false` before being toggled to `true`.
             * 
             * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled
             * before setting the value.
             * 
             * If the key doesn't already exist in the Data Manager then it is created.
             * 
             * When the value is first set, a `setdata` event is emitted from this Game Object.
             * @param key The key to toggle the value for.
             * @returns This GameObject.
             */
            toggleData(key: string): this;

            /**
             * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.
             * 
             * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:
             * 
             * ```javascript
             * sprite.getData('gold');
             * ```
             * 
             * Or access the value directly:
             * 
             * ```javascript
             * sprite.data.values.gold;
             * ```
             * 
             * You can also pass in an array of keys, in which case an array of values will be returned:
             * 
             * ```javascript
             * sprite.getData([ 'gold', 'armor', 'health' ]);
             * ```
             * 
             * This approach is useful for destructuring arrays in ES6.
             * @param key The key of the value to retrieve, or an array of keys.
             * @returns The value belonging to the given key, or an array of values, the order of which will match the input array.
             */
            getData(key: string | string[]): any;

            /**
             * Pass this Game Object to the Input Manager to enable it for Input.
             * 
             * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area
             * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced
             * input detection.
             * 
             * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If
             * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific
             * shape for it to use.
             * 
             * You can also provide an Input Configuration Object as the only argument to this method.
             * @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 callback 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.
             * @param dropZone Should this Game Object be treated as a drop zone target? Default false.
             * @returns This GameObject.
             */
            setInteractive(hitArea?: Phaser.Types.Input.InputConfiguration | any, callback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): this;

            /**
             * If this Game Object has previously been enabled for input, this will disable it.
             * 
             * An object that is disabled for input stops processing or being considered for
             * input events, but can be turned back on again at any time by simply calling
             * `setInteractive()` with no arguments provided.
             * 
             * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.
             * @param resetCursor Should the currently active Input cursor, if any, be reset to the default cursor? Default false.
             * @returns This GameObject.
             */
            disableInteractive(resetCursor?: boolean): this;

            /**
             * If this Game Object has previously been enabled for input, this will queue it
             * for removal, causing it to no longer be interactive. The removal happens on
             * the next game step, it is not immediate.
             * 
             * The Interactive Object that was assigned to this Game Object will be destroyed,
             * removed from the Input Manager and cleared from this Game Object.
             * 
             * If you wish to re-enable this Game Object at a later date you will need to
             * re-create its InteractiveObject by calling `setInteractive` again.
             * 
             * If you wish to only temporarily stop an object from receiving input then use
             * `disableInteractive` instead, as that toggles the interactive state, where-as
             * this erases it completely.
             * 
             * If you wish to resize a hit area, don't remove and then set it as being
             * interactive. Instead, access the hitarea object directly and resize the shape
             * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the
             * shape is a Rectangle, which it is by default.)
             * @param resetCursor Should the currently active Input cursor, if any, be reset to the default cursor? Default false.
             * @returns This GameObject.
             */
            removeInteractive(resetCursor?: boolean): this;

            /**
             * This callback is invoked when this Game Object is added to a Scene.
             * 
             * Can be overridden by custom Game Objects, but be aware of some Game Objects that
             * will use this, such as Sprites, to add themselves into the Update List.
             * 
             * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.
             */
            addedToScene(): void;

            /**
             * This callback is invoked when this Game Object is removed from a Scene.
             * 
             * Can be overridden by custom Game Objects, but be aware of some Game Objects that
             * will use this, such as Sprites, to remove themselves from the Update List.
             * 
             * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.
             */
            removedFromScene(): void;

            /**
             * Override this method in your own custom Game Objects to perform per-frame update logic.
             * This method is called by the Scene's Update List on every game frame, if the Game Object
             * is on that list. It is not called automatically — the Game Object must be added to the
             * Update List via `addToUpdateList` or by having a `preUpdate` method.
             * 
             * This base implementation is intentionally empty, allowing Game Objects to be used in an
             * Object Pool without requiring any update logic.
             * @param args Any arguments that are passed to the update method.
             */
            update(...args: any[]): void;

            /**
             * Returns a JSON representation of the Game Object.undefined
             * @returns A JSON representation of the Game Object.
             */
            toJSON(): Phaser.Types.GameObjects.JSONGameObject;

            /**
             * Compares the renderMask with the renderFlags to see if this Game Object will render or not.
             * Also checks the Game Object against the given Cameras exclusion list.
             * @param camera The Camera to check against this Game Object.
             * @returns True if the Game Object should be rendered, otherwise false.
             */
            willRender(camera: Phaser.Cameras.Scene2D.Camera): boolean;

            /**
             * Checks if this Game Object should round its vertices,
             * based on the given Camera and the `vertexRoundMode` of this Game Object.
             * This is used by the WebGL Renderer to determine how to round the vertex positions.
             * 
             * You can override this method in your own custom Game Object classes to provide
             * custom logic for vertex rounding.
             * @param camera The Camera to check against this Game Object.
             * @param onlyTranslated If true, the object is only translated, not scaled or rotated.
             * @returns True if the Game Object should be rounded, otherwise false.
             */
            willRoundVertices(camera: Phaser.Cameras.Scene2D.Camera, onlyTranslated: boolean): boolean;

            /**
             * Sets the vertex round mode of this Game Object.
             * This is used by the WebGL Renderer to determine how to round the vertex positions.
             * @param mode The vertex round mode to set. Can be 'off', 'safe', 'safeAuto', 'full' or 'fullAuto'.
             * @returns This GameObject.
             */
            setVertexRoundMode(mode: string): this;

            /**
             * Returns an array containing the display list index of either this Game Object, or if it has one,
             * its parent Container. It then iterates up through all of the parent containers until it hits the
             * root of the display list (which is index 0 in the returned array).
             * 
             * Used internally by the InputPlugin but also useful if you wish to find out the display depth of
             * this Game Object and all of its ancestors.undefined
             * @returns An array of display list position indexes.
             */
            getIndexList(): number[];

            /**
             * Adds this Game Object to the given Display List.
             * 
             * If no Display List is specified, it will default to the Display List owned by the Scene to which
             * this Game Object belongs.
             * 
             * A Game Object can only exist on one Display List at any given time, but may move freely between them.
             * 
             * If this Game Object is already on another Display List when this method is called, it will first
             * be removed from it, before being added to the new list.
             * 
             * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.
             * 
             * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarily
             * disable it from rendering, consider using the `setVisible` method, instead.
             * @param displayList The Display List to add to. Defaults to the Scene Display List.
             * @returns This Game Object.
             */
            addToDisplayList(displayList?: Phaser.GameObjects.DisplayList | Phaser.GameObjects.Layer): this;

            /**
             * Adds this Game Object to the Update List belonging to the Scene.
             * 
             * When a Game Object is added to the Update List it will have its `preUpdate` method called
             * every game frame. This method is passed two parameters: `time` and `delta`.
             * 
             * If you wish to run your own logic within `preUpdate` then you should always call
             * `super.preUpdate(time, delta)` within it, or it may fail to process required operations,
             * such as Sprite animations.undefined
             * @returns This Game Object.
             */
            addToUpdateList(): this;

            /**
             * Removes this Game Object from the Display List it is currently on.
             * 
             * A Game Object can only exist on one Display List at any given time, but may be freely removed
             * and added back at a later stage.
             * 
             * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.
             * 
             * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarily
             * disable it from rendering, consider using the `setVisible` method, instead.undefined
             * @returns This Game Object.
             */
            removeFromDisplayList(): this;

            /**
             * Removes this Game Object from the Scene's Update List.
             * 
             * When a Game Object is on the Update List, it will have its `preUpdate` method called
             * every game frame. Calling this method will remove it from the list, preventing this.
             * 
             * Removing a Game Object from the Update List will stop most internal functions working.
             * For example, removing a Sprite from the Update List will prevent it from being able to
             * run animations.undefined
             * @returns This Game Object.
             */
            removeFromUpdateList(): this;

            /**
             * Returns a reference to the underlying display list _array_ that contains this Game Object,
             * which will be either the Scene's Display List or the internal list belonging
             * to its parent Container, if it has one.
             * 
             * If this Game Object is not on a display list or in a container, it will return `null`.
             * 
             * You should be very careful with this method, and understand that it returns a direct reference to the
             * internal array used by the Display List. Mutating this array directly can cause all kinds of subtle
             * and difficult to debug issues in your game.undefined
             * @returns The internal Display List array of Game Objects, or `null`.
             */
            getDisplayList(): Phaser.GameObjects.GameObject[] | null;

            /**
             * Destroys this Game Object removing it from the Display List and Update List and
             * severing all ties to parent resources.
             * 
             * Also removes itself from the Input Manager and Physics Manager if previously enabled.
             * 
             * Use this to remove a Game Object from your game if you don't ever plan to use it again.
             * As long as no reference to it exists within your own code it should become free for
             * garbage collection by the browser.
             * 
             * If you just want to temporarily disable an object then look at using the
             * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.
             * @param fromScene `True` if this Game Object is being destroyed by the Scene, `false` if not. Default false.
             */
            destroy(fromScene?: boolean): void;

            /**
             * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.
             */
            static readonly RENDER_MASK: number;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

        }

        /**
         * The Game Object Creator is a Scene plugin that allows you to quickly create many common
         * types of Game Objects and return them using a configuration object, rather than
         * having to specify individual parameters as required by the GameObjectFactory.
         * 
         * Game Objects made via this class are automatically added to the Scene and Update List
         * unless you explicitly set the `add` property in the configuration object to `false`.
         */
        class GameObjectCreator {
            /**
             * 
             * @param scene The Scene to which this Game Object Creator belongs.
             */
            constructor(scene: Phaser.Scene);

            /**
             * The Scene to which this Game Object Creator belongs.
             */
            protected scene: Phaser.Scene;

            /**
             * A reference to the Scene.Systems.
             */
            protected systems: Phaser.Scenes.Systems;

            /**
             * A reference to the Scene Event Emitter.
             */
            protected events: Phaser.Events.EventEmitter;

            /**
             * A reference to the Scene Display List.
             */
            protected displayList: Phaser.GameObjects.DisplayList;

            /**
             * A reference to the Scene Update List.
             */
            protected updateList: Phaser.GameObjects.UpdateList;

            /**
             * Registers a Game Object creator function on the GameObjectCreator prototype,
             * making it available for creating Game Objects via the Scene's make property.
             * @param factoryType The key of the factory that you will use to call the Phaser.Scene.make[ factoryType ] method.
             * @param factoryFunction The constructor function to be called when you invoke the Phaser.Scene.make method.
             */
            static register(factoryType: string, factoryFunction: Function): void;

            /**
             * Removes a previously registered custom Game Object Creator from the GameObjectCreator prototype,
             * making it no longer available via the Scene's make property.
             * 
             * With this method you can remove a custom Game Object Creator that has been previously
             * registered in the Game Object Creator. Pass in its `factoryType` in order to remove it.
             * @param factoryType The key of the factory that you want to remove from the GameObjectCreator.
             */
            static remove(factoryType: string): void;

            /**
             * Creates a new Dynamic Bitmap Text Game Object and returns it.
             * 
             * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            dynamicBitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.DynamicBitmapText;

            /**
             * Creates a new Bitmap Text Game Object and returns it.
             * 
             * BitmapText objects work by taking a pre-rendered font texture and then stamping out each character
             * of the text from that texture. This makes rendering very fast compared to using a Canvas-based font,
             * but it means the font must be created in advance and stored as a texture atlas. Use this method via
             * `scene.make.bitmapText()` when you need high-performance static text rendering in your game.
             * 
             * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            bitmapText(config: Phaser.Types.GameObjects.BitmapText.BitmapTextConfig, addToScene?: boolean): Phaser.GameObjects.BitmapText;

            /**
             * Creates a new Blitter Game Object and returns it.
             * 
             * A Blitter is a highly efficient Game Object for rendering large numbers of Bob objects, all of which
             * share the same texture. Unlike using individual Game Objects, a Blitter batches all of its Bobs into
             * a single draw call, making it ideal for particle-like effects, crowds, bullet pools, or any scenario
             * where you need many instances of the same image rendered with minimal overhead.
             * 
             * Note: This method will only be available if the Blitter Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself. The `key` property identifies the texture to use, and the optional `frame` property identifies a specific frame within that texture.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            blitter(config: Phaser.Types.GameObjects.Sprite.SpriteConfig, addToScene?: boolean): Phaser.GameObjects.Blitter;

            /**
             * Creates a new CaptureFrame Game Object and returns it.
             * 
             * A CaptureFrame is a special Game Object that captures the current state of the WebGL framebuffer
             * at the point it is rendered in the display list. Objects rendered before it are captured to a
             * named texture; objects rendered after it are not. This is useful for full-scene post-processing
             * effects such as a layer of water or a distortion overlay. The captured texture can then be
             * referenced by key and used on other Game Objects or filters.
             * 
             * This is a WebGL-only feature and has no effect in Canvas mode. The Camera must have
             * `forceComposite` enabled, or the CaptureFrame must be used within a framebuffer context
             * (such as a Filter, DynamicTexture, or a Camera with alpha between 0 and 1).
             * 
             * Note: This method will only be available if the CaptureFrame Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself. CaptureFrame only uses the `key`, `visible`, `depth`, and `add` properties.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            captureFrame(config: Phaser.Types.GameObjects.GameObjectConfig, addToScene?: boolean): Phaser.GameObjects.CaptureFrame;

            /**
             * Creates a new Container Game Object and returns it.
             * 
             * Note: This method will only be available if the Container Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            container(config: Phaser.Types.GameObjects.Container.ContainerConfig, addToScene?: boolean): Phaser.GameObjects.Container;

            /**
             * Creates a new Gradient Game Object and returns it. A Gradient is a rectangular
             * Game Object that renders a smooth color gradient across its surface using WebGL.
             * It is useful for backgrounds, overlays, and decorative visual effects where a
             * multi-color fill is needed without a texture. Position, size, and gradient
             * appearance are all configured via the `config` object.
             * 
             * Note: This method will only be available if the Gradient Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            gradient(config: Phaser.Types.GameObjects.Gradient.GradientConfig, addToScene?: boolean): Phaser.GameObjects.Gradient;

            /**
             * Creates a new Graphics Game Object and returns it.
             * 
             * Note: This method will only be available if the Graphics Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            graphics(config?: Phaser.Types.GameObjects.Graphics.Options, addToScene?: boolean): Phaser.GameObjects.Graphics;

            /**
             * Creates a new Group Game Object and returns it.
             * 
             * Note: This method will only be available if the Group Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @returns The Game Object that was created.
             */
            group(config: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group;

            /**
             * Creates a new Image Game Object and returns it.
             * 
             * Note: This method will only be available if the Image Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            image(config: Phaser.Types.GameObjects.GameObjectConfig, addToScene?: boolean): Phaser.GameObjects.Image;

            /**
             * Creates a new Layer Game Object and returns it.
             * 
             * A Layer is a special type of Game Object that groups other Game Objects together. Unlike a Container,
             * a Layer does not apply any transform to its children. Instead, it provides a way to manage rendering
             * order and apply post-pipelines or effects to a collection of Game Objects as a single unit.
             * The `children` property of the config object can be used to pass an array of Game Objects to add
             * to the Layer immediately upon creation.
             * 
             * Note: This method will only be available if the Layer Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself. The `children` key can be set to an array of Game Objects to add to the Layer.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            layer(config: Phaser.Types.GameObjects.Sprite.SpriteConfig, addToScene?: boolean): Phaser.GameObjects.Layer;

            /**
             * Creates a new Nine Slice Game Object and returns it.
             * 
             * Note: This method will only be available if the Nine Slice Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            nineslice(config: Phaser.Types.GameObjects.NineSlice.NineSliceConfig, addToScene?: boolean): Phaser.GameObjects.NineSlice;

            /**
             * Creates a new Noise Game Object and returns it.
             * 
             * A Noise Game Object renders procedural noise — such as Perlin or simplex noise — directly
             * onto a WebGL quad using a shader. It is useful for generating dynamic visual effects such
             * as clouds, fog, terrain previews, animated backgrounds, or any effect that benefits from
             * smooth, organic-looking randomness. The noise pattern is generated entirely on the GPU,
             * making it very efficient to animate each frame.
             * 
             * Note: This method will only be available if the Noise Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            noise(config: Phaser.Types.GameObjects.Noise.NoiseConfig, addToScene?: boolean): Phaser.GameObjects.Noise;

            /**
             * Creates a new NoiseCell2D Game Object and returns it.
             * 
             * Note: This method will only be available if the NoiseCell2D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            noisecell2d(config: Phaser.Types.GameObjects.NoiseCell2D.NoiseCell2DConfig, addToScene?: boolean): Phaser.GameObjects.NoiseCell2D;

            /**
             * Creates a new NoiseCell3D Game Object and returns it.
             * 
             * Note: This method will only be available if the NoiseCell3D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            noisecell3d(config: Phaser.Types.GameObjects.NoiseCell3D.NoiseCell3DConfig, addToScene?: boolean): Phaser.GameObjects.NoiseCell3D;

            /**
             * Creates a new NoiseCell4D Game Object and returns it.
             * 
             * Note: This method will only be available if the NoiseCell4D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            noisecell4d(config: Phaser.Types.GameObjects.NoiseCell4D.NoiseCell4DConfig, addToScene?: boolean): Phaser.GameObjects.NoiseCell4D;

            /**
             * Creates a new NoiseSimplex2D Game Object and returns it.
             * 
             * Note: This method will only be available if the NoiseSimplex2D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            noisesimplex2d(config: Phaser.Types.GameObjects.NoiseSimplex2D.NoiseSimplex2DConfig, addToScene?: boolean): Phaser.GameObjects.NoiseSimplex2D;

            /**
             * Creates a new NoiseSimplex3D Game Object and returns it.
             * 
             * Note: This method will only be available if the NoiseSimplex3D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            noisesimplex3d(config: Phaser.Types.GameObjects.NoiseSimplex3D.NoiseSimplex3DConfig, addToScene?: boolean): Phaser.GameObjects.NoiseSimplex3D;

            /**
             * Creates a new Particle Emitter Game Object and returns it.
             * 
             * A Particle Emitter is a Game Object that produces a stream of particles based on a
             * configuration object. It can be used to create effects such as explosions, fire, smoke,
             * rain, or any other particle-based visual. The emitter is added to the Scene and managed
             * as a standard Game Object, supporting transforms, depth, and other common properties.
             * 
             * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed
             * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the
             * updated function parameters and class documentation for more details.
             * 
             * Note: This method will only be available if the Particles Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            particles(config: Phaser.Types.GameObjects.Particles.ParticleEmitterCreatorConfig, addToScene?: boolean): Phaser.GameObjects.Particles.ParticleEmitter;

            /**
             * Creates a new Point Light Game Object and returns it.
             * 
             * Note: This method will only be available if the Point Light Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself. Supported properties include `color` (hex color of the light, default `0xffffff`), `radius` (radius of the light in pixels, default `128`), `intensity` (brightness of the light, default `1`), and `attenuation` (rate at which the light falls off toward the edges, default `0.1`).
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            pointlight(config: object, addToScene?: boolean): Phaser.GameObjects.PointLight;

            /**
             * Creates a new Render Texture Game Object and returns it.
             * 
             * Note: This method will only be available if the Render Texture Game Object has been built into Phaser.
             * 
             * A Render Texture is a combination of Dynamic Texture and an Image Game Object, that uses the
             * Dynamic Texture to display itself with.
             * 
             * A Dynamic Texture is a special texture that allows you to draw textures, frames and most kind of
             * Game Objects directly to it.
             * 
             * You can take many complex objects and draw them to this one texture, which can then be used as the
             * base texture for other Game Objects, such as Sprites. Should you then update this texture, all
             * Game Objects using it will instantly be updated as well, reflecting the changes immediately.
             * 
             * It's a powerful way to generate dynamic textures at run-time that are WebGL friendly and don't invoke
             * expensive GPU uploads on each change.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            renderTexture(config: Phaser.Types.GameObjects.RenderTexture.RenderTextureConfig, addToScene?: boolean): Phaser.GameObjects.RenderTexture;

            /**
             * Creates a new Rope Game Object and returns it.
             * 
             * A Rope is a WebGL-only Game Object that renders a strip of textured triangles along a series of points.
             * This makes it ideal for creating rope, ribbon, cloth, or other flexible strip-like visual effects.
             * The points define the spine of the rope, and the texture is stretched and mapped across the resulting mesh.
             * Per-vertex colors and alpha values can be set to create gradient or fade effects along the length of the rope.
             * 
             * Note: This method will only be available if the Rope Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            rope(config: Phaser.Types.GameObjects.Rope.RopeConfig, addToScene?: boolean): Phaser.GameObjects.Rope;

            /**
             * Creates a new Shader Game Object and returns it.
             * 
             * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            shader(config: Phaser.Types.GameObjects.Shader.ShaderConfig, addToScene?: boolean): Phaser.GameObjects.Shader;

            /**
             * Creates a new Sprite Game Object and returns it.
             * 
             * Note: This method will only be available if the Sprite Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. Default true.
             * @returns The Game Object that was created.
             */
            sprite(config: Phaser.Types.GameObjects.Sprite.SpriteConfig, addToScene?: boolean): Phaser.GameObjects.Sprite;

            /**
             * Creates a new SpriteGPULayer Game Object and returns it.
             * 
             * Note: This method will only be available if the SpriteGPULayer Game Object
             * has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself. The `size` property sets the maximum number of sprites the layer can hold, and defaults to 1 if not specified.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            spriteGPULayer(config: Phaser.Types.GameObjects.SpriteGPULayer.SpriteGPULayerConfig, addToScene?: boolean): Phaser.GameObjects.SpriteGPULayer;

            /**
             * Creates a new Stamp Game Object and returns it.
             * 
             * Note: This method will only be available if the Stamp Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            stamp(config: Phaser.Types.GameObjects.Sprite.SpriteConfig, addToScene?: boolean): Phaser.GameObjects.Stamp;

            /**
             * Creates a new Text Game Object and returns it.
             * 
             * A Text Game Object renders a string of text to an internal Canvas texture, which is then
             * used as the source for rendering to the game canvas. It supports a wide range of styling
             * options including font family, size, weight, fill color, stroke, drop shadow, text alignment,
             * word wrapping, padding, fixed dimensions, and right-to-left rendering. The text content and
             * style can be updated at any time after creation.
             * 
             * Unlike the factory method (`scene.add.text`), this creator method returns the Text Game Object
             * without automatically adding it to the Scene's display list. Use the `add` property in the
             * config object, or pass `true` as the `addToScene` argument, to add it to the Scene.
             * 
             * Note: This method will only be available if the Text Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            text(config: Phaser.Types.GameObjects.Text.TextConfig, addToScene?: boolean): Phaser.GameObjects.Text;

            /**
             * Creates a new TileSprite Game Object and returns it.
             * 
             * Note: This method will only be available if the TileSprite Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            tileSprite(config: Phaser.Types.GameObjects.TileSprite.TileSpriteConfig, addToScene?: boolean): Phaser.GameObjects.TileSprite;

            /**
             * Creates a new Video Game Object and returns it.
             * 
             * Note: This method will only be available if the Video Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
             * @returns The Game Object that was created.
             */
            video(config: Phaser.Types.GameObjects.Video.VideoConfig, addToScene?: boolean): Phaser.GameObjects.Video;

            /**
             * Creates a new Zone Game Object and returns it.
             * 
             * Note: This method will only be available if the Zone Game Object has been built into Phaser.
             * @param config The configuration object this Game Object will use to create itself.
             * @returns The Game Object that was created.
             */
            zone(config: Phaser.Types.GameObjects.Zone.ZoneConfig): Phaser.GameObjects.Zone;

            /**
             * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.
             * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing
             * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map
             * data. For an empty map, you should specify tileWidth, tileHeight, width & height.
             * @param config The config options for the Tilemap.
             * @returns undefined
             */
            tilemap(config?: Phaser.Types.Tilemaps.TilemapConfig): Phaser.Tilemaps.Tilemap;

            /**
             * Creates a new Tween object and returns it.
             * 
             * Note: This method will only be available if Tweens have been built into Phaser.
             * @param config A Tween Configuration object, or a Tween or TweenChain instance.
             * @returns The Tween that was created.
             */
            tween(config: Phaser.Types.Tweens.TweenBuilderConfig | Phaser.Types.Tweens.TweenChainBuilderConfig | Phaser.Tweens.Tween | Phaser.Tweens.TweenChain): Phaser.Tweens.Tween;

            /**
             * Creates a new TweenChain object and returns it, without adding it to the Tween Manager.
             * 
             * Note: This method will only be available if Tweens have been built into Phaser.
             * @param config The TweenChain configuration.
             * @returns The TweenChain that was created.
             */
            tweenchain(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.TweenChain;

        }

        /**
         * The Game Object Factory is a Scene plugin that allows you to quickly create many common
         * types of Game Objects and have them automatically registered with the Scene.
         * It is accessible via `this.add` from within a Scene.
         * 
         * Game Objects directly register themselves with the Factory and inject their own creation
         * methods into the class.
         */
        class GameObjectFactory {
            /**
             * 
             * @param scene The Scene to which this Game Object Factory belongs.
             */
            constructor(scene: Phaser.Scene);

            /**
             * Creates a new Path Object.
             * @param x The horizontal position of this Path.
             * @param y The vertical position of this Path.
             * @returns The Path Object that was created.
             */
            path(x: number, y: number): Phaser.Curves.Path;

            /**
             * The Scene to which this Game Object Factory belongs.
             */
            protected scene: Phaser.Scene;

            /**
             * A reference to the Scene.Systems.
             */
            protected systems: Phaser.Scenes.Systems;

            /**
             * A reference to the Scene Event Emitter.
             */
            protected events: Phaser.Events.EventEmitter;

            /**
             * A reference to the Scene Display List.
             */
            protected displayList: Phaser.GameObjects.DisplayList;

            /**
             * A reference to the Scene Update List.
             */
            protected updateList: Phaser.GameObjects.UpdateList;

            /**
             * Adds an existing Game Object to this Scene.
             * 
             * If the Game Object renders, it will be added to the Display List.
             * If it has a `preUpdate` method, it will be added to the Update List.
             * @param child The child to be added to this Scene.
             * @returns The Game Object that was added.
             */
            existing<G extends (Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)>(child: G): G;

            /**
             * Registers a Game Object factory function on the GameObjectFactory prototype,
             * making it available for creating Game Objects via the Scene's add property.
             * @param factoryType The key under which the factory will be registered, accessible as `Phaser.Scene.add[factoryType]`.
             * @param factoryFunction The factory function to be called when `Phaser.Scene.add[factoryType]` is invoked.
             */
            static register(factoryType: string, factoryFunction: Function): void;

            /**
             * Removes a Game Object factory function from the GameObjectFactory prototype.
             * @param factoryType The key of the factory that you want to remove from the GameObjectFactory.
             */
            static remove(factoryType: string): void;

            /**
             * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene.
             * 
             * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.
             * 
             * During rendering, each letter of the text is rendered to the display, proportionally spaced out and aligned to
             * match the font structure.
             * 
             * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each
             * letter being rendered during the render pass. This callback allows you to manipulate the properties of
             * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects
             * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing
             * time, so only use them if you require the callback ability they have.
             * 
             * BitmapText objects are less flexible than Text objects, in that they have fewer features such as shadows, fills and the ability
             * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by
             * processing the font texture in an image editor, applying fills and any other effects required.
             * 
             * To create multi-line text insert \r, \n or \r\n escape codes into the text string.
             * 
             * To create a BitmapText data files you need a 3rd party app such as:
             * 
             * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/
             * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner
             * Littera (Web-based, free): http://kvazars.com/littera/
             * 
             * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of
             * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson
             * 
             * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser.
             * @param x The x position of the Game Object.
             * @param y The y position of the Game Object.
             * @param font The key of the font to use from the BitmapFont cache.
             * @param text The string, or array of strings, to be set as the content of this Bitmap Text.
             * @param size The font size to set.
             * @returns The Game Object that was created.
             */
            dynamicBitmapText(x: number, y: number, font: string, text?: string | string[], size?: number): Phaser.GameObjects.DynamicBitmapText;

            /**
             * Creates a new Bitmap Text Game Object and adds it to the Scene.
             * 
             * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.
             * 
             * During rendering, each letter of the text is rendered to the display, proportionally spaced out and aligned to
             * match the font structure.
             * 
             * BitmapText objects are less flexible than Text objects, in that they have fewer features such as shadows, fills and the ability
             * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by
             * processing the font texture in an image editor, applying fills and any other effects required.
             * 
             * To create multi-line text insert \r, \n or \r\n escape codes into the text string.
             * 
             * To create BitmapText data files you need a 3rd party app such as:
             * 
             * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/
             * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner
             * Littera (Web-based, free): http://kvazars.com/littera/
             * 
             * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of
             * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson
             * 
             * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser.
             * @param x The x position of the Game Object.
             * @param y The y position of the Game Object.
             * @param font The key of the font to use from the BitmapFont cache.
             * @param text The string, or array of strings, to be set as the content of this Bitmap Text.
             * @param size The font size to set.
             * @param align The alignment of the text in a multi-line BitmapText object. Default 0.
             * @returns The Game Object that was created.
             */
            bitmapText(x: number, y: number, font: string, text?: string | string[], size?: number, align?: number): Phaser.GameObjects.BitmapText;

            /**
             * Creates a new Blitter Game Object and adds it to the Scene.
             * 
             * A Blitter is a special, highly optimized Game Object designed for rendering large numbers of
             * identical or similar images with minimal overhead. Rather than creating individual Game Objects
             * for each image, a Blitter manages a collection of lightweight `Bob` objects, all sharing the
             * same texture. This makes it ideal for particle-like effects, crowds, bullet patterns, or any
             * scenario where you need to display many copies of the same sprite at high performance.
             * 
             * Note: This method will only be available if the Blitter Game Object has been built into Phaser.
             * @param x The x position of the Game Object.
             * @param y The y position of the Game Object.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame The default Frame children of the Blitter will use.
             * @returns The Game Object that was created.
             */
            blitter(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.GameObjects.Blitter;

            /**
             * Creates a new CaptureFrame Game Object and adds it to the Scene.
             * 
             * A CaptureFrame captures the current state of the WebGL framebuffer at the point it is rendered
             * in the display list, storing the result as a texture identified by the given key. Other Game Objects
             * can then reference this key to display or process the captured image. This is useful for
             * full-scene post-processing effects such as water reflections or screen-space distortions.
             * 
             * This is a WebGL only feature and will not work in Canvas mode. The Camera must have
             * `forceComposite` enabled, or the CaptureFrame must be rendered within a framebuffer context
             * (such as a Filter, DynamicTexture, or a Camera with a non-default alpha value).
             * 
             * Note: This method will only be available if the CaptureFrame Game Object has been built into Phaser.
             * @param key The key under which the captured texture will be stored. Other Game Objects can use this key to reference the captured frame.
             * @returns The Game Object that was created.
             */
            captureFrame(key: string): Phaser.GameObjects.CaptureFrame;

            /**
             * Creates a new Container Game Object and adds it to the Scene.
             * 
             * A Container is a special type of Game Object that can hold other Game Objects as children.
             * You can use a Container to group related Game Objects together, then move, rotate, scale,
             * or set the alpha of the Container to affect all of its children at once. Children are
             * rendered relative to the Container's position and transform, making Containers useful for
             * building composite objects, UI panels, or any group of Game Objects that should move together.
             * 
             * Note: This method will only be available if the Container Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param children An optional Game Object, or array of Game Objects, to add to this Container.
             * @returns The Game Object that was created.
             */
            container(x?: number, y?: number, children?: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): Phaser.GameObjects.Container;

            /**
             * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.
             * 
             * In order for DOM Elements to display you have to enable them by adding the following to your game
             * configuration object:
             * 
             * ```javascript
             * dom {
             *   createContainer: true
             * }
             * ```
             * 
             * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top
             * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of
             * settings within the Scale Manager, the dom container is resized accordingly.
             * 
             * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing
             * Element that you wish to be placed under the control of Phaser. For example:
             * 
             * ```javascript
             * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');
             * ```
             * 
             * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in
             * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case,
             * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font.
             * 
             * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control
             * alignment and positioning of the elements next to regular game content.
             * 
             * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the
             * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other
             * methods available in this class to help construct your elements.
             * 
             * Once the element has been created you can then control it like you would any other Game Object. You can set its
             * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped
             * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that
             * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have
             * a DOM Element, then a Sprite, then another DOM Element behind it.
             * 
             * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event
             * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas
             * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you
             * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly.
             * 
             * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in.
             * 
             * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert
             * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table.
             * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and
             * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top
             * of your game, and should treat it accordingly.
             * 
             * Note: This method will only be available if the DOM Element Game Object has been built into Phaser.
             * @param x The horizontal position of this DOM Element in the world.
             * @param y The vertical position of this DOM Element in the world.
             * @param element An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'.
             * @param style If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replace whatever CSS styles may have been previously set.
             * @param innerText If given, will be set directly as the elements `innerText` property value, replacing whatever was there before.
             * @returns The Game Object that was created.
             */
            dom(x: number, y: number, element?: HTMLElement | string, style?: string | any, innerText?: string): Phaser.GameObjects.DOMElement;

            /**
             * Creates a new Extern Game Object and adds it to the Scene's display list.
             * 
             * An Extern is a special type of Game Object that allows you to integrate custom rendering
             * logic directly into Phaser's render pipeline. By adding an Extern to the display list,
             * you can inject your own WebGL or Canvas draw calls at a specific point in the rendering
             * order, without Phaser interfering with the renderer state. This is useful when you need
             * to use a third-party renderer, perform custom GPU operations, or render content that
             * Phaser does not natively support, while still having it composited correctly with other
             * Game Objects in your Scene.
             * 
             * Note: This method will only be available if the Extern Game Object has been built into Phaser.undefined
             * @returns The Extern Game Object that was created and added to the display list.
             */
            extern(): Phaser.GameObjects.Extern;

            /**
             * Creates a new Gradient Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Gradient Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Gradient will use. This defines the shape and appearance of the gradient texture.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             * @returns The Game Object that was created.
             */
            gradient(config?: string | Phaser.Types.GameObjects.Gradient.GradientQuadConfig, x?: number, y?: number, width?: number, height?: number): Phaser.GameObjects.Gradient;

            /**
             * Creates a new Graphics Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Graphics Game Object has been built into Phaser.
             * @param config The Graphics configuration.
             * @returns The Game Object that was created.
             */
            graphics(config?: Phaser.Types.GameObjects.Graphics.Options): Phaser.GameObjects.Graphics;

            /**
             * Creates a new Group Game Object and adds it to the Scene.
             * 
             * A Group is a way of grouping together Game Objects so they can be managed as a single unit.
             * Groups have no position or visual representation of their own; they are purely an organizational
             * tool. A common use-case is object pooling: pre-creating a fixed set of identical Game Objects
             * and recycling them rather than creating and destroying them at runtime. Groups can also apply
             * bulk operations (such as setting visibility or enabling physics) to all of their members at once.
             * 
             * Note: This method will only be available if the Group Game Object has been built into Phaser.
             * @param children Game Objects to add to this Group; or the `config` argument.
             * @param config A Group Configuration object.
             * @returns The Game Object that was created.
             */
            group(children?: Phaser.GameObjects.GameObject[] | Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupConfig[] | Phaser.Types.GameObjects.Group.GroupCreateConfig, config?: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.GameObjects.Group;

            /**
             * Creates a new Image Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Image Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             * @returns The Game Object that was created.
             */
            image(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.GameObjects.Image;

            /**
             * Creates a new Layer Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Layer Game Object has been built into Phaser.
             * @param children An optional array of Game Objects to add to this Layer.
             * @returns The Game Object that was created.
             */
            layer(children?: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[]): Phaser.GameObjects.Layer;

            /**
             * A Nine Slice Game Object allows you to display a texture-based object that
             * can be stretched both horizontally and vertically, but that retains
             * fixed-sized corners. The dimensions of the corners are set via the
             * parameters to this class.
             * 
             * This is extremely useful for UI and button like elements, where you need
             * them to expand to accommodate the content without distorting the texture.
             * 
             * The texture you provide for this Game Object should be based on the
             * following layout structure:
             * 
             * ```
             *      A                          B
             *    +---+----------------------+---+
             *  C | 1 |          2           | 3 |
             *    +---+----------------------+---+
             *    |   |                      |   |
             *    | 4 |          5           | 6 |
             *    |   |                      |   |
             *    +---+----------------------+---+
             *  D | 7 |          8           | 9 |
             *    +---+----------------------+---+
             * ```
             * 
             * When changing this object's width and / or height:
             * 
             *     areas 1, 3, 7 and 9 (the corners) will remain unscaled
             *     areas 2 and 8 will be stretched horizontally only
             *     areas 4 and 6 will be stretched vertically only
             *     area 5 will be stretched both horizontally and vertically
             * 
             * You can also create a 3 slice Game Object:
             * 
             * This works in a similar way, except you can only stretch it horizontally.
             * Therefore, it requires less configuration:
             * 
             * ```
             *      A                          B
             *    +---+----------------------+---+
             *    |   |                      |   |
             *  C | 1 |          2           | 3 |
             *    |   |                      |   |
             *    +---+----------------------+---+
             * ```
             * 
             * When changing this object's width (you cannot change its height)
             * 
             *     areas 1 and 3 will remain unscaled
             *     area 2 will be stretched horizontally
             * 
             * The above configuration concept is adapted from the Pixi NineSlicePlane.
             * 
             * To specify a 3 slice object instead of a 9 slice you should only
             * provide the `leftWidth` and `rightWidth` parameters. To create a 9 slice
             * you must supply all parameters.
             * 
             * The _minimum_ width this Game Object can be is the total of
             * `leftWidth` + `rightWidth`.  The _minimum_ height this Game Object
             * can be is the total of `topHeight` + `bottomHeight`.
             * If you need to display this object at a smaller size, you can scale it.
             * 
             * In terms of performance, using a 3 slice Game Object is the equivalent of
             * having 3 Sprites in a row. Using a 9 slice Game Object is the equivalent
             * of having 9 Sprites in a row. The vertices of this object are all batched
             * together and can co-exist with other Sprites and graphics on the display
             * list, without incurring any additional overhead.
             * 
             * As of Phaser 3.60 this Game Object is WebGL only.
             * @param x The horizontal position of the center of this Game Object in the world.
             * @param y The vertical position of the center of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             * @param width The width of the Nine Slice Game Object. You can adjust the width post-creation. Default 256.
             * @param height The height of the Nine Slice Game Object. If this is a 3 slice object the height will be fixed to the height of the texture and cannot be changed. Default 256.
             * @param leftWidth The size of the left vertical column (A). Default 10.
             * @param rightWidth The size of the right vertical column (B). Default 10.
             * @param topHeight The size of the top horizontal row (C). Set to zero or undefined to create a 3 slice object. Default 0.
             * @param bottomHeight The size of the bottom horizontal row (D). Set to zero or undefined to create a 3 slice object. Default 0.
             * @param tileX Whether to tile the horizontal regions instead of stretching them. Some stretching will still occur to keep the tile count a whole number. Default false.
             * @param tileY Whether to tile the vertical regions instead of stretching them. Some stretching will still occur to keep the tile count a whole number. Default false.
             * @returns The Game Object that was created.
             */
            nineslice(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number, width?: number, height?: number, leftWidth?: number, rightWidth?: number, topHeight?: number, bottomHeight?: number, tileX?: boolean, tileY?: boolean): Phaser.GameObjects.NineSlice;

            /**
             * Creates a new Noise Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Noise Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Noise will use. This defines the shape and appearance of the noise texture.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object, in pixels. Default 128.
             * @param height The height of the Game Object, in pixels. Default 128.
             * @returns The Game Object that was created.
             */
            noise(config?: string | Phaser.Types.GameObjects.Noise.NoiseQuadConfig, x?: number, y?: number, width?: number, height?: number): Phaser.GameObjects.Noise;

            /**
             * Creates a new NoiseCell2D Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the NoiseCell2D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this NoiseCell2D will use. This defines the shape and appearance of the NoiseCell2D texture.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             * @returns The Game Object that was created.
             */
            noisecell2d(config?: string | Phaser.Types.GameObjects.NoiseCell2D.NoiseCell2DQuadConfig, x?: number, y?: number, width?: number, height?: number): Phaser.GameObjects.NoiseCell2D;

            /**
             * Creates a new NoiseCell3D Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the NoiseCell3D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this NoiseCell3D will use. This defines the shape and appearance of the NoiseCell3D texture.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             * @returns The Game Object that was created.
             */
            noisecell3d(config?: string | Phaser.Types.GameObjects.NoiseCell3D.NoiseCell3DQuadConfig, x?: number, y?: number, width?: number, height?: number): Phaser.GameObjects.NoiseCell3D;

            /**
             * Creates a new NoiseCell4D Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the NoiseCell4D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this NoiseCell4D will use. This defines the shape and appearance of the NoiseCell4D texture.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             * @returns The Game Object that was created.
             */
            noisecell4d(config?: string | Phaser.Types.GameObjects.NoiseCell4D.NoiseCell4DQuadConfig, x?: number, y?: number, width?: number, height?: number): Phaser.GameObjects.NoiseCell4D;

            /**
             * Creates a new NoiseSimplex2D Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the NoiseSimplex2D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this NoiseSimplex2D will use. This defines the shape and appearance of the NoiseSimplex2D texture.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             * @returns The Game Object that was created.
             */
            noisesimplex2d(config?: string | Phaser.Types.GameObjects.NoiseSimplex2D.NoiseSimplex2DQuadConfig, x?: number, y?: number, width?: number, height?: number): Phaser.GameObjects.NoiseSimplex2D;

            /**
             * Creates a new NoiseSimplex3D Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the NoiseSimplex3D Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this NoiseSimplex3D will use. This defines the shape and appearance of the NoiseSimplex3D texture.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             * @returns The Game Object that was created.
             */
            noisesimplex3d(config?: string | Phaser.Types.GameObjects.NoiseSimplex3D.NoiseSimplex3DQuadConfig, x?: number, y?: number, width?: number, height?: number): Phaser.GameObjects.NoiseSimplex3D;

            /**
             * Creates a new Particle Emitter Game Object and adds it to the Scene.
             * 
             * If you wish to configure the Emitter after creating it, use the `ParticleEmitter.setConfig` method.
             * 
             * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed
             * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the
             * updated function parameters and class documentation for more details.
             * 
             * Note: This method will only be available if the Particles Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param config Configuration settings for the Particle Emitter.
             * @returns The Game Object that was created.
             */
            particles(x?: number, y?: number, texture?: string | Phaser.Textures.Texture, config?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig): Phaser.GameObjects.Particles.ParticleEmitter;

            /**
             * Creates a new PathFollower Game Object and adds it to the Scene.
             * 
             * A PathFollower is a Sprite that is bound to a Phaser.Curves.Path and can automatically move along
             * that path over time. It is useful for animating characters or objects along predetermined routes,
             * such as enemies patrolling a level, vehicles following a road, or any game object that needs to
             * travel a curved or multi-segment course. The follower exposes controls to start, stop, pause, and
             * resume movement, as well as options for looping and rotation along the path.
             * 
             * Note: This method will only be available if the PathFollower Game Object has been built into Phaser.
             * @param path The Path this PathFollower is connected to.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             * @returns The Game Object that was created.
             */
            follower(path: Phaser.Curves.Path, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.GameObjects.PathFollower;

            /**
             * Creates a new Point Light Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Point Light Game Object has been built into Phaser.
             * 
             * The Point Light Game Object provides a way to add a point light effect into your game,
             * without the expensive shader processing requirements of the traditional Light Game Object.
             * 
             * The difference is that the Point Light renders using a custom shader, designed to give the
             * impression of a point light source, of variable radius, intensity and color, in your game.
             * However, unlike the Light Game Object, it does not impact any other Game Objects, or use their
             * normal maps for calculations. This makes them extremely fast to render compared to Lights
             * and perfect for special effects, such as flickering torches or muzzle flashes.
             * 
             * For maximum performance you should batch Point Light Game Objects together. This means
             * ensuring they follow each other consecutively on the display list. Ideally, use a Layer
             * Game Object and then add just Point Lights to it, so that it can batch together the rendering
             * of the lights. You don't _have_ to do this, and if you've only a handful of Point Lights in
             * your game then it's perfectly safe to mix them into the display list as normal. However, if
             * you're using a large number of them, please consider how they are mixed into the display list.
             * 
             * The renderer will automatically cull Point Lights. Those with a radius that does not intersect
             * with the Camera will be skipped in the rendering list. This happens automatically and the
             * culled state is refreshed every frame, for every camera.
             * 
             * The origin of a Point Light is always 0.5 and it cannot be changed.
             * 
             * Point Lights are a WebGL only feature and do not have a Canvas counterpart.
             * @param x The horizontal position of this Point Light in the world.
             * @param y The vertical position of this Point Light in the world.
             * @param color The color of the Point Light, given as a hex value. Default 0xffffff.
             * @param radius The radius of the Point Light. Default 128.
             * @param intensity The intensity, or color blend, of the Point Light. Default 1.
             * @param attenuation The attenuation of the Point Light. This is the reduction of light from the center point. Default 0.1.
             * @returns The Game Object that was created.
             */
            pointlight(x: number, y: number, color?: number, radius?: number, intensity?: number, attenuation?: number): Phaser.GameObjects.PointLight;

            /**
             * Creates a new Render Texture Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Render Texture Game Object has been built into Phaser.
             * 
             * A Render Texture is a combination of Dynamic Texture and an Image Game Object, that uses the
             * Dynamic Texture to display itself with.
             * 
             * A Dynamic Texture is a special texture that allows you to draw textures, frames and most kinds of
             * Game Objects directly to it.
             * 
             * You can take many complex objects and draw them to this one texture, which can then be used as the
             * base texture for other Game Objects, such as Sprites. Should you then update this texture, all
             * Game Objects using it will instantly be updated as well, reflecting the changes immediately.
             * 
             * It's a powerful way to generate dynamic textures at run-time that are WebGL friendly and don't invoke
             * expensive GPU uploads on each change.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param width The width of the Render Texture. Default 32.
             * @param height The height of the Render Texture. Default 32.
             * @returns The Game Object that was created.
             */
            renderTexture(x: number, y: number, width?: number, height?: number): Phaser.GameObjects.RenderTexture;

            /**
             * Creates a new Rope Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Rope Game Object and WebGL support have been built into Phaser.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             * @param points An array containing the vertices data for this Rope. If none is provided a simple quad is created. See `setPoints` to set this post-creation.
             * @param horizontal Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)? Default true.
             * @param colors An optional array containing the color data for this Rope. You should provide one color value per pair of vertices.
             * @param alphas An optional array containing the alpha data for this Rope. You should provide one alpha value per pair of vertices.
             * @returns The Game Object that was created.
             */
            rope(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number, points?: Phaser.Types.Math.Vector2Like[], horizontal?: boolean, colors?: number[], alphas?: number[]): Phaser.GameObjects.Rope;

            /**
             * Creates a new Shader Game Object and adds it to the Scene.
             * 
             * A Shader Game Object renders a custom GLSL fragment shader as a rectangular Game Object, allowing you to
             * display procedural visual effects, generative graphics, or post-processing-style visuals directly within
             * your game world. The shader runs on the GPU and can receive custom uniforms as well as up to four texture
             * channel inputs (iChannel0 to iChannel3), making it compatible with shaders written in the Shadertoy style.
             * 
             * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.
             * @param config The configuration object this Shader will use. It can also be a key that corresponds to a shader in the shader cache, which will be used as `fragmentKey` in a new config object.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             * @param textures Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.
             * @returns The Game Object that was created.
             */
            shader(config: string | Phaser.Types.GameObjects.Shader.ShaderQuadConfig, x?: number, y?: number, width?: number, height?: number, textures?: string[]): Phaser.GameObjects.Shader;

            /**
             * Creates a new Arc Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Arc Game Object has been built into Phaser.
             * 
             * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports both fill and stroke colors.
             * 
             * When it renders it displays an arc shape. You can control the start and end angles of the arc,
             * as well as if the angles are winding clockwise or anti-clockwise. With the default settings
             * it renders as a complete circle. By changing the angles you can create other arc shapes,
             * such as half-circles.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param radius The radius of the arc. Default 128.
             * @param startAngle The start angle of the arc, in degrees. Default 0.
             * @param endAngle The end angle of the arc, in degrees. Default 360.
             * @param anticlockwise Whether the arc is drawn anticlockwise between the start and end angles. When `false` the arc is drawn clockwise. Default false.
             * @param fillColor The color the arc will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @returns The Game Object that was created.
             */
            arc(x?: number, y?: number, radius?: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc;

            /**
             * Creates a new Circle Shape Game Object and adds it to the Scene.
             * 
             * A Circle is an Arc with a fixed start angle of 0 and end angle of 360 degrees, so it always renders as a complete circle. Use the `arc` factory method if you need control over the start and end angles.
             * 
             * Note: This method will only be available if the Arc Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param radius The radius of the circle. Default 128.
             * @param fillColor The color the circle will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the circle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @returns The Game Object that was created.
             */
            circle(x?: number, y?: number, radius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Arc;

            /**
             * Creates a new Curve Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Curve Game Object has been built into Phaser.
             * 
             * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports both fill and stroke colors.
             * 
             * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to
             * the Curve Shape in the constructor.
             * 
             * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method.
             * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations
             * that take place during construction. Increase and decrease the default value for smoother, or more
             * jagged, shapes.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param curve The Curve object to use to create the Shape.
             * @param fillColor The color the curve will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @returns The Game Object that was created.
             */
            curve(x?: number, y?: number, curve?: Phaser.Curves.Curve, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Curve;

            /**
             * Creates a new Ellipse Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Ellipse Game Object has been built into Phaser.
             * 
             * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports both fill and stroke colors.
             * 
             * When it renders it displays an ellipse shape. You can control the width and height of the ellipse.
             * If the width and height match it will render as a circle. If the width is less than the height,
             * it will look more like an egg shape.
             * 
             * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method.
             * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations
             * that take place during construction. Increase and decrease the default value for smoother, or more
             * jagged, shapes.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the ellipse. An ellipse with equal width and height renders as a circle. Default 128.
             * @param height The height of the ellipse. An ellipse with equal width and height renders as a circle. Default 128.
             * @param fillColor The color the ellipse will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @returns The Game Object that was created.
             */
            ellipse(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Ellipse;

            /**
             * Creates a new Grid Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Grid Game Object has been built into Phaser.
             * 
             * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports only fill colors and cannot be stroked.
             * 
             * A Grid Shape allows you to display a grid in your game, where you can control the size of the
             * grid as well as the width and height of the grid cells. You can set a fill color for each grid
             * cell as well as an alternate fill color. When the alternate fill color is set then the grid
             * cells will alternate the fill colors as they render, creating a chess-board effect. You can
             * also optionally have an outline fill color. If set, this draws lines between the grid cells
             * in the given color. If you specify an outline color with an alpha of zero, then it will draw
             * the cells spaced out, but without the lines between them.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the grid. Default 128.
             * @param height The height of the grid. Default 128.
             * @param cellWidth The width of one cell in the grid. Default 32.
             * @param cellHeight The height of one cell in the grid. Default 32.
             * @param fillColor The color the grid cells will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @param outlineFillColor The color of the lines between the grid cells.
             * @param outlineFillAlpha The alpha of the lines between the grid cells.
             * @returns The Game Object that was created.
             */
            grid(x?: number, y?: number, width?: number, height?: number, cellWidth?: number, cellHeight?: number, fillColor?: number, fillAlpha?: number, outlineFillColor?: number, outlineFillAlpha?: number): Phaser.GameObjects.Grid;

            /**
             * Creates a new IsoBox Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the IsoBox Game Object has been built into Phaser.
             * 
             * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports only fill colors and cannot be stroked.
             * 
             * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set
             * the color of the top, left and right faces of the rectangle respectively. You can also choose
             * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.
             * 
             * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting
             * the `projection` property.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param size The width of the iso box in pixels. The left and right faces will be exactly half this value. Default 48.
             * @param height The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value. Default 32.
             * @param fillTop The fill color of the top face of the iso box. Default 0xeeeeee.
             * @param fillLeft The fill color of the left face of the iso box. Default 0x999999.
             * @param fillRight The fill color of the right face of the iso box. Default 0xcccccc.
             * @returns The Game Object that was created.
             */
            isobox(x?: number, y?: number, size?: number, height?: number, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoBox;

            /**
             * Creates a new IsoTriangle Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the IsoTriangle Game Object has been built into Phaser.
             * 
             * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports only fill colors and cannot be stroked.
             * 
             * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different
             * fill color. You can set the color of the top, left and right faces of the triangle respectively.
             * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.
             * 
             * You cannot view an IsoTriangle from underneath, however you can change the 'angle' by setting
             * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside
             * down or not.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param size The width of the iso triangle in pixels. The left and right faces will be exactly half this value. Default 48.
             * @param height The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value. Default 32.
             * @param reversed Is the iso triangle upside down? Default false.
             * @param fillTop The fill color of the top face of the iso triangle. Default 0xeeeeee.
             * @param fillLeft The fill color of the left face of the iso triangle. Default 0x999999.
             * @param fillRight The fill color of the right face of the iso triangle. Default 0xcccccc.
             * @returns The Game Object that was created.
             */
            isotriangle(x?: number, y?: number, size?: number, height?: number, reversed?: boolean, fillTop?: number, fillLeft?: number, fillRight?: number): Phaser.GameObjects.IsoTriangle;

            /**
             * Creates a new Line Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Line Game Object has been built into Phaser.
             * 
             * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports only stroke colors and cannot be filled.
             * 
             * A Line Shape allows you to draw a line between two points in your game. You can control the
             * stroke color and thickness of the line. In WebGL only you can also specify a different
             * thickness for the start and end of the line, allowing you to render lines that taper-off.
             * 
             * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param x1 The horizontal position of the start of the line. Default 0.
             * @param y1 The vertical position of the start of the line. Default 0.
             * @param x2 The horizontal position of the end of the line. Default 128.
             * @param y2 The vertical position of the end of the line. Default 0.
             * @param strokeColor The color the line will be drawn in, i.e. 0xff0000 for red.
             * @param strokeAlpha The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property.
             * @returns The Game Object that was created.
             */
            line(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, strokeColor?: number, strokeAlpha?: number): Phaser.GameObjects.Line;

            /**
             * Creates a new Polygon Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Polygon Game Object has been built into Phaser.
             * 
             * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports both fill and stroke colors.
             * 
             * The Polygon Shape is created by providing a list of points, which are then used to create an
             * internal Polygon geometry object. The points can be set from a variety of formats:
             * 
             * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]`
             * - An array of objects with public x/y properties: `[obj1, obj2, ...]`
             * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
             * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`
             * 
             * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending
             * on the coordinates of the points provided, the final shape may be rendered offset from its origin.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param points The points that make up the polygon.
             * @param fillColor The color the polygon will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @returns The Game Object that was created.
             */
            polygon(x?: number, y?: number, points?: any, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Polygon;

            /**
             * Creates a new Rectangle Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Rectangle Game Object has been built into Phaser.
             * 
             * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports both fill and stroke colors.
             * 
             * You can change the size of the rectangle by changing the `width` and `height` properties.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the rectangle. Default 128.
             * @param height The height of the rectangle. Default 128.
             * @param fillColor The color the rectangle will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @returns The Game Object that was created.
             */
            rectangle(x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Rectangle;

            /**
             * Creates a new Star Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Star Game Object has been built into Phaser.
             * 
             * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports both fill and stroke colors.
             * 
             * As the name implies, the Star shape will display a star in your game. You can control several
             * aspects of it including the number of points that constitute the star. The default is 5. If
             * you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky
             * star shape.
             * 
             * You can also control the inner and outer radius, which is how 'long' each point of the star is.
             * Modify these values to create more interesting shapes.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param points The number of points on the star. Default 5.
             * @param innerRadius The inner radius of the star. Default 32.
             * @param outerRadius The outer radius of the star. Default 64.
             * @param fillColor The color the star will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @returns The Game Object that was created.
             */
            star(x?: number, y?: number, points?: number, innerRadius?: number, outerRadius?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Star;

            /**
             * Creates a new Triangle Shape Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Triangle Game Object has been built into Phaser.
             * 
             * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can
             * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
             * it for input or physics. It provides a quick and easy way for you to render this shape in your
             * game without using a texture, while still taking advantage of being fully batched in WebGL.
             * 
             * This shape supports both fill and stroke colors.
             * 
             * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the
             * position of each point of these lines. The triangle is always closed and cannot have an open
             * face. If you require that, consider using a Polygon instead.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param x1 The horizontal position of the first point in the triangle. Default 0.
             * @param y1 The vertical position of the first point in the triangle. Default 128.
             * @param x2 The horizontal position of the second point in the triangle. Default 64.
             * @param y2 The vertical position of the second point in the triangle. Default 0.
             * @param x3 The horizontal position of the third point in the triangle. Default 128.
             * @param y3 The vertical position of the third point in the triangle. Default 128.
             * @param fillColor The color the triangle will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @returns The Game Object that was created.
             */
            triangle(x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number, fillColor?: number, fillAlpha?: number): Phaser.GameObjects.Triangle;

            /**
             * Creates a new Sprite Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Sprite Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             * @returns The Game Object that was created.
             */
            sprite(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.GameObjects.Sprite;

            /**
             * Creates a new SpriteGPULayer Game Object and adds it to the Scene.
             * 
             * A SpriteGPULayer is a high-performance batch renderer that draws a collection
             * of sprites sharing the same texture in a single GPU draw call. Use it when you
             * need to render many instances of the same sprite with minimal draw call overhead,
             * such as for particle-like effects, tilemaps, or large crowds of identical objects.
             * 
             * Note: This method will only be available if the SpriteGPULayer Game Object has been built into Phaser.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param size The maximum number of sprites the SpriteGPULayer can render in a single batch. Default 1.
             * @returns The Game Object that was created.
             */
            spriteGPULayer(texture: string | Phaser.Textures.Texture, size?: number): Phaser.GameObjects.SpriteGPULayer;

            /**
             * Creates a new Stamp Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Stamp Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             * @returns The Game Object that was created.
             */
            stamp(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.GameObjects.Stamp;

            /**
             * Creates a new Text Game Object and adds it to the Scene.
             * 
             * The Text object renders one or more lines of styled text to an internal hidden Canvas, which is
             * then uploaded as a texture and displayed within the Scene.
             * 
             * Text objects work by creating their own internal hidden Canvas and then renders text to it using
             * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered
             * to your game during the render pass.
             * 
             * Because it uses the Canvas API you can take advantage of all the features this offers, such as
             * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts
             * loaded externally, such as Google or TypeKit Web fonts.
             * 
             * You can only display fonts that are currently loaded and available to the browser: therefore fonts must
             * be pre-loaded. Phaser does not do this for you, so you will require the use of a 3rd party font loader,
             * or have the fonts already available in the CSS on the page in which your Phaser game resides.
             * 
             * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts
             * across mobile browsers.
             * 
             * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being
             * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the
             * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of
             * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text
             * instead, as it benefits from batching and avoids expensive Canvas API calls.
             * 
             * Note: This method will only be available if the Text Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param text The text this Text object will display.
             * @param style The Text style configuration object.
             * @returns The Game Object that was created.
             */
            text(x: number, y: number, text: string | string[], style?: Phaser.Types.GameObjects.Text.TextStyle): Phaser.GameObjects.Text;

            /**
             * Creates a new TileSprite Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the TileSprite Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param width The width of the Game Object. If zero it will use the size of the texture frame.
             * @param height The height of the Game Object. If zero it will use the size of the texture frame.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. Cannot be a DynamicTexture.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             * @returns The Game Object that was created.
             */
            tileSprite(x: number, y: number, width: number, height: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.GameObjects.TileSprite;

            /**
             * Creates a new Video Game Object and adds it to the Scene.
             * 
             * This Game Object is capable of handling playback of a video file, video stream or media stream.
             * 
             * You can optionally 'preload' the video into the Phaser Video Cache:
             * 
             * ```javascript
             * preload () {
             *   this.load.video('ripley', 'assets/aliens.mp4');
             * }
             * 
             * create () {
             *   this.add.video(400, 300, 'ripley');
             * }
             * ```
             * 
             * You don't have to 'preload' the video. You can also play it directly from a URL:
             * 
             * ```javascript
             * create () {
             *   this.add.video(400, 300).loadURL('assets/aliens.mp4');
             * }
             * ```
             * 
             * To all intents and purposes, a video is a standard Game Object, just like a Sprite. And as such, you can do
             * all the usual things to it, such as scaling, rotating, cropping, tinting, making interactive, giving a
             * physics body, etc.
             * 
             * Transparent videos are also possible via the WebM file format. Providing the video file has been encoded with
             * an alpha channel, and providing the browser supports WebM playback (not all of them do), then it will render
             * in-game with full transparency.
             * 
             * ### Autoplaying Videos
             * 
             * Videos can only autoplay if the browser has been unlocked with an interaction, or satisfies the MEI settings.
             * The policies that control autoplaying are vast and vary between browser. You can, and should, read more about
             * it here: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide
             * 
             * If your video doesn't contain any audio, then set the `noAudio` parameter to `true` when the video is _loaded_,
             * and it will often allow the video to play immediately:
             * 
             * ```javascript
             * preload () {
             *   this.load.video('pixar', 'nemo.mp4', true);
             * }
             * ```
             * 
             * The 3rd parameter in the load call tells Phaser that the video doesn't contain any audio tracks. Video without
             * audio can autoplay without requiring a user interaction. Video with audio cannot do this unless it satisfies
             * the browsers MEI settings. See the MDN Autoplay Guide for further details.
             * 
             * Or:
             * 
             * ```javascript
             * create () {
             *   this.add.video(400, 300).loadURL('assets/aliens.mp4', true);
             * }
             * ```
             * 
             * You can set the `noAudio` parameter to `true` even if the video does contain audio. It will still allow the video
             * to play immediately, but the audio will not start.
             * 
             * More details about video playback and the supported media formats can be found on MDN:
             * 
             * https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement
             * https://developer.mozilla.org/en-US/docs/Web/Media/Formats
             * 
             * Note: This method will only be available if the Video Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param key Optional key of the Video this Game Object will play, as stored in the Video Cache.
             * @returns The Game Object that was created.
             */
            video(x: number, y: number, key?: string): Phaser.GameObjects.Video;

            /**
             * Creates a new Zone Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Zone Game Object has been built into Phaser.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param width The width of the Game Object.
             * @param height The height of the Game Object.
             * @returns The Game Object that was created.
             */
            zone(x: number, y: number, width: number, height: number): Phaser.GameObjects.Zone;

            /**
             * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.
             * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing
             * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map
             * data. For an empty map, you should specify tileWidth, tileHeight, width & height.
             * @param key The key in the Phaser cache that corresponds to the loaded tilemap data.
             * @param tileWidth The width of a tile in pixels. Pass in `null` to leave as the
             * default. Default 32.
             * @param tileHeight The height of a tile in pixels. Pass in `null` to leave as the
             * default. Default 32.
             * @param width The width of the map in tiles. Pass in `null` to leave as the
             * default. Default 10.
             * @param height The height of the map in tiles. Pass in `null` to leave as the
             * default. Default 10.
             * @param data Instead of loading from the cache, you can also load directly from
             * a 2D array of tile indexes. Pass in `null` for no data.
             * @param insertNull Controls how empty tiles, tiles with an index of -1, in the
             * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty
             * location will get a Tile object with an index of -1. If you've a large sparsely populated map and
             * the tile data doesn't need to change then setting this value to `true` will help with memory
             * consumption. However if your map is small or you need to update the tiles dynamically, then leave
             * the default value set. Default false.
             * @returns undefined
             */
            tilemap(key?: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number, data?: number[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap;

            /**
             * A Timeline is a way to schedule events to happen at specific times in the future.
             * 
             * You can think of it as an event sequencer for your game, allowing you to schedule the
             * running of callbacks, events and other actions at specific times in the future.
             * 
             * A Timeline is a Scene level system, meaning you can have as many Timelines as you like, each
             * belonging to a different Scene. You can also have multiple Timelines running at the same time.
             * 
             * If the Scene is paused, the Timeline will also pause. If the Scene is destroyed, the Timeline
             * will be automatically destroyed. However, you can control the Timeline directly, pausing,
             * resuming and stopping it at any time.
             * 
             * Create an instance of a Timeline via the Game Object Factory:
             * 
             * ```js
             * const timeline = this.add.timeline();
             * ```
             * 
             * The Timeline always starts paused. You must call `play` on it to start it running.
             * 
             * You can also pass in a configuration object on creation, or an array of them:
             * 
             * ```js
             * const timeline = this.add.timeline({
             *     at: 1000,
             *     run: () => {
             *         this.add.sprite(400, 300, 'logo');
             *     }
             * });
             * 
             * timeline.play();
             * ```
             * 
             * In this example we sequence a few different events:
             * 
             * ```js
             * const timeline = this.add.timeline([
             *     {
             *         at: 1000,
             *         run: () => { this.logo = this.add.sprite(400, 300, 'logo'); },
             *         sound: 'TitleMusic'
             *     },
             *     {
             *         at: 2500,
             *         tween: {
             *             targets: this.logo,
             *             y: 600,
             *             yoyo: true
             *         },
             *         sound: 'Explode'
             *     },
             *     {
             *         at: 8000,
             *         event: 'HURRY_PLAYER',
             *         target: this.background,
             *         set: {
             *             tint: 0xff0000
             *         }
             *     }
             * ]);
             * 
             * timeline.play();
             * ```
             * 
             * The Timeline can also be looped with the repeat method:
             * ```js
             * timeline.repeat().play();
             * ```
             * 
             * There are lots of options available to you via the configuration object. See the
             * {@link Phaser.Types.Time.TimelineEventConfig} typedef for more details.
             * @param config The configuration object for this Timeline Event, or an array of them.
             * @returns The Timeline that was created.
             */
            timeline(config: Phaser.Types.Time.TimelineEventConfig | Phaser.Types.Time.TimelineEventConfig[]): Phaser.Time.Timeline;

            /**
             * Creates a new Tween object.
             * 
             * Note: This method will only be available if Tweens have been built into Phaser.
             * @param config A Tween Configuration object, or a Tween or TweenChain instance.
             * @returns The Tween that was created.
             */
            tween(config: Phaser.Types.Tweens.TweenBuilderConfig | Phaser.Types.Tweens.TweenChainBuilderConfig | Phaser.Tweens.Tween | Phaser.Tweens.TweenChain): Phaser.Tweens.Tween;

            /**
             * Creates a new TweenChain object and adds it to the Tween Manager.
             * 
             * Note: This method will only be available if Tweens have been built into Phaser.
             * @param config The TweenChain configuration.
             * @returns The TweenChain that was created.
             */
            tweenchain(config: Phaser.Types.Tweens.TweenBuilderConfig | object): Phaser.Tweens.TweenChain;

        }

        /**
         * Calculates the Transform Matrix of the given Game Object and Camera, factoring in
         * the parent matrix if provided.
         * 
         * Note that the object this result contains _references_ to the Transform Matrices,
         * not new instances of them. Therefore, you should use their values immediately, or
         * copy them to your own matrix, as they will be replaced as soon as another Game
         * Object is rendered.
         * @param src The Game Object to calculate the transform matrix for.
         * @param camera The camera being used to render the Game Object.
         * @param parentMatrix The transform matrix of the parent container, if any.
         * @param ignoreCameraPosition Should the camera's translation be ignored? This is what moves a camera around on the screen, but it should be ignored when the camera is being rendered to a framebuffer. Default false.
         * @returns The results object containing the updated transform matrices.
         */
        function GetCalcMatrix(src: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, ignoreCameraPosition?: boolean): Phaser.Types.GameObjects.GetCalcMatrixResults;

        /**
         * The Update List is a Scene plugin that maintains the list of Game Objects whose
         * `preUpdate` method should be called every frame. Game Objects like Sprites add
         * themselves to the Update List automatically so their animations are processed.
         * You do not normally interact with the Update List directly; instead use
         * `addToUpdateList` and `removeFromUpdateList` on individual Game Objects.
         */
        class UpdateList extends Phaser.Structs.ProcessQueue<Phaser.GameObjects.GameObject> {
            /**
             * 
             * @param scene The Scene that the Update List belongs to.
             */
            constructor(scene: Phaser.Scene);

            /**
             * The Scene that the Update List belongs to.
             */
            scene: Phaser.Scene;

            /**
             * The Scene's Systems.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * The update step.
             * 
             * Pre-updates every active Game Object in the list.
             * @param time The current timestamp.
             * @param delta The delta time elapsed since the last frame.
             */
            sceneUpdate(time: number, delta: number): void;

            /**
             * The Scene that owns this plugin is shutting down.
             * 
             * We need to destroy all active, pending, and queued Game Objects, reset all internal properties, and stop listening to Scene events.
             */
            shutdown(): void;

            /**
             * The Scene that owns this plugin is being destroyed.
             * 
             * We need to shut down and then clear all external references.
             */
            destroy(): void;

        }

        namespace RetroFont {
            /**
             * Parses a Retro Font configuration object and builds a `BitmapFontData` structure that can
             * be passed to the BitmapText constructor to render text using a fixed-width retro font.
             * 
             * A retro font is a texture containing a uniform grid of characters, each cell being the same
             * width and height. This function reads the configuration, looks up the source texture frame,
             * then iterates over every character defined in `config.chars`, calculating its pixel position
             * and normalised UV coordinates within the texture. The resulting data object maps each
             * character code to its own glyph entry and is suitable for registering in the Bitmap Font cache.
             * 
             * If `config.chars` is an empty string the function returns `undefined` without producing any data.
             * @param scene A reference to the Phaser Scene.
             * @param config The font configuration object.
             * @returns A parsed Bitmap Font data entry containing per-character glyph data and UV coordinates, ready for the Bitmap Font cache.
             */
            function Parse(scene: Phaser.Scene, config: Phaser.Types.GameObjects.BitmapText.RetroFontConfig): Phaser.Types.GameObjects.BitmapText.BitmapFontData;

            /**
             * A RetroFont character set containing the full printable ASCII range (space through tilde),
             * including both uppercase and lowercase letters, digits, and symbols.
             * 
             * Text Set 1 =  !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
             */
            var TEXT_SET1: string;

            /**
             * A RetroFont character set containing printable ASCII characters from space through uppercase Z,
             * including digits and common symbols but no lowercase letters.
             * 
             * Text Set 2 =  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ
             */
            var TEXT_SET2: string;

            /**
             * A RetroFont character set containing uppercase letters followed by digits, with a trailing space.
             * 
             * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
             */
            var TEXT_SET3: string;

            /**
             * A RetroFont character set containing uppercase letters, a space, then digits. The space
             * character appears between the alphabet and the digits rather than at the end.
             * 
             * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
             */
            var TEXT_SET4: string;

            /**
             * A RetroFont character set containing uppercase letters followed by common punctuation
             * symbols and digits. Useful for fonts that include sentence punctuation such as periods,
             * commas, parentheses, and question marks.
             * 
             * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789
             */
            var TEXT_SET5: string;

            /**
             * A RetroFont character set containing uppercase letters, digits, and a range of punctuation
             * symbols including quotes, parentheses, and a trailing space.
             * 
             * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.`
             */
            var TEXT_SET6: string;

            /**
             * A RetroFont character set where the characters are arranged in a non-sequential,
             * interleaved order. This matches the sprite layout of certain retro font sheets where
             * every fifth character continues the sequence (A, G, M, S, Y, then B, H, N, T, Z, etc.).
             * 
             * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39
             */
            var TEXT_SET7: string;

            /**
             * A RetroFont character set where digits come first, followed by a space, period, and then
             * uppercase letters. Use this when the font sprite sheet places numerals before the alphabet.
             * 
             * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ
             */
            var TEXT_SET8: string;

            /**
             * A RetroFont character set containing uppercase letters, parentheses and a hyphen, digits,
             * and common sentence punctuation including quotes and an exclamation mark.
             * 
             * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!
             */
            var TEXT_SET9: string;

            /**
             * A RetroFont character set containing only the 26 uppercase letters of the alphabet.
             * Use this for font sprite sheets that contain no digits, spaces, or punctuation glyphs.
             * 
             * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
             */
            var TEXT_SET10: string;

            /**
             * A RetroFont character set containing uppercase letters, a broad selection of punctuation
             * symbols including quotes and arithmetic operators, followed by digits.
             * 
             * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789
             */
            var TEXT_SET11: string;

        }

        /**
         * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.
         * 
         * During rendering, each letter of the text is rendered to the display, proportionally spaced out and aligned to
         * match the font structure.
         * 
         * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each
         * letter being rendered during the render pass. This callback allows you to manipulate the properties of
         * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects
         * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing
         * time, so only use them if you require the callback ability they have.
         * 
         * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability
         * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by
         * processing the font texture in an image editor, applying fills and any other effects required.
         * 
         * To create multi-line text insert \r, \n or \r\n escape codes into the text string.
         * 
         * To create a BitmapText data files you need a 3rd party app such as:
         * 
         * BMFont (Windows, free): {@link http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/}
         * Glyph Designer (OS X, commercial): {@link http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner}
         * Snow BMF (Web-based, free): {@link https://snowb.org//|https://snowb.org/}
         * Littera (Flash-based, free): {@link http://kvazars.com/littera/|http://kvazars.com/littera/}
         * 
         * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of
         * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: {@link http://codebeautify.org/xmltojson|http://codebeautify.org/xmltojson}
         */
        class DynamicBitmapText extends Phaser.GameObjects.BitmapText {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.
             * @param x The x coordinate of this Game Object in world space.
             * @param y The y coordinate of this Game Object in world space.
             * @param font The key of the font to use from the Bitmap Font cache.
             * @param text The string, or array of strings, to be set as the content of this Bitmap Text.
             * @param size The font size of this Bitmap Text.
             * @param align The alignment of the text in a multi-line BitmapText object. Default 0.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, font: string, text?: string | string[], size?: number, align?: number);

            /**
             * The horizontal scroll position of the Bitmap Text.
             */
            scrollX: number;

            /**
             * The vertical scroll position of the Bitmap Text.
             */
            scrollY: number;

            /**
             * The crop width of the Bitmap Text.
             */
            cropWidth: number;

            /**
             * The crop height of the Bitmap Text.
             */
            cropHeight: number;

            /**
             * A callback that alters how each character of the Bitmap Text is rendered.
             */
            displayCallback: Phaser.Types.GameObjects.BitmapText.DisplayCallback;

            /**
             * The data object that is populated during rendering, then passed to the displayCallback.
             * You should modify this object then return it back from the callback. Its updated values
             * will be used to render the specific glyph.
             * 
             * Please note that if you need a reference to this object locally in your game code then you
             * should shallow copy it, as it's updated and re-used for every glyph in the text.
             */
            callbackData: Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig;

            /**
             * Set the crop size of this Bitmap Text.
             * @param width The width of the crop.
             * @param height The height of the crop.
             * @returns This Game Object.
             */
            setSize(width: number, height: number): this;

            /**
             * Set a callback that alters how each character of the Bitmap Text is rendered.
             * 
             * The callback receives a {@link Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig} object that contains information about the character that's
             * about to be rendered.
             * 
             * It should return an object with `x`, `y`, `scale` and `rotation` properties that will be used instead of the
             * usual values when rendering.
             * @param callback The display callback to set.
             * @returns This Game Object.
             */
            setDisplayCallback(callback: Phaser.Types.GameObjects.BitmapText.DisplayCallback): this;

            /**
             * Set the horizontal scroll position of this Bitmap Text.
             * @param value The horizontal scroll position to set.
             * @returns This Game Object.
             */
            setScrollX(value: number): this;

            /**
             * Set the vertical scroll position of this Bitmap Text.
             * @param value The vertical scroll position to set.
             * @returns This Game Object.
             */
            setScrollY(value: number): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * 
             * Calling this method will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.
             * @param frame The name or index of the frame within the Texture.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call change the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setTexture(key: string | Phaser.Textures.Texture, frame?: string | number, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.
         * 
         * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to
         * match the font structure.
         * 
         * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability
         * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by
         * processing the font texture in an image editor, applying fills and any other effects required.
         * 
         * To create multi-line text insert \r, \n or \r\n escape codes into the text string.
         * 
         * To create a BitmapText data files you need a 3rd party app such as:
         * 
         * BMFont (Windows, free): {@link http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/}
         * Glyph Designer (OS X, commercial): {@link http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner}
         * Snow BMF (Web-based, free): {@link https://snowb.org//|https://snowb.org/}
         * Littera (Flash-based, free): {@link http://kvazars.com/littera/|http://kvazars.com/littera/}
         * 
         * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of
         * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: {@link http://codebeautify.org/xmltojson|http://codebeautify.org/xmltojson}
         */
        class BitmapText extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.
             * @param x The x coordinate of this Game Object in world space.
             * @param y The y coordinate of this Game Object in world space.
             * @param font The key of the font to use from the Bitmap Font cache.
             * @param text The string, or array of strings, to be set as the content of this Bitmap Text.
             * @param size The font size of this Bitmap Text.
             * @param align The alignment of the text in a multi-line BitmapText object. Default 0.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, font: string, text?: string | string[], size?: number, align?: number);

            /**
             * The key of the Bitmap Font used by this Bitmap Text.
             * To change the font after creation please use `setFont`.
             */
            readonly font: string;

            /**
             * The data of the Bitmap Font used by this Bitmap Text.
             */
            readonly fontData: Phaser.Types.GameObjects.BitmapText.BitmapFontData;

            /**
             * The character code used to detect for word wrapping.
             * Defaults to 32 (a space character).
             */
            wordWrapCharCode: number;

            /**
             * The horizontal offset of the drop shadow.
             * 
             * You can set this directly, or use `Phaser.GameObjects.BitmapText#setDropShadow`.
             */
            dropShadowX: number;

            /**
             * The vertical offset of the drop shadow.
             * 
             * You can set this directly, or use `Phaser.GameObjects.BitmapText#setDropShadow`.
             */
            dropShadowY: number;

            /**
             * The color of the drop shadow.
             * 
             * You can set this directly, or use `Phaser.GameObjects.BitmapText#setDropShadow`.
             */
            dropShadowColor: number;

            /**
             * The alpha value of the drop shadow.
             * 
             * You can set this directly, or use `Phaser.GameObjects.BitmapText#setDropShadow`.
             */
            dropShadowAlpha: number;

            /**
             * Indicates whether the font texture is from an atlas or not.
             */
            readonly fromAtlas: boolean;

            /**
             * Set the lines of text in this BitmapText to be left-aligned.
             * This only has any effect if this BitmapText contains more than one line of text.undefined
             * @returns This BitmapText Object.
             */
            setLeftAlign(): this;

            /**
             * Set the lines of text in this BitmapText to be center-aligned.
             * This only has any effect if this BitmapText contains more than one line of text.undefined
             * @returns This BitmapText Object.
             */
            setCenterAlign(): this;

            /**
             * Set the lines of text in this BitmapText to be right-aligned.
             * This only has any effect if this BitmapText contains more than one line of text.undefined
             * @returns This BitmapText Object.
             */
            setRightAlign(): this;

            /**
             * Set the font size of this Bitmap Text.
             * @param size The font size to set.
             * @returns This BitmapText Object.
             */
            setFontSize(size: number): this;

            /**
             * Sets the letter spacing between each character of this Bitmap Text.
             * Can be a positive value to increase the space, or negative to reduce it.
             * Spacing is applied after the kerning values have been set.
             * @param spacing The amount of horizontal space to add between each character. Default 0.
             * @returns This BitmapText Object.
             */
            setLetterSpacing(spacing?: number): this;

            /**
             * Sets the line spacing value. This value is added to the font height to
             * calculate the overall line height.
             * 
             * Spacing can be a negative or positive number.
             * 
             * Only has an effect if this BitmapText object contains multiple lines of text.
             * @param spacing The amount of space to add between each line in multi-line text. Default 0.
             * @returns This BitmapText Object.
             */
            setLineSpacing(spacing?: number): this;

            /**
             * Set the textual content of this BitmapText.
             * 
             * An array of strings will be converted into multi-line text. Use the align methods to change multi-line alignment.
             * @param value The string, or array of strings, to be set as the content of this BitmapText.
             * @returns This BitmapText Object.
             */
            setText(value: string | string[]): this;

            /**
             * Sets a drop shadow effect on this Bitmap Text.
             * 
             * This is a WebGL only feature and only works with Static Bitmap Text, not Dynamic.
             * 
             * You can set the vertical and horizontal offset of the shadow, as well as the color and alpha.
             * 
             * Once a shadow has been enabled you can modify the `dropShadowX` and `dropShadowY` properties of this
             * Bitmap Text directly to adjust the position of the shadow in real-time.
             * 
             * If you wish to clear the shadow, call this method with no parameters specified.
             * @param x The horizontal offset of the drop shadow. Default 0.
             * @param y The vertical offset of the drop shadow. Default 0.
             * @param color The color of the drop shadow, given as a hex value, i.e. `0x000000` for black. Default 0x000000.
             * @param alpha The alpha of the drop shadow, given as a float between 0 and 1. This is combined with the Bitmap Text alpha as well. Default 0.5.
             * @returns This BitmapText Object.
             */
            setDropShadow(x?: number, y?: number, color?: number, alpha?: number): this;

            /**
             * Sets a tint on a range of characters in this Bitmap Text, starting from the `start` parameter index
             * and running for `length` quantity of characters.
             * 
             * The `start` parameter can be negative. In this case, it starts at the end of the text and counts
             * backwards `start` places.
             * 
             * You can also pass in -1 as the `length` and it will tint all characters from `start`
             * up until the end of the string.
             * Remember that spaces and punctuation count as characters.
             * 
             * This is a WebGL only feature and only works with Static Bitmap Text, not Dynamic.
             * 
             * The tint applies a color to the pixel color values
             * from the Bitmap Text texture in one of several modes:
             * 
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * You can provide either one color value,
             * in which case the whole character will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the character range.
             * 
             * To modify the tint color once set, call this method again with new color values.
             * 
             * Using `setWordTint` can override tints set by this function, and vice versa.
             * 
             * To remove a tint call this method with just the `start`, and optionally, the `length` parameters defined.
             * @param start The starting character to begin the tint at. If negative, it counts back from the end of the text. Default 0.
             * @param length The number of characters to tint. Remember that spaces count as a character too. Pass -1 to tint all characters from `start` onwards. Default 1.
             * @param tintMode The tint mode to use. Default Phaser.TintModes.MULTIPLY.
             * @param topLeft The tint being applied to the top-left of the character. If no other values are given this value is applied evenly, tinting the whole character. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the character.
             * @param bottomLeft The tint being applied to the bottom-left of the character.
             * @param bottomRight The tint being applied to the bottom-right of the character.
             * @returns This BitmapText Object.
             */
            setCharacterTint(start?: number, length?: number, tintMode?: number, topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets a tint on a matching word within this Bitmap Text.
             * 
             * The `word` parameter can be either a string or a number.
             * 
             * If a string, it will run a string comparison against the text contents, and if matching,
             * it will tint the whole word.
             * 
             * If a number, it will tint that word, based on its index within the words array.
             * 
             * The `count` parameter controls how many words are replaced. Pass in -1 to replace them all.
             * 
             * This parameter is ignored if you pass a number as the `word` to be searched for.
             * 
             * This is a WebGL only feature and only works with Static Bitmap Text, not Dynamic.
             * 
             * The tint applies a color to the pixel color values
             * from the Bitmap Text texture in one of several modes:
             * 
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * You can provide either one color value,
             * in which case the whole character will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the character range.
             * 
             * To modify the tint color once set, call this method again with new color values.
             * 
             * Using `setCharacterTint` can override tints set by this function, and vice versa.
             * @param word The word to search for. Either a string, or an index of the word in the words array.
             * @param count The number of matching words to tint. Pass -1 to tint all matching words. Default 1.
             * @param tintMode The tint mode to use. Default Phaser.TintModes.MULTIPLY.
             * @param topLeft The tint being applied to the top-left of the word. If no other values are given this value is applied evenly, tinting the whole word. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the word.
             * @param bottomLeft The tint being applied to the bottom-left of the word.
             * @param bottomRight The tint being applied to the bottom-right of the word.
             * @returns This BitmapText Object.
             */
            setWordTint(word: string | number, count?: number, tintMode?: number, topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Calculate the bounds of this Bitmap Text.
             * 
             * An object is returned that contains the position, width and height of the Bitmap Text in local and global
             * contexts.
             * 
             * Local size is based on just the font size and a [0, 0] position.
             * 
             * Global size takes into account the Game Object's scale, world position and display origin.
             * 
             * Also in the object is data regarding the length of each line, should this be a multi-line BitmapText.
             * @param round Whether to round the results up to the nearest integer. Default false.
             * @returns An object that describes the size of this Bitmap Text.
             */
            getTextBounds(round?: boolean): Phaser.Types.GameObjects.BitmapText.BitmapTextSize;

            /**
             * Gets the character located at the given x/y coordinate within this Bitmap Text.
             * 
             * The coordinates you pass in are translated into the local space of the
             * Bitmap Text, however, it is up to you to first translate the input coordinates to world space.
             * 
             * If you wish to use this in combination with an input event, be sure
             * to pass in `Pointer.worldX` and `worldY` so they are in world space.
             * 
             * In some cases, based on kerning, characters can overlap. When this happens,
             * the first character in the word is returned.
             * 
             * Note that this does not work for DynamicBitmapText if you have changed the
             * character positions during render. It will only scan characters in their un-translated state.
             * @param x The x position to check.
             * @param y The y position to check.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The character object at the given position, or `null`.
             */
            getCharacterAt(x: number, y: number, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Types.GameObjects.BitmapText.BitmapTextCharacter;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Changes the font this BitmapText is using to render.
             * 
             * The new texture is loaded and applied to the BitmapText. The existing text, size and alignment are preserved,
             * unless overridden via the arguments.
             * @param font The key of the font to use from the Bitmap Font cache.
             * @param size The font size of this Bitmap Text. If not specified the current size will be used.
             * @param align The alignment of the text in a multi-line BitmapText object. If not specified the current alignment will be used. Default 0.
             * @returns This BitmapText Object.
             */
            setFont(font: string, size?: number, align?: number): this;

            /**
             * Sets the maximum display width of this BitmapText in pixels.
             * 
             * If `BitmapText.text` is longer than `maxWidth` then the lines will be automatically wrapped
             * based on the previous whitespace character found in the line.
             * 
             * If no whitespace was found then no wrapping will take place and consequently the `maxWidth` value will not be honored.
             * 
             * Disable maxWidth by setting the value to 0.
             * 
             * You can set the whitespace character to be searched for by setting the `wordWrapCharCode` parameter or property.
             * @param value The maximum display width of this BitmapText in pixels. Set to zero to disable.
             * @param wordWrapCharCode The character code to check for when word wrapping. Defaults to 32 (the space character).
             * @returns This BitmapText Object.
             */
            setMaxWidth(value: number, wordWrapCharCode?: number): this;

            /**
             * Sets the display size of this BitmapText Game Object.
             * 
             * Calling this will adjust the scale.
             * @param width The width of this BitmapText Game Object.
             * @param height The height of this BitmapText Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * Controls the alignment of each line of text in this BitmapText object.
             * 
             * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns.
             * Has no effect with single-lines of text.
             * 
             * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`.
             * 
             * 0 = Left aligned (default)
             * 1 = Middle aligned
             * 2 = Right aligned
             * 
             * The alignment position is based on the longest line of text.
             */
            align: number;

            /**
             * The text that this Bitmap Text object displays.
             * 
             * You can also use the method `setText` if you want a chainable way to change the text content.
             */
            text: string;

            /**
             * The font size of this Bitmap Text.
             * 
             * You can also use the method `setFontSize` if you want a chainable way to change the font size.
             */
            fontSize: number;

            /**
             * Adds / Removes spacing between characters.
             * 
             * Can be a negative or positive number.
             * 
             * You can also use the method `setLetterSpacing` if you want a chainable way to change the letter spacing.
             */
            letterSpacing: number;

            /**
             * Adds / Removes spacing between lines.
             * 
             * Can be a negative or positive number.
             * 
             * You can also use the method `setLineSpacing` if you want a chainable way to change the line spacing.
             */
            lineSpacing: number;

            /**
             * The maximum display width of this BitmapText in pixels.
             * 
             * If BitmapText.text is longer than maxWidth then the lines will be automatically wrapped
             * based on the last whitespace character found in the line.
             * 
             * If no whitespace was found then no wrapping will take place and consequently the maxWidth value will not be honored.
             * 
             * Disable maxWidth by setting the value to 0.
             */
            maxWidth: number;

            /**
             * The width of this Bitmap Text.
             * 
             * This property is read-only.
             */
            readonly width: number;

            /**
             * The height of this Bitmap Text.
             * 
             * This property is read-only.
             */
            readonly height: number;

            /**
             * The displayed width of this Bitmap Text.
             * 
             * This value takes into account the scale factor.
             * 
             * This property is read-only.
             */
            readonly displayWidth: number;

            /**
             * The displayed height of this Bitmap Text.
             * 
             * This value takes into account the scale factor.
             * 
             * This property is read-only.
             */
            readonly displayHeight: number;

            /**
             * Build a JSON representation of this Bitmap Text.undefined
             * @returns A JSON representation of this Bitmap Text.
             */
            toJSON(): Phaser.Types.GameObjects.BitmapText.JSONBitmapText;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * Left align the text characters in a multi-line BitmapText object.
             */
            static ALIGN_LEFT: number;

            /**
             * Center align the text characters in a multi-line BitmapText object.
             */
            static ALIGN_CENTER: number;

            /**
             * Right align the text characters in a multi-line BitmapText object.
             */
            static ALIGN_RIGHT: number;

            /**
             * Parse an XML Bitmap Font from an Atlas.
             * 
             * Adds the parsed Bitmap Font data to the cache with the `fontName` key.
             * @param scene The Scene to parse the Bitmap Font for.
             * @param fontName The key of the font to add to the Bitmap Font cache.
             * @param textureKey The key of the BitmapFont's texture.
             * @param frameKey The key of the BitmapFont texture's frame.
             * @param xmlKey The key of the XML data of the font to parse.
             * @param xSpacing The x-axis spacing to add between each letter.
             * @param ySpacing The y-axis spacing to add to the line height.
             * @returns Whether the parsing was successful or not.
             */
            static ParseFromAtlas(scene: Phaser.Scene, fontName: string, textureKey: string, frameKey: string, xmlKey: string, xSpacing?: number, ySpacing?: number): boolean;

            /**
             * Parse an XML font to Bitmap Font data for the Bitmap Font cache.
             * @param xml The XML Document to parse the font from.
             * @param frame The texture frame to take into account when creating the uv data.
             * @param xSpacing The x-axis spacing to add between each letter. Default 0.
             * @param ySpacing The y-axis spacing to add to the line height. Default 0.
             * @returns The parsed Bitmap Font data.
             */
            static ParseXMLBitmapFont(xml: XMLDocument, frame: Phaser.Textures.Frame, xSpacing?: number, ySpacing?: number): Phaser.Types.GameObjects.BitmapText.BitmapFontData;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * 
             * Calling this method will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.
             * @param frame The name or index of the frame within the Texture.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call change the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setTexture(key: string | Phaser.Textures.Texture, frame?: string | number, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Blitter Game Object.
         * 
         * The Blitter Game Object is a special kind of container that creates, updates and manages Bob objects.
         * Bobs are designed for rendering speed rather than flexibility. They consist of a texture, or frame from a texture,
         * a position and an alpha value. You cannot scale or rotate them. They use a batched drawing method for speed
         * during rendering.
         * 
         * A Blitter Game Object has one texture bound to it. Bobs created by the Blitter can use any Frame from this
         * Texture to render with, but they cannot use any other Texture. It is this single texture-bind that allows
         * them their speed.
         * 
         * If you have a need to blast a large volume of frames around the screen then Blitter objects are well worth
         * investigating. They are especially useful for using as a base for your own special effects systems.
         */
        class Blitter extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.
             * @param x The x coordinate of this Game Object in world space. Default 0.
             * @param y The y coordinate of this Game Object in world space. Default 0.
             * @param texture The key of the texture this Game Object will use for rendering. The Texture must already exist in the Texture Manager. Default '__DEFAULT'.
             * @param frame The Frame of the Texture that this Game Object will use. Only set if the Texture has multiple frames, such as a Texture Atlas or Sprite Sheet. Default 0.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, texture?: string, frame?: string | number);

            /**
             * The children of this Blitter.
             * This List contains all of the Bob objects created by the Blitter.
             */
            children: Phaser.Structs.List<Phaser.GameObjects.Bob>;

            /**
             * Is the Blitter considered dirty?
             * A 'dirty' Blitter has had its child count changed since the last frame.
             */
            dirty: boolean;

            /**
             * Creates a new Bob in this Blitter.
             * 
             * The Bob is created at the given coordinates, relative to the Blitter and uses the given frame.
             * A Bob can use any frame belonging to the texture bound to the Blitter.
             * @param x The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.
             * @param y The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.
             * @param frame The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.
             * @param visible Should the created Bob render or not? Default true.
             * @param index The position in the Blitter's Display List to add the new Bob at. Defaults to the top of the list.
             * @returns The newly created Bob object.
             */
            create(x: number, y: number, frame?: string | number | Phaser.Textures.Frame, visible?: boolean, index?: number): Phaser.GameObjects.Bob;

            /**
             * Creates multiple Bob objects within this Blitter and then passes each of them to the specified callback.
             * @param callback The callback to invoke after creating a bob. It will be sent two arguments: The Bob and the index of the Bob.
             * @param quantity The quantity of Bob objects to create.
             * @param frame The Frame the Bobs will use. It must be part of the Blitter Texture.
             * @param visible Should the created Bob render or not? Default true.
             * @returns An array of Bob objects that were created.
             */
            createFromCallback(callback: CreateCallback, quantity: number, frame?: string | number | Phaser.Textures.Frame | string[] | number[] | Phaser.Textures.Frame[], visible?: boolean): Phaser.GameObjects.Bob[];

            /**
             * Creates multiple Bobs in one call.
             * 
             * The amount created is controlled by a combination of the `quantity` argument and the number of frames provided.
             * 
             * If the quantity is set to 10 and you provide 2 frames, then 20 Bobs will be created. 10 with the first
             * frame and 10 with the second.
             * @param quantity The quantity of Bob objects to create.
             * @param frame The Frame the Bobs will use. It must be part of the Blitter Texture.
             * @param visible Should the created Bob render or not? Default true.
             * @returns An array of Bob objects that were created.
             */
            createMultiple(quantity: number, frame?: string | number | Phaser.Textures.Frame | string[] | number[] | Phaser.Textures.Frame[], visible?: boolean): Phaser.GameObjects.Bob[];

            /**
             * Checks if the given child can render or not, by checking its `visible` and `alpha` values.
             * @param child The Bob to check for rendering.
             * @returns Returns `true` if the given child can render, otherwise `false`.
             */
            childCanRender(child: Phaser.GameObjects.Bob): boolean;

            /**
             * Returns an array of Bobs to be rendered.
             * If the Blitter is dirty then a new list is generated and stored in `renderList`.undefined
             * @returns An array of Bob objects that will be rendered this frame.
             */
            getRenderList(): Phaser.GameObjects.Bob[];

            /**
             * Removes all Bobs from the children List and marks the Blitter as dirty.
             */
            clear(): void;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the size of this Game Object to be that of the given Frame.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param frame The frame to base the size of this Game Object on.
             * @returns This Game Object instance.
             */
            setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display (rendered) size of this Game Object in pixels.
             * 
             * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
             * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
             * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
             * the scale manually, but more convenient when you want to work in pixel values directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * 
             * Calling this method will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.
             * @param frame The name or index of the frame within the Texture.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call change the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setTexture(key: string | Phaser.Textures.Texture, frame?: string | number, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Bob Game Object.
         * 
         * A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object.
         * 
         * A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle
         * the flipped and visible state of the Bob. The Frame the Bob uses to render can be changed dynamically, but it
         * must be a Frame within the Texture used by the parent Blitter.
         * 
         * Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will
         * have their positions impacted by this change as well.
         * 
         * You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be
         * handled via the Blitter parent.
         */
        class Bob {
            /**
             * 
             * @param blitter The parent Blitter object is responsible for updating this Bob.
             * @param x The horizontal position of this Game Object in the world, relative to the parent Blitter position.
             * @param y The vertical position of this Game Object in the world, relative to the parent Blitter position.
             * @param frame The Frame this Bob will render with, as defined in the Texture the parent Blitter is using.
             * @param visible Should the Bob render visible or not to start with?
             */
            constructor(blitter: Phaser.GameObjects.Blitter, x: number, y: number, frame: string | number, visible: boolean);

            /**
             * The Blitter object that this Bob belongs to.
             */
            parent: Phaser.GameObjects.Blitter;

            /**
             * The x position of this Bob, relative to the x position of the Blitter.
             */
            x: number;

            /**
             * The y position of this Bob, relative to the y position of the Blitter.
             */
            y: number;

            /**
             * The frame that the Bob uses to render with.
             * To change the frame use the `Bob.setFrame` method.
             */
            protected frame: Phaser.Textures.Frame;

            /**
             * A blank object which can be used to store data related to this Bob in.
             */
            data: object;

            /**
             * The tint value of this Bob.
             */
            tint: number;

            /**
             * The horizontally flipped state of the Bob.
             * A Bob that is flipped horizontally will render inversed on the horizontal axis.
             * Flipping always takes place from the middle of the texture.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Bob.
             * A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down)
             * Flipping always takes place from the middle of the texture.
             */
            flipY: boolean;

            /**
             * Changes the Texture Frame being used by this Bob.
             * The frame must be part of the Texture the parent Blitter is using.
             * If no value is given it will use the default frame of the Blitter parent.
             * @param frame The frame to be used during rendering.
             * @returns This Bob Game Object.
             */
            setFrame(frame?: string | number | Phaser.Textures.Frame): this;

            /**
             * Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state.undefined
             * @returns This Bob Game Object.
             */
            resetFlip(): this;

            /**
             * Resets this Bob.
             * 
             * Changes the position to the values given, and optionally changes the frame.
             * 
             * Also resets the flipX and flipY values, sets alpha back to 1 and visible to true.
             * @param x The x position of the Bob. Bob coordinates are relative to the position of the Blitter object.
             * @param y The y position of the Bob. Bob coordinates are relative to the position of the Blitter object.
             * @param frame The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.
             * @returns This Bob Game Object.
             */
            reset(x: number, y: number, frame?: string | number | Phaser.Textures.Frame): this;

            /**
             * Changes the position of this Bob to the values given.
             * @param x The x position of the Bob. Bob coordinates are relative to the position of the Blitter object.
             * @param y The y position of the Bob. Bob coordinates are relative to the position of the Blitter object.
             * @returns This Bob Game Object.
             */
            setPosition(x: number, y: number): this;

            /**
             * Sets the horizontal flipped state of this Bob.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Bob Game Object.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Bob.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Bob Game Object.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Bob.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Bob Game Object.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Sets the visibility of this Bob.
             * 
             * An invisible Bob will skip rendering.
             * @param value The visible state of the Game Object.
             * @returns This Bob Game Object.
             */
            setVisible(value: boolean): this;

            /**
             * Set the Alpha level of this Bob. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * A Bob with alpha 0 will skip rendering.
             * @param value The alpha value used for this Bob. Between 0 and 1.
             * @returns This Bob Game Object.
             */
            setAlpha(value: number): this;

            /**
             * Sets the tint color applied to this Bob when it is rendered. The tint is a hex color value
             * that is multiplied with the Bob's texture, allowing you to colorize it without needing a
             * separate texture. A value of `0xffffff` (white) applies no tint. A value of `0xff0000` will
             * tint the Bob red.
             * @param value The tint value used for this Bob. Between 0 and 0xffffff.
             * @returns This Bob Game Object.
             */
            setTint(value: number): this;

            /**
             * Destroys this Bob instance.
             * Removes itself from the Blitter and clears the parent, frame and data properties.
             */
            destroy(): void;

            /**
             * The visible state of the Bob.
             * 
             * An invisible Bob will skip rendering.
             */
            visible: boolean;

            /**
             * The alpha value of the Bob, between 0 and 1.
             * 
             * A Bob with alpha 0 will skip rendering.
             */
            alpha: number;

        }

        /**
         * A CaptureFrame is a special type of GameObject that allows you to
         * capture the current state of the render.
         * For example, if you place a CaptureFrame between two other objects,
         * it will capture the first object to a texture, but not the second.
         * This is useful for full-scene post-processing prior to render completion,
         * such as a layer of water.
         * 
         * This is a WebGL only feature and is not available in Canvas mode.
         * 
         * You must activate the `forceComposite` property of the Camera,
         * or otherwise use this object within a framebuffer, to use this feature.
         * Examples of framebuffer situations include Filters, DynamicTexture,
         * and a camera with alpha between 0 and 1.
         * 
         * This object does not render anything. It simply captures a texture
         * from the current framebuffer at the moment it 'renders'.
         * If you add filters to this object, it will capture the clear, temporary
         * framebuffer used for the filter, not the main framebuffer.
         * If you add filters to a Container that contains this object,
         * it will capture only objects within that Container.
         * If you set `visible` to `false`, it will just stop capturing.
         */
        class CaptureFrame extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this CaptureFrame belongs.
             * @param key The key of the texture to create from this CaptureFrame.
             */
            constructor(scene: Phaser.Scene, key: string);

            /**
             * The drawing context of this CaptureFrame.
             * This contains the WebGL framebuffer and texture data.
             */
            drawingContext: Phaser.Renderer.WebGL.DrawingContext;

            /**
             * A texture containing the captured frame.
             * This is updated when the GameObject renders.
             */
            captureTexture: Phaser.Textures.Texture;

            /**
             * Set the alpha value of this CaptureFrame.
             * This has no effect and is only present for compatibility with other Game Objects.
             * @param alpha The alpha value (not used).
             * @returns This Game Object instance, for method chaining.
             */
            setAlpha(alpha: number): this;

            /**
             * Set the scroll factor of this CaptureFrame.
             * This has no effect and is only present for compatibility with other Game Objects.
             * @param x The horizontal scroll factor (not used).
             * @param y The vertical scroll factor (not used).
             * @returns This Game Object instance, for method chaining.
             */
            setScrollFactor(x: number, y: number): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        namespace Components {
            /**
             * Provides methods and properties for managing the alpha (opacity) of a Game Object.
             * Alpha values range from 0 (fully transparent) to 1 (fully opaque).
             * 
             * Under WebGL, alpha can be set independently for each of the four corners of the
             * Game Object, allowing gradient transparency effects. Under Canvas, only a single
             * global alpha value is used.
             * 
             * This component is designed to be applied as a mixin to Game Objects and should
             * not be used directly.
             */
            interface Alpha {
                /**
                 * Clears all alpha values associated with this Game Object.
                 * 
                 * Immediately sets the alpha levels back to 1 (fully opaque).undefined
                 * @returns This Game Object instance.
                 */
                clearAlpha(): this;
                /**
                 * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
                 * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
                 * 
                 * If your game is running under WebGL you can optionally specify four different alpha values, each of which
                 * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
                 * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
                 * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
                 * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
                 * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
                 * @returns This Game Object instance.
                 */
                setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;
                /**
                 * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
                 * 
                 * This is a global value that impacts the entire Game Object. Setting it also updates
                 * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
                 * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
                 */
                alpha: number;
                /**
                 * The alpha value starting from the top-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopLeft: number;
                /**
                 * The alpha value starting from the top-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopRight: number;
                /**
                 * The alpha value starting from the bottom-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomLeft: number;
                /**
                 * The alpha value starting from the bottom-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomRight: number;
            }

            /**
             * Provides methods used for setting the alpha property of a Game Object.
             * Unlike the full Alpha component, which supports individual alpha values for each corner
             * of a Game Object, this component applies a single uniform alpha across the whole object.
             * Should be applied as a mixin and not used directly.
             */
            interface AlphaSingle {
                /**
                 * Clears the alpha value associated with this Game Object.
                 * 
                 * Immediately sets the alpha back to 1 (fully opaque).undefined
                 * @returns This Game Object instance.
                 */
                clearAlpha(): this;
                /**
                 * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
                 * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
                 * @param value The alpha value applied across the whole Game Object. Default 1.
                 * @returns This Game Object instance.
                 */
                setAlpha(value?: number): this;
                /**
                 * The alpha value of the Game Object.
                 * 
                 * This is a global value, impacting the entire Game Object, not just a region of it.
                 * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
                 * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
                 */
                alpha: number;
            }

            /**
             * Provides methods used for setting the blend mode of a Game Object.
             * Blend modes control how a Game Object is composited onto the display when rendered.
             * They determine how the pixels of the object are blended with the pixels already on screen,
             * enabling effects such as additive lighting, screen blending, and erasing.
             * 
             * This component is designed to be applied as a mixin to Game Objects and should not be
             * used directly. Any Game Object that mixes in this component gains the `blendMode` property
             * and the `setBlendMode` method.
             */
            interface BlendMode {
                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 */
                blendMode: Phaser.BlendModes | string | number;
                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 * @param value The BlendMode value. Either a string, a CONST or a number.
                 * @returns This Game Object instance.
                 */
                setBlendMode(value: string | Phaser.BlendModes | number): this;
            }

            /**
             * Provides methods used for calculating and setting the size of a non-Frame based Game Object.
             * A non-Frame based Game Object is one that derives its dimensions from internal logic rather
             * than from a texture frame, such as Graphics, Text, or BitmapText objects.
             * 
             * The component exposes `width` and `height` as the native (un-scaled) dimensions, and
             * `displayWidth` and `displayHeight` as the rendered dimensions after the scale factor is applied.
             * 
             * Should be applied as a mixin and not used directly.
             */
            interface ComputedSize {
                /**
                 * The native (un-scaled) width of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayWidth` property.
                 */
                width: number;
                /**
                 * The native (un-scaled) height of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayHeight` property.
                 */
                height: number;
                /**
                 * The displayed width of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayWidth: number;
                /**
                 * The displayed height of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayHeight: number;
                /**
                 * Sets the internal size of this Game Object, as used for frame or physics body creation.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setSize(width: number, height: number): this;
                /**
                 * Sets the display size of this Game Object.
                 * 
                 * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
                 * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
                 * manually, but expressed in pixels rather than as a multiplier.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setDisplaySize(width: number, height: number): this;
            }

            /**
             * The Crop component provides the ability to crop the texture frame of a Game Object during rendering.
             * 
             * It is applied as a mixin to Game Objects such as Sprite and Image, adding the `setCrop` method and
             * related properties. Cropping limits the visible rectangular region of a texture frame without altering
             * the Game Object's size, position, physics body, or hit area — only the rendered output is affected.
             * The crop region is always relative to the texture frame's top-left origin and is automatically scaled
             * to account for the Game Object's scale.
             */
            interface Crop {
                /**
                 * The Texture this Game Object is using to render with.
                 */
                texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;
                /**
                 * The Texture Frame this Game Object is using to render with.
                 */
                frame: Phaser.Textures.Frame;
                /**
                 * A boolean flag indicating if this Game Object is being cropped or not.
                 * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
                 * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
                 */
                isCropped: boolean;
                /**
                 * Applies a crop to a texture based Game Object, such as a Sprite or Image.
                 * 
                 * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
                 * 
                 * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
                 * changes what is shown when rendered.
                 * 
                 * The crop size as well as coordinates cannot exceed the size of the texture frame.
                 * 
                 * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
                 * 
                 * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
                 * half of it, you could call `setCrop(0, 0, 400, 600)`.
                 * 
                 * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
                 * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
                 * 
                 * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
                 * 
                 * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
                 * 
                 * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
                 * the renderer to skip several internal calculations.
                 * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
                 * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
                 * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
                 * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
                 * @returns This Game Object instance.
                 */
                setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;
            }

            /**
             * Provides methods used for setting the depth of a Game Object.
             * Should be applied as a mixin and not used directly.
             */
            interface Depth {
                /**
                 * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * The default depth is zero. A Game Object with a higher depth
                 * value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 */
                depth: number;
                /**
                 * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * A Game Object with a higher depth value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
                 * @returns This Game Object instance.
                 */
                setDepth(value: number): this;
                /**
                 * Sets this Game Object to be at the top of the display list, or the top of its parent container.
                 * 
                 * Being at the top means it will render on top of everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToTop(): this;
                /**
                 * Sets this Game Object to the back of the display list, or the back of its parent container.
                 * 
                 * Being at the back means it will render below everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToBack(): this;
                /**
                 * Move this Game Object so that it appears above the given Game Object.
                 * 
                 * This means it will render immediately after the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be above.
                 * @returns This Game Object instance.
                 */
                setAbove(gameObject: Phaser.GameObjects.GameObject): this;
                /**
                 * Move this Game Object so that it appears below the given Game Object.
                 * 
                 * This means it will render immediately under the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be below.
                 * @returns This Game Object instance.
                 */
                setBelow(gameObject: Phaser.GameObjects.GameObject): this;
            }

            /**
             * Provides methods for managing an elapse timer on a Game Object.
             * The timer is used to drive animations and other time-based effects.
             * 
             * This is not necessary for normal animations.
             * It is intended to drive shader effects that require a time value.
             * 
             * If you are adding this component to a Game Object,
             * ensure that you register a preUpdate method on the Game Object, e.g.:
             * 
             * ```javascript
             * //  Overrides Game Object method
             * addedToScene: function ()
             * {
             *     this.scene.sys.updateList.add(this);
             * },
             * 
             * //  Overrides Game Object method
             * removedFromScene: function ()
             * {
             *     this.scene.sys.updateList.remove(this);
             * },
             * 
             * preUpdate: function (time, delta)
             * {
             *    this.updateTimer(time, delta);
             * }
             * ```
             */
            interface ElapseTimer {
                /**
                 * The time elapsed since timer initialization, in milliseconds.
                 */
                timeElapsed: number;
                /**
                 * The time after which `timeElapsed` will reset, in milliseconds.
                 * By default, this is 1 hour.
                 * If you use the timer for animations, you can set this to a period
                 * that matches the animation durations.
                 * 
                 * This is necessary for the timer to avoid floating-point precision issues
                 * in shaders.
                 * A float32 can represent a few hours of milliseconds accurately,
                 * but the precision decreases as the value increases.
                 */
                timeElapsedResetPeriod: number;
                /**
                 * Whether the elapse timer is paused.
                 */
                timePaused: boolean;
                /**
                 * Set the reset period for the elapse timer for this game object.
                 * @param period The time after which `timeElapsed` will reset, in milliseconds.
                 * @returns This game object.
                 */
                setTimerResetPeriod(period: number): this;
                /**
                 * Pauses or resumes the elapse timer for this game object.
                 * @param paused Pause state (`true` to pause, `false` to unpause). If not specified, the timer will unpause.
                 * @returns This game object.
                 */
                setTimerPaused(paused?: boolean): this;
                /**
                 * Reset the elapse timer for this game object.
                 * @param ms The time to reset the timer to, in milliseconds. Default 0.
                 * @returns This game object.
                 */
                resetTimer(ms?: number): this;
                /**
                 * Update the elapse timer for this game object.
                 * This should be called automatically by the preUpdate method.
                 * 
                 * Override this method to create more advanced time management,
                 * or set it to a NOOP function to disable the timer update.
                 * If you want to control animations with a tween or input system,
                 * disabling the timer update could be useful.
                 * @param time The current time in milliseconds.
                 * @param delta The time since the last update, in milliseconds.
                 * @returns This game object.
                 */
                updateTimer(time: number, delta: number): this;
            }

            /**
             * A list of filters being applied to a {@link Phaser.Cameras.Scene2D.Camera}.
             * 
             * Filters can apply special effects and masks.
             * They are only available in WebGL.
             * Use `gameObject.enableFilters()` to apply them to Game Objects.
             * 
             * Filters include the following:
             * 
             * * Barrel Distortion
             * * Blend
             * * Blocky
             * * Blur
             * * Bokeh / Tilt Shift
             * * Color Matrix
             * * Displacement
             * * Glow
             * * Key
             * * Mask
             * * Parallel Filters
             * * Pixelate
             * * Sampler
             * * Shadow
             * * Threshold
             * 
             * This list is either 'internal' or 'external'.
             * Internal filters apply to things within the camera.
             * External filters apply to the camera itself, in its rendering context.
             * A complete list of rendering steps for a Camera goes:
             * 
             * 1. Objects render to a texture the size of the camera.
             * 2. Internal filters draw that texture to new textures, applying effects.
             *   These are usually the same size, but may expand to accommodate blur.
             * 3. The texture is drawn to a texture the size of the context where the camera
             *   will be drawn, accounting for transformation of the camera itself.
             * 4. External filters draw that texture to new textures,
             *   again applying effects and expanding where necessary.
             * 5. The final texture draws the filtered camera contents to the context.
             * 
             * For example, consider a game object which is rotated 45 degrees.
             * Apply a horizontal blur filter.
             * If the filter is internal, the blur will appear at 45 degrees,
             * because it is applied before the object is rotated.
             * If the filter is external, the blur will appear horizontal,
             * because it is applied after the object is rotated.
             * 
             * You should use internal filters wherever possible,
             * because they apply only to the region of the camera/game object.
             * External filters are full-screen and can be more expensive.
             * 
             * Filters can be stacked. The order of the list is the order of application.
             * 
             * As you can appreciate, some effects are more expensive than others. For example, a bloom effect is going to be more
             * expensive than a simple color matrix effect, so please consider using them wisely and performance test your target
             * platforms early on in production.
             * 
             * This FilterList is created internally and does not need to be instantiated directly.
             * 
             * In Phaser 3, Filters were known as FX.
             */
            class FilterList {
                /**
                 * 
                 * @param camera The Camera that owns this list.
                 */
                constructor(camera: Phaser.Cameras.Scene2D.Camera);

                /**
                 * Adds a Parallel Filters effect.
                 * 
                 * This filter controller splits the input into two lists of filters,
                 * runs each list separately, and then blends the results together.
                 * 
                 * The Parallel Filters effect is useful for reusing an input.
                 * Ordinarily, a filter modifies the input and passes it to the next filter.
                 * This effect allows you to split the input and re-use it elsewhere.
                 * It does not gain performance benefits from parallel processing;
                 * it is a convenience for reusing the input.
                 * 
                 * The Parallel Filters effect is not a filter itself.
                 * It is a controller that manages two FilterLists,
                 * and the final Blend filter that combines the results.
                 * The FilterLists are named 'top' and 'bottom'.
                 * The 'top' output is applied as a blend texture to the 'bottom' output.
                 * 
                 * You do not have to populate both lists. If only one is populated,
                 * it will be blended with the original input at the end.
                 * This is useful when you want to retain image data that would be lost
                 * in the filter process.undefined
                 * @returns The new Parallel Filters filter controller.
                 */
                addParallelFilters(): Phaser.Filters.ParallelFilters;

                /**
                 * The Camera that owns this list.
                 */
                camera: Phaser.Cameras.Scene2D.Camera;

                /**
                 * The list of filters.
                 * 
                 * This list can be manipulated directly.
                 * If you want to add or remove filters,
                 * please use the appropriate methods to ensure they are handled correctly.
                 * Moving filters around in the list is safe.
                 */
                list: Phaser.Filters.Controller[];

                /**
                 * Destroys and removes all filters in this list.undefined
                 * @returns This FilterList instance.
                 */
                clear(): this;

                /**
                 * Adds a filter to this list.
                 * @param filter The filter to add.
                 * @param index The index to insert the filter at. If not given, the filter is added to the end of the list. If negative, it is inserted from the end.
                 * @returns The filter that was added.
                 */
                add(filter: Phaser.Filters.Controller, index?: number): Phaser.Filters.Controller;

                /**
                 * Removes a filter from this list, then destroys it.
                 * @param filter The filter to remove.
                 * @param forceDestroy If `true`, the filter will be destroyed even if it has the `ignoreDestroy` flag set. Default false.
                 * @returns This FilterList instance.
                 */
                remove(filter: Phaser.Filters.Controller, forceDestroy?: boolean): this;

                /**
                 * Returns all active filters in this list.undefined
                 * @returns The active filters in this list.
                 */
                getActive(): Phaser.Filters.Controller[];

                /**
                 * Adds a Barrel effect.
                 * 
                 * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to
                 * a Game Object. The amount of the effect can be modified in real-time.
                 * @param amount The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1. Default 1.
                 * @returns The new Barrel filter controller.
                 */
                addBarrel(amount?: number): Phaser.Filters.Barrel;

                /**
                 * Adds a Blend effect.
                 * 
                 * A blend effect allows you to apply another texture to the view
                 * using a specific blend mode.
                 * This supports blend modes not otherwise available in WebGL.
                 * @param texture The texture to apply to the view. Default '__WHITE'.
                 * @param blendMode The blend mode to apply to the view. Default Phaser.BlendModes.NORMAL.
                 * @param amount The amount of the blend effect to apply to the view. At 0, the original image is preserved. At 1, the blend texture is fully applied. The expected range is 0 to 1, but you can go outside that range for different effects. Default 1.
                 * @param color The color to apply to the blend texture. Each value corresponds to a color channel in RGBA. The expected range is 0 to 1, but you can go outside that range for different effects. Default [1, 1, 1, 1].
                 * @returns The new Blend filter controller.
                 */
                addBlend(texture?: string, blendMode?: Phaser.BlendModes, amount?: number, color?: number[]): Phaser.Filters.Blend;

                /**
                 * Adds a Blocky effect.
                 * 
                 * This filter controller manages a blocky effect.
                 * 
                 * The blocky effect works by taking the central pixel of a block of pixels
                 * and using it to fill the entire block, creating a pixelated effect.
                 * 
                 * It reduces the resolution of an image,
                 * creating a pixelated or blocky appearance.
                 * This is often used for stylistic purposes, such as pixel art.
                 * One technique is to render the game at a higher resolution,
                 * scaled up by a factor of N,
                 * and then apply the blocky effect at size N.
                 * This creates large, visible pixels, suitable for further stylization.
                 * The effect can also be used to obscure certain elements within the game,
                 * such as during a transition or to censor specific content.
                 * 
                 * Blocky works best on games with no anti-aliasing,
                 * so it can read unfiltered pixel colors from the original image.
                 * It preserves the colors of the original art, instead of blending them
                 * like the Pixelate filter.
                 * @param config The configuration object for the Blocky effect.
                 * @returns The new Blocky filter controller.
                 */
                addBlocky(config?: Phaser.Types.Filters.BlockyConfig): Phaser.Filters.Blocky;

                /**
                 * Adds a Blur effect.
                 * 
                 * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,
                 * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a
                 * smooth blur resembling that of viewing the image through a translucent screen, distinctly different
                 * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.
                 * @param quality The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality. Default 0.
                 * @param x The horizontal offset of the blur effect. Default 2.
                 * @param y The vertical offset of the blur effect. Default 2.
                 * @param strength The strength of the blur effect. Default 1.
                 * @param color The color of the blur, as a hex value. Default 0xffffff.
                 * @param steps The number of steps to run the blur effect for. This value should always be an integer. Default 4.
                 * @returns The new Blur filter controller.
                 */
                addBlur(quality?: number, x?: number, y?: number, strength?: number, color?: number, steps?: number): Phaser.Filters.Blur;

                /**
                 * Adds a Bokeh effect.
                 * 
                 * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.
                 * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground
                 * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering
                 * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.
                 * 
                 * See also Tilt Shift.
                 * @param radius The radius of the bokeh effect. Default 0.5.
                 * @param amount The amount of the bokeh effect. Default 1.
                 * @param contrast The color contrast of the bokeh effect. Default 0.2.
                 * @returns The new Bokeh filter controller.
                 */
                addBokeh(radius?: number, amount?: number, contrast?: number): Phaser.Filters.Bokeh;

                /**
                 * Adds a Color Matrix effect.
                 * 
                 * The color matrix effect is a visual technique that involves manipulating the colors of an image
                 * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,
                 * allowing developers to create various stylistic appearances or mood settings within the game.
                 * Common applications include simulating different lighting conditions, applying color filters,
                 * or achieving a specific visual style.undefined
                 * @returns The new ColorMatrix filter controller.
                 */
                addColorMatrix(): Phaser.Filters.ColorMatrix;

                /**
                 * Adds a Combine Color Matrix effect.
                 * 
                 * This filter combines channels from two textures.
                 * There are many possibilities with this.
                 * However, a significant purpose is to manipulate alpha channels.
                 * Use `setupAlphaTransfer` to configure common options,
                 * or set the `colorMatrixSelf` and `colorMatrixTransfer` properties
                 * directly.
                 * @param texture The texture or texture key to use for the transfer texture. Default '__WHITE'.
                 * @returns The new CombineColorMatrix filter controller.
                 */
                addCombineColorMatrix(texture?: string | Phaser.Textures.Texture): Phaser.Filters.CombineColorMatrix;

                /**
                 * Adds a Displacement effect.
                 * 
                 * The displacement effect is a visual technique that alters the position of pixels in an image
                 * or texture based on the values of a displacement map. This effect is used to create the illusion
                 * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to
                 * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various
                 * stylistic appearances.
                 * @param texture The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager. Default '__WHITE'.
                 * @param x The amount of horizontal displacement to apply. A very small float number, such as 0.005. Default 0.005.
                 * @param y The amount of vertical displacement to apply. A very small float number, such as 0.005. Default 0.005.
                 * @returns The new Displacement filter controller.
                 */
                addDisplacement(texture?: string, x?: number, y?: number): Phaser.Filters.Displacement;

                /**
                 * Adds a Glow effect.
                 * 
                 * The glow effect is a visual technique that creates a soft, luminous halo around game objects,
                 * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,
                 * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on
                 * the inside of the edge. The color and strength of the glow can be modified.
                 * @param color The color of the glow effect as a number value. Default 0xffffff.
                 * @param outerStrength The strength of the glow outward from the edge of textures. Default 4.
                 * @param innerStrength The strength of the glow inward from the edge of textures. Default 0.
                 * @param scale The scale of the glow effect. This multiplies the fixed distance. Default 1.
                 * @param knockout If `true` only the glow is drawn, not the texture itself. Default false.
                 * @param quality The quality of the glow effect. This cannot be changed after the filter has been created. Default 10.
                 * @param distance The distance of the glow effect. This cannot be changed after the filter has been created. Default 10.
                 * @returns The new Glow filter controller.
                 */
                addGlow(color?: number, outerStrength?: number, innerStrength?: number, scale?: number, knockout?: boolean, quality?: number, distance?: number): Phaser.Filters.Glow;

                /**
                 * Adds a GradientMap effect.
                 * 
                 * GradientMap recolors an image using a ColorRamp.
                 * The image is converted to a progress value at each point,
                 * and that progress is evaluated as a color along the ramp.
                 * 
                 * The progress value is normally the brightness of the image.
                 * You can use the `colorFactor` and `color` properties to customize it.
                 * @param config The configuration object for the GradientMap effect.
                 * @returns The new GradientMap filter controller.
                 */
                addGradientMap(config?: Phaser.Types.Filters.GradientMapConfig): Phaser.Filters.GradientMap;

                /**
                 * Adds an ImageLight effect.
                 * 
                 * ImageLight is a filter for image based lighting (IBL).
                 * It is used to simulate the lighting of an image
                 * using an environment map and a normal map.
                 * 
                 * The environment map is an image that describes the lighting of the scene.
                 * This filter uses a single panorama image as the environment map.
                 * The top of the image is the sky, the bottom is the ground,
                 * and the X axis covers a full rotation.
                 * This kind of image is distorted towards the top and bottom,
                 * as the X axis is stretched wider and wider,
                 * so be careful if you're creating your own environment maps.
                 * 
                 * Cube maps are not supported by Phaser at the time of writing.
                 * 
                 * The effect is basically a reflection of the environment at infinite range.
                 * A sharp environment map will produce a sharp reflection,
                 * while a blurry environment map will produce a diffuse reflection.
                 * Use the PanoramaBlur filter to create correctly blurred environment maps.
                 * Use the NormalTools filter to manipulate the normal map if necessary,
                 * using a DynamicTexture to capture the output.
                 * @param config The configuration object for the ImageLight effect.
                 * @returns The new ImageLight filter controller.
                 */
                addImageLight(config: Phaser.Types.Filters.ImageLightConfig): Phaser.Filters.ImageLight;

                /**
                 * Adds a Key effect.
                 * 
                 * The Key effect removes or isolates a specific color from an image.
                 * It can be used to remove a background color from an image,
                 * or to isolate a specific color for further processing.
                 * 
                 * By default, Key will remove pixels that match the key color.
                 * You can instead keep only the matching pixels by setting `isolate`.
                 * 
                 * The threshold and feather settings control how closely the key color matches.
                 * A match is measured by "distance between color vectors";
                 * that is, how close the RGB values of the pixel are to the RGB values of the key color.
                 * @param config The configuration object for the Key effect.
                 * @returns The new Key filter controller.
                 */
                addKey(config?: Phaser.Types.Filters.KeyConfig): Phaser.Filters.Key;

                /**
                 * Adds a Mask effect.
                 * 
                 * A mask uses a texture to hide parts of an input.
                 * It multiplies the color and alpha of the input
                 * by the alpha of the mask in the corresponding texel.
                 * 
                 * Masks can be inverted, which switches what they hide and what they show.
                 * 
                 * Masks can use either a texture or a GameObject.
                 * If a GameObject is used, the mask will render the GameObject
                 * to a DynamicTexture and use that.
                 * The mask will automatically update when the GameObject changes,
                 * unless the `autoUpdate` flag is set to `false`.
                 * 
                 * When the mask filter is used as an internal filter,
                 * the mask will match the object/view being filtered.
                 * This is useful for creating effects that follow the object,
                 * such as effects intended to match an animated sprite.
                 * 
                 * When the mask filter is used as an external filter,
                 * the mask will match the context of the camera.
                 * This is useful for creating effects that cover the entire view.
                 * 
                 * An optional `viewCamera` can be specified when creating the mask.
                 * If not used, mask objects will be viewed through a default camera.
                 * Set the `viewCamera` to the scene's main camera (`this.cameras.main`)
                 * to view the mask through the main camera.
                 * @param mask The source of the mask. This can be a unique string-based key of the texture to use for the mask, which must exist in the Texture Manager. Or it can be a GameObject, in which case the mask will render the GameObject to a DynamicTexture and use that. Default '__WHITE'.
                 * @param invert Whether to invert the mask. Default false.
                 * @param viewCamera The Camera to use when rendering the mask with a GameObject. If not specified, uses the scene's `main` camera.
                 * @param viewTransform The transform to use when rendering the mask with a GameObject. 'local' uses the GameObject's own properties. 'world' uses the GameObject's `parentContainer` value to compute a world position. Default 'world'.
                 * @param scaleFactor The scale factor to apply to the underlying mask texture. Can be used to balance memory usage and needed mask precision. This just adjusts the size of the texture; you must also adjust mask size to match, e.g. if scaleFactor is 0.5, your mask might be a Container with scale 0.5. It's easy to make things complicated when combining scale factor, object transform, and camera transform, so try to be precise when using this option. Default 1.
                 * @returns The new Mask filter controller.
                 */
                addMask(mask?: string | Phaser.GameObjects.GameObject, invert?: boolean, viewCamera?: Phaser.Cameras.Scene2D.Camera, viewTransform?: 'local' | 'world', scaleFactor?: number): Phaser.Filters.Mask;

                /**
                 * Adds a NormalTools effect.
                 * 
                 * NormalTools is a filter for manipulating the normals of a normal map.
                 * It has several functions:
                 * 
                 * - Rotate or reorient the normal map.
                 * - Change how strongly the normals face the camera.
                 * - Output a grayscale texture showing how strongly the normals face the camera, or some other vector.
                 * 
                 * The output can be used for various purposes, such as:
                 * 
                 * - Editing a normal map for special applications.
                 * - Altering the apparent visual depth of a normal map by manipulating the facing power.
                 * - Creating a base for other effects, such as a mask for a gradient or other effect.
                 * 
                 * You can even use the output as a normal map for regular lighting.
                 * Ordinarily, normal maps are loaded alongside the main texture,
                 * but you can edit this.
                 * 
                 * ```js
                 * // Given a dynamic texture `dyn` where the filter output is drawn,
                 * // and a texture `spiderTex` with lighting enabled,
                 * // we can inject the WebGL texture straight into the scene lighting as a normal map.
                 * const dynTex = dyn.getWebGLTexture();
                 * const dynSource = new Phaser.Textures.TextureSource(spiderTex, dynTex);
                 * spiderTex.dataSource[0] = dynSource; // This is where the normal map is located.
                 * ```
                 * @param config The configuration object for the NormalTools effect.
                 * @returns The new NormalTools filter controller.
                 */
                addNormalTools(config: Phaser.Types.Filters.NormalToolsConfig): Phaser.Filters.NormalTools;

                /**
                 * Adds a PanoramaBlur effect.
                 * 
                 * PanoramaBlur is a filter for blurring a panorama image.
                 * This is intended for use with filters like ImageLight that use a panorama image as the environment map.
                 * The blur treats a rectangular map as a sphere,
                 * and applies heavy distortion close to the poles to get a correct result.
                 * You should not use it for general purpose blurring.
                 * 
                 * The effect can be very slow, as it uses a grid of samples.
                 * Total samples equals samplesX * samplesY. This can get very high,
                 * very quickly, so be careful when increasing these values.
                 * They don't need to be too high for good results.
                 * 
                 * By default, the blur is fully diffuse, sampling an entire hemisphere per point.
                 * If you reduce the radius, the effect will be more focused.
                 * Use this to control different levels of glossiness in objects using environment maps.
                 * @param config The configuration object for the PanoramaBlur effect.
                 * @returns The new PanoramaBlur filter controller.
                 */
                addPanoramaBlur(config: Phaser.Types.Filters.PanoramaBlurConfig): Phaser.Filters.PanoramaBlur;

                /**
                 * Adds a Pixelate effect.
                 * 
                 * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,
                 * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic
                 * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as
                 * during a transition or to censor specific content.
                 * @param amount The amount of pixelation. A higher value creates a more pronounced effect.
                 * @returns The new Pixelate filter controller.
                 */
                addPixelate(amount?: number): Phaser.Filters.Pixelate;

                /**
                 * Adds a Quantize effect.
                 * 
                 * Quantization reduces the unique number of colors in an image,
                 * based on some limited number of steps per color channel.
                 * This is good for creating a retro or stylized effect.
                 * 
                 * Basic quantization breaks each channel up into a number of `steps`.
                 * These steps are normally regular. You can bias them towards the top or bottom
                 * by changing that channel's `gamma` value.
                 * You can adjust the lowest step, thus all subsequent steps, with the `offset`.
                 * 
                 * Quantization is done in either RGBA or HSVA space.
                 * The steps, gamma, and offset always apply in the same order,
                 * but depending on color mode, they are either applied to
                 * `[ red, green, blue, alpha ]` or `[ hue, saturation, value, alpha ]`.
                 * 
                 * The output may optionally be dithered, to eliminate banding
                 * and create the illusion that there are many more colors in use.
                 * @param config The configuration object for the Quantize effect.
                 * @returns The new Quantize filter controller.
                 */
                addQuantize(config?: Phaser.Types.Filters.QuantizeConfig): this;

                /**
                 * Adds a Sampler effect.
                 * 
                 * This controller manages a sampler.
                 * It doesn't actually render anything, and leaves the image unaltered.
                 * It is used to sample a region of the camera view, and pass the results to a callback.
                 * This is useful for extracting data from the camera view.
                 * 
                 * This operation is expensive, so use sparingly.
                 * @param callback The callback to call with the results of the sampler.
                 * @param region The region to sample. If `null`, the entire camera view is sampled. If a `Phaser.Types.Math.Vector2Like`, a point is sampled. If a `Phaser.Geom.Rectangle`, the region is sampled. Default null.
                 * @returns The new Sampler filter controller.
                 */
                addSampler(callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, region?: null | Phaser.Types.Math.Vector2Like | Phaser.Geom.Rectangle): Phaser.Filters.Sampler;

                /**
                 * Adds a Shadow effect.
                 * 
                 * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,
                 * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows
                 * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.
                 * @param x The horizontal offset of the shadow effect. Default 0.
                 * @param y The vertical offset of the shadow effect. Default 0.
                 * @param decay The amount of decay for the shadow effect. Default 0.1.
                 * @param power The power of the shadow effect. Default 1.
                 * @param color The color of the shadow, as a hex value. Default 0x000000.
                 * @param samples The number of samples that the shadow effect will run for. Default 6.
                 * @param intensity The intensity of the shadow effect. Default 1.
                 * @returns The new Shadow filter controller.
                 */
                addShadow(x?: number, y?: number, decay?: number, power?: number, color?: number, samples?: number, intensity?: number): Phaser.Filters.Shadow;

                /**
                 * Adds a Threshold effect.
                 * 
                 * Input values are compared to a threshold value or range.
                 * Values below the threshold are set to 0, and values above the threshold are set to 1.
                 * Values within the range are linearly interpolated between 0 and 1.
                 * 
                 * This is useful for creating effects such as sharp edges from gradients,
                 * or for creating binary effects.
                 * 
                 * The threshold is stored as a range, with two edges.
                 * Each edge has a value for each channel, between 0 and 1.
                 * If the two edges are the same, the threshold has no interpolation,
                 * and will output either 0 or 1.
                 * Each channel can also be inverted.
                 * @param edge1 The first edge of the threshold. This may be an array of the RGBA channels, or a single number for all 4 channels. Default 0.5.
                 * @param edge2 The second edge of the threshold. This may be an array of the RGBA channels, or a single number for all 4 channels. Default 0.5.
                 * @param invert Whether each channel is inverted. This may be an array of the RGBA channels, or a single boolean for all 4 channels. Default false.
                 * @returns The new Threshold filter controller.
                 */
                addThreshold(edge1?: number | number[], edge2?: number | number[], invert?: boolean | boolean[]): Phaser.Filters.Threshold;

                /**
                 * Adds a Tilt Shift effect.
                 * 
                 * This Bokeh effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature
                 * effect by blurring everything except a small area of the image. This effect is achieved by blurring the
                 * top and bottom elements, while keeping the center area in focus.
                 * 
                 * See also Bokeh.
                 * @param radius The radius of the bokeh effect.
                 * @param amount The amount of the bokeh effect.
                 * @param contrast The color contrast of the bokeh effect.
                 * @param blurX The amount of horizontal blur.
                 * @param blurY The amount of vertical blur.
                 * @param strength The strength of the blur.
                 * @returns The new Bokeh filter controller.
                 */
                addTiltShift(radius?: number, amount?: number, contrast?: number, blurX?: number, blurY?: number, strength?: number): Phaser.Filters.Bokeh;

                /**
                 * Adds a Vignette effect.
                 * 
                 * The vignette effect is a visual technique where the edges of the screen,
                 * or a Game Object, gradually darken or blur,
                 * creating a frame-like appearance. This effect is used to draw the player's
                 * focus towards the central action or subject, enhance immersion,
                 * and provide a cinematic or artistic quality to the game's visuals.
                 * 
                 * This filter supports colored borders, and a limited set of blend modes,
                 * to increase its stylistic power.
                 * @param x The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1. Default 0.5.
                 * @param y The vertical offset of the vignette effect. This value is normalized to the range 0 to 1. Default 0.5.
                 * @param radius The radius of the vignette effect. This value is normalized to the range 0 to 1. Default 0.5.
                 * @param strength The strength of the vignette effect. Default 0.5.
                 * @param color The color of the vignette effect, as a hex code or Color object. Default 0x000000.
                 * @param blendMode The blend mode to use with the vignette. Only NORMAL, ADD, MULTIPLY, and SCREEN are supported. Default Phaser.BlendModes.NORMAL.
                 * @returns The new Vignette filter controller.
                 */
                addVignette(x?: number, y?: number, radius?: number, strength?: number, color?: number | string | Phaser.Types.Display.InputColorObject | Phaser.Display.Color, blendMode?: number): Phaser.Filters.Vignette;

                /**
                 * Adds a Wipe effect.
                 * 
                 * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements
                 * in the game, such as images, text, or scene transitions. This effect is often used to create
                 * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition
                 * between game states.
                 * 
                 * You can set both the direction and the axis of the wipe effect. The following combinations are possible:
                 * 
                 * * left to right: direction 0, axis 0
                 * * right to left: direction 1, axis 0
                 * * top to bottom: direction 0, axis 1
                 * * bottom to top: direction 1, axis 1
                 * 
                 * It is up to you to set the `progress` value yourself, e.g. via a Tween, in order to transition the effect.
                 * @param wipeWidth The width of the wipe effect. This value is normalized in the range 0 to 1. Default 0.1.
                 * @param direction The direction of the wipe effect. Either 0 (left to right, or top to bottom) or 1 (right to left, or bottom to top). Set in conjunction with the axis property. Default 0.
                 * @param axis The axis of the wipe effect. Either 0 (X) or 1 (Y). Set in conjunction with the direction property. Default 0.
                 * @param reveal Is this a reveal (1) or a fade (0) effect? Reveal shows the input in wiped areas; fade shows the input in unwiped areas. Default 0.
                 * @param wipeTexture Texture or texture key to use where the input texture is not shown. The default texture is blank. Use another texture for a wipe transition. Default '__DEFAULT'.
                 * @returns - The new Wipe filter instance.
                 */
                addWipe(wipeWidth?: number, direction?: number, axis?: number, reveal?: number, wipeTexture?: string | Phaser.Textures.Texture): Phaser.Filters.Wipe;

                /**
                 * Destroys this FilterList.
                 */
                destroy(): void;

            }

            /**
             * Provides methods used for setting the filters properties of a Game Object.
             * These apply special effects, post-processing and masks to the object.
             * Should be applied as a mixin and not used directly.
             * 
             * Filters work by rendering the object to a texture.
             * The texture is then rendered again for each filter, using a shader.
             * See {@link Phaser.GameObjects.Components.FilterList} for more information.
             * 
             * Enable filters with `enableFilters()`.
             * Each object with filters enabled, and any filters active,
             * makes a new draw call, plus one or more per active filter.
             * This can be expensive. Use sparingly.
             * 
             * ---
             * 
             * ## Camera
             * 
             * Filters has a `filterCamera` property, which is a Camera.
             * The Camera does most of the hard work, including the filters.
             * 
             * The Camera automatically focuses on the Game Object,
             * so you should not need to adjust it manually.
             * If you do want to adjust it, you can use `focusFiltersOverride`.
             * 
             * ---
             * 
             * ## Framebuffer Coverage
             * 
             * Filters are rendered to a framebuffer, which is a texture.
             * Anything outside the bounds of the framebuffer is not rendered.
             * Think of it as a window into another world.
             * 
             * To ensure that the game object fits into the framebuffer,
             * the internal camera is transformed to match the object.
             * The object can transform normally, and the camera will follow
             * while `filtersAutoFocus` is enabled.
             */
            interface Filters {
                /**
                 * The Camera used for filters.
                 * You can use this to alter the perspective of filters.
                 * It is not necessary to use this camera for ordinary rendering.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                filterCamera: Phaser.Cameras.Scene2D.Camera;
                /**
                 * The filter lists for this Game Object.
                 * This is an object with `internal` and `external` properties.
                 * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;
                /**
                 * Whether any filters should be rendered on this Game Object.
                 * This is `true` by default, even if there are no filters yet.
                 * Disable this to skip filter rendering.
                 * 
                 * Use `willRenderFilters()` to see if there are any active filters.
                 */
                renderFilters: boolean;
                /**
                 * The maximum size of the base filter texture.
                 * Filters may use a larger texture after the base texture is rendered.
                 * The maximum texture size is at least 4096 in WebGL, based on the hardware.
                 * You may set this lower to save memory or prevent resizing.
                 */
                maxFilterSize: Phaser.Math.Vector2;
                /**
                 * Whether `filterCamera` should update every frame
                 * to focus on the Game Object.
                 * Disable this if you want to manually control the camera.
                 */
                filtersAutoFocus: boolean;
                /**
                 * Whether the filters should focus on the context,
                 * rather than attempt to focus on the Game Object.
                 * This is enabled automatically when enabling filters on objects
                 * which don't have well-defined bounds.
                 * 
                 * This effectively sets the internal filters to render the same way
                 * as the external filters.
                 * 
                 * This is only used if `filtersAutoFocus` is enabled.
                 * 
                 * The "context" is the framebuffer to which the Game Object is rendered.
                 * This is usually the main framebuffer, but might be another framebuffer.
                 * It can even be several different framebuffers if the Game Object is
                 * rendered multiple times.
                 */
                filtersFocusContext: boolean;
                /**
                 * Whether the Filters component should always draw to a framebuffer,
                 * even if there are no active filters.
                 */
                filtersForceComposite: boolean;
                /**
                 * Whether this Game Object will render filters.
                 * This is true if it has active filters,
                 * and if the `renderFilters` property is also true.undefined
                 * @returns Whether the Game Object will render filters.
                 */
                willRenderFilters(): boolean;
                /**
                 * Enable this Game Object to have filters.
                 * 
                 * You need to call this method if you want to use the `filterCamera`
                 * and `filters` properties. It sets up the necessary data structures.
                 * You may disable filter rendering with the `renderFilters` property.
                 * 
                 * This is a WebGL only feature. It will return early if not available.undefined
                 * @returns undefined
                 */
                enableFilters(): this;
                /**
                 * Render this object using filters.
                 * 
                 * This function's scope is not guaranteed, so it doesn't refer to `this`.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
                 * @returns undefined
                 */
                renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;
                /**
                 * Focus the filter camera.
                 * This sets the size and position of the filter camera to match the GameObject.
                 * This is called automatically on render if `filtersAutoFocus` is enabled.
                 * 
                 * This will focus on the GameObject's raw dimensions if available.
                 * If the GameObject has no dimensions, this will focus on the context:
                 * the camera belonging to the DrawingContext used to render the GameObject.
                 * Context focus occurs during rendering,
                 * as the context is not known until then.undefined
                 * @returns undefined
                 */
                focusFilters(): this;
                /**
                 * Focus the filter camera on a specific camera.
                 * This is used internally when `filtersFocusContext` is enabled.
                 * @param camera The camera to focus on.
                 * @returns undefined
                 */
                focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;
                /**
                 * Manually override the focus of the filter camera.
                 * This allows you to set the size and position of the filter camera manually.
                 * It deactivates `filtersAutoFocus` when called.
                 * 
                 * The camera will set scroll to place the game object at the
                 * given position within a rectangle of the given width and height.
                 * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
                 * will focus the camera to place the object's center
                 * 100 pixels above the center of the camera (which is at 400x300).
                 * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param width The width of the focus area. Default is the filter width.
                 * @param height The height of the focus area. Default is the filter height.
                 * @returns undefined
                 */
                focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;
                /**
                 * Set the base size of the filter camera.
                 * This is the size of the texture that internal filters will be drawn to.
                 * External filters are drawn to the size of the context (usually the game canvas).
                 * 
                 * This is typically the size of the GameObject.
                 * It is set automatically when the Game Object is rendered
                 * and `filtersAutoFocus` is enabled.
                 * Turn off auto focus to set it manually.
                 * 
                 * Technically, larger framebuffers may be used to provide padding.
                 * This is the size of the final framebuffer used for "internal" rendering.
                 * @param width Base width of the filter texture.
                 * @param height Base height of the filter texture.
                 * @returns undefined
                 */
                setFilterSize(width: number, height: number): this;
                /**
                 * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
                 * Sets the `filtersAutoFocus` property.
                 * @param value Whether filters should be updated every frame.
                 * @returns undefined
                 */
                setFiltersAutoFocus(value: boolean): this;
                /**
                 * Set whether the filters should focus on the context.
                 * Sets the `filtersFocusContext` property.
                 * @param value Whether the filters should focus on the context.
                 * @returns undefined
                 */
                setFiltersFocusContext(value: boolean): this;
                /**
                 * Set whether the filters should always draw to a framebuffer.
                 * Sets the `filtersForceComposite` property.
                 * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
                 * @returns undefined
                 */
                setFiltersForceComposite(value: boolean): this;
                /**
                 * Set whether the filters should be rendered.
                 * Sets the `renderFilters` property.
                 * @param value Whether the filters should be rendered.
                 * @returns undefined
                 */
                setRenderFilters(value: boolean): this;
            }

            /**
             * Provides methods used for visually flipping a Game Object along its horizontal and/or vertical axes.
             * 
             * Flipping mirrors the rendered texture without altering the Game Object's scale, position, or physics body.
             * The flip always pivots from the centre of the texture. This component is intended to be mixed in to
             * Game Object classes and should not be used directly.
             */
            interface Flip {
                /**
                 * The horizontally flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipX: boolean;
                /**
                 * The vertically flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipY: boolean;
                /**
                 * Toggles the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipX(): this;
                /**
                 * Toggles the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipY(): this;
                /**
                 * Sets the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipX(value: boolean): this;
                /**
                 * Sets the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipY(value: boolean): this;
                /**
                 * Sets the horizontal and vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped will render inverted on the flipped axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
                 * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlip(x: boolean, y: boolean): this;
                /**
                 * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
                 * @returns This Game Object instance.
                 */
                resetFlip(): this;
            }

            /**
             * Provides methods used for obtaining the bounds of a Game Object, including
             * its corners, edge midpoints, center point, and overall axis-aligned bounding
             * rectangle. All methods account for the Game Object's rotation and display
             * size, and can optionally factor in any parent Container transforms.
             * Should be applied as a mixin and not used directly.
             */
            interface GetBounds {
                /**
                 * Gets the center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;
                /**
                 * Gets the top-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;
                /**
                 * Gets the top-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;
                /**
                 * Gets the top-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;
                /**
                 * Gets the left-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;
                /**
                 * Gets the right-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;
                /**
                 * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;
                /**
                 * Gets the bottom-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;
                /**
                 * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;
                /**
                 * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
                 * 
                 * The bounding rectangle is computed by retrieving all four corner positions of the
                 * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
                 * and parent Container transforms, and then calculating the smallest axis-aligned
                 * rectangle that fully encloses all four points.
                 * 
                 * The values are stored and returned in a Rectangle, or Rectangle-like, object.
                 * @param output An object to store the values in. If not provided a new Rectangle will be created.
                 * @returns The values stored in the output object.
                 */
                getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;
            }

            /**
             * Provides methods for enabling WebGL-based per-pixel lighting effects on a Game Object,
             * using normal maps to simulate surface depth under dynamic light sources.
             * 
             * When lighting is enabled, the Game Object will respond to lights added to the scene
             * via the Lights plugin. This component also supports self-shadowing, which creates
             * contact shadows on the surface based on the object's normal map.
             * 
             * This component should only be applied to Game Objects that have RenderNodes, and
             * requires the WebGL renderer. It has no effect in Canvas rendering mode.
             */
            interface Lighting {
                /**
                 * Controls whether this Game Object participates in the WebGL lighting system.
                 * When `true`, the object will respond to dynamic lights added via the Lights plugin,
                 * using normal maps to calculate per-pixel diffuse lighting.
                 * 
                 * This flag is used to select the appropriate WebGL shader at render time.
                 */
                readonly lighting: boolean;
                /**
                 * Configuration object controlling self-shadowing for this Game Object.
                 * Self-shadowing causes surfaces to cast contact shadows on themselves based on
                 * the normal map, giving the appearance of depth. It is only active when
                 * `lighting` is also enabled.
                 * 
                 * If `enabled` is `null`, the value from the game config option `render.selfShadow`
                 * is used instead.
                 * 
                 * This object is used to select and configure the appropriate WebGL shader at render time.
                 */
                selfShadow: Object;
                /**
                 * Enables or disables WebGL-based per-pixel lighting for this Game Object.
                 * When enabled, the object will respond to dynamic lights added to the scene
                 * via the Lights plugin, using a normal map for lighting calculations.
                 * Disabling lighting restores the standard unlit rendering path.
                 * @param enable `true` to use lighting, or `false` to disable it.
                 * @returns This GameObject instance.
                 */
                setLighting(enable: boolean): this;
                /**
                 * Configures the self-shadowing properties of this Game Object.
                 * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
                 * giving the impression of depth and raised detail. It is only active when
                 * `lighting` is also enabled on this Game Object.
                 * 
                 * Parameters that are `undefined` are left unchanged, allowing partial updates.
                 * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
                 * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
                 * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
                 * @returns This GameObject instance.
                 */
                setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;
            }

            /**
             * Provides methods used for setting, clearing, and creating masks on a Game Object.
             * 
             * A mask clips the rendered output of a Game Object to the shape defined by a Graphics
             * or Shape Game Object. Only pixels that fall within the mask geometry are drawn to the screen.
             * Masks have no effect on physics or input detection; they are purely a visual rendering tool.
             * 
             * This component only works under the Canvas Renderer.
             * For WebGL, see {@link Phaser.GameObjects.Components.FilterList#addMask}.
             */
            interface Mask {
                /**
                 * The Mask this Game Object is using during render, or `null` if no mask has been set.
                 */
                mask: Phaser.Display.Masks.GeometryMask;
                /**
                 * Sets the mask that this Game Object will use to render with.
                 * 
                 * The mask must have been previously created and must be a GeometryMask.
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * 
                 * If a mask is already set on this Game Object it will be immediately replaced.
                 * 
                 * Masks are positioned in global space and are not relative to the Game Object to which they
                 * are applied. The reason for this is that multiple Game Objects can all share the same mask.
                 * 
                 * Masks have no impact on physics or input detection. They are purely a rendering component
                 * that allows you to limit what is visible during the render pass.
                 * @param mask The mask this Game Object will use when rendering.
                 * @returns This Game Object instance.
                 */
                setMask(mask: Phaser.Display.Masks.GeometryMask): this;
                /**
                 * Clears the mask that this Game Object was using.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param destroyMask Destroy the mask before clearing it? Default false.
                 * @returns This Game Object instance.
                 */
                clearMask(destroyMask?: boolean): this;
                /**
                 * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
                 * including this one.
                 * 
                 * To create the mask you need to pass in a reference to a Graphics Game Object.
                 * 
                 * If you do not provide a graphics object, and this Game Object is an instance
                 * of a Graphics object, then it will use itself to create the mask.
                 * 
                 * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
                 * @returns This Geometry Mask that was created.
                 */
                createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;
            }

            /**
             * Provides methods used for getting and setting the origin of a Game Object.
             * Values are normalized, given in the range 0 to 1.
             * Display values contain the calculated pixel values.
             * Should be applied as a mixin and not used directly.
             */
            interface Origin {
                /**
                 * The horizontal origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the left of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originX: number;
                /**
                 * The vertical origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the top of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originY: number;
                /**
                 * The horizontal display origin of this Game Object, expressed in pixels.
                 * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
                 * Setting this property updates `originX` accordingly.
                 */
                displayOriginX: number;
                /**
                 * The vertical display origin of this Game Object, expressed in pixels.
                 * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
                 * Setting this property updates `originY` accordingly.
                 */
                displayOriginY: number;
                /**
                 * Sets the origin of this Game Object.
                 * 
                 * The values are given in the range 0 to 1.
                 * @param x The horizontal origin value. Default 0.5.
                 * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setOrigin(x?: number, y?: number): this;
                /**
                 * Sets the origin of this Game Object based on the Pivot values in its Frame.
                 * If the Frame has a custom pivot point defined, the origin is set to match it.
                 * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
                 * resetting the origin to the default value of 0.5 for both axes.undefined
                 * @returns This Game Object instance.
                 */
                setOriginFromFrame(): this;
                /**
                 * Sets the display origin of this Game Object.
                 * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
                 * @param x The horizontal display origin value. Default 0.
                 * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setDisplayOrigin(x?: number, y?: number): this;
                /**
                 * Updates the Display Origin cached values internally stored on this Game Object.
                 * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
                 * @returns This Game Object instance.
                 */
                updateDisplayOrigin(): this;
            }

            /**
             * Provides methods for making a Game Object follow a {@link Phaser.Curves.Path} at a configurable speed.
             * The follower uses an internal Tween to animate progress along the path, and can optionally rotate
             * the Game Object to face the direction of travel. This component is mixed in to Game Objects such as
             * {@link Phaser.GameObjects.PathFollower} and should be applied as a mixin rather than used directly.
             */
            interface PathFollower {
                /**
                 * The Path this PathFollower is following. It can only follow one Path at a time.
                 */
                path: Phaser.Curves.Path;
                /**
                 * Should the PathFollower automatically rotate to point in the direction of the Path?
                 */
                rotateToPath: boolean;
                /**
                 * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.Components.PathFollower#rotateToPath)
                 * this value is added to the rotation value, in degrees. This allows you to rotate objects to a path but control
                 * the angle of the rotation as well.
                 */
                pathRotationOffset: number;
                /**
                 * Set the Path that this PathFollower should follow.
                 * 
                 * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.
                 * @param path The Path this PathFollower is following. It can only follow one Path at a time.
                 * @param config Settings for the PathFollower.
                 * @returns This Game Object.
                 */
                setPath(path: Phaser.Curves.Path, config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig): this;
                /**
                 * Set whether the PathFollower should automatically rotate to point in the direction of the Path.
                 * @param value Whether the PathFollower should automatically rotate to point in the direction of the Path.
                 * @param offset Rotation offset in degrees. Default 0.
                 * @returns This Game Object.
                 */
                setRotateToPath(value: boolean, offset?: number): this;
                /**
                 * Is this PathFollower actively following a Path or not?
                 * 
                 * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.undefined
                 * @returns `true` if this PathFollower is actively following a Path, otherwise `false`.
                 */
                isFollowing(): boolean;
                /**
                 * Starts this PathFollower following its given Path.
                 * @param config The duration of the follow, or a PathFollower config object. Default {}.
                 * @param startAt Optional start position of the follow, between 0 and 1. Default 0.
                 * @returns This Game Object.
                 */
                startFollow(config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig, startAt?: number): this;
                /**
                 * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the
                 * point on the Path at which you paused it.undefined
                 * @returns This Game Object.
                 */
                pauseFollow(): this;
                /**
                 * Resumes a previously paused PathFollower.
                 * 
                 * If the PathFollower was not paused this has no effect.undefined
                 * @returns This Game Object.
                 */
                resumeFollow(): this;
                /**
                 * Stops this PathFollower from following the path any longer.
                 * 
                 * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.undefined
                 * @returns This Game Object.
                 */
                stopFollow(): this;
                /**
                 * Internal update handler that advances this PathFollower along the path.
                 * 
                 * Called automatically by the Scene step, should not typically be called directly.
                 */
                pathUpdate(): void;
            }

            /**
             * Provides methods for configuring WebGL render nodes on a Game Object. Render nodes are modular units responsible for different phases of the rendering pipeline (submitting draw calls, transforming vertices, handling textures). Each Game Object has a set of default render nodes, but you can override them with custom nodes for advanced rendering effects. This component is WebGL only.
             */
            interface RenderNodes {
                /**
                 * Customized WebGL render nodes of this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * A default set of RenderNodes is coded into the engine,
                 * but the renderer will check this object first to see if a custom node has been set.
                 */
                customRenderNodes: object;
                /**
                 * The default RenderNodes for this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * These are the nodes that are used if no custom ones are set.
                 * 
                 * RenderNodes are identified by a unique key for their role.
                 * 
                 * Common role keys include:
                 * 
                 * - 'Submitter': responsible for running other node roles for each element.
                 * - 'Transformer': responsible for providing vertex coordinates for an element.
                 * - 'Texturer': responsible for handling textures for an element.
                 */
                defaultRenderNodes: object;
                /**
                 * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * 
                 * Render nodes store their data under their own name, not their role.
                 */
                renderNodeData: object;
                /**
                 * Initializes the render nodes for this Game Object.
                 * 
                 * This method is called when the Game Object is added to the Scene.
                 * It is responsible for setting up the default render nodes
                 * this Game Object will use.
                 * @param defaultNodes The default render nodes to set for this Game Object.
                 */
                initRenderNodes(defaultNodes: Map<string, string>): void;
                /**
                 * Sets the RenderNode for a given role.
                 * 
                 * Also sets the relevant render node data object, if specified.
                 * 
                 * If the node cannot be set, no changes are made.
                 * @param key The key of the role to set the render node for.
                 * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
                 * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
                 * @returns This Game Object instance.
                 */
                setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;
                /**
                 * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
                 * 
                 * If `key` is not set, it is created. If it is set, it is updated.
                 * 
                 * If `value` is undefined and `key` exists, the key is removed.
                 * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
                 * @param key The key of the property to set.
                 * @param value The value to set the property to.
                 * @returns This Game Object instance.
                 */
                setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;
            }

            /**
             * Handles render steps for a Game Object.
             * The render step is a point in the render process that allows you to inject your own logic.
             */
            interface RenderSteps {
                /**
                 * Run a step in the render process.
                 * This is called automatically by the Render module.
                 * 
                 * In most cases, it just runs the `renderWebGL` function.
                 * 
                 * When `_renderSteps` has more than one entry,
                 * such as when Filters are enabled for this object,
                 * it allows those processes to defer `renderWebGL`
                 * and otherwise manage the flow of rendering.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep Which step of the rendering process should be run? Default 0.
                 * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
                 * @param displayListIndex The index of the Game Object within the display list. Default 0.
                 */
                renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;
                /**
                 * Adds a render step function to this Game Object's WebGL render pipeline.
                 * 
                 * The first render step in `_renderSteps` is run first.
                 * It should call the next render step in the list.
                 * This allows render steps to control the rendering flow.
                 * @param fn The render step function to add.
                 * @param index The index in the render list to add the step to. Omit to add to the end.
                 * @returns This Game Object instance.
                 */
                addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;
            }

            /**
             * Provides methods used for setting the Scroll Factor of a Game Object.
             */
            interface ScrollFactor {
                /**
                 * The horizontal scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorX: number;
                /**
                 * The vertical scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorY: number;
                /**
                 * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
                 * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
                 * and `scrollFactorY` in a single call.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 * @param x The horizontal scroll factor of this Game Object.
                 * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScrollFactor(x: number, y?: number): this;
            }

            /**
             * Provides methods used for getting and setting the size of a Game Object.
             * 
             * This component distinguishes between two size concepts. The native size (`width` and `height`)
             * is the un-scaled logical size, typically derived from the Game Object's texture frame. The
             * display size (`displayWidth` and `displayHeight`) is the actual rendered size in pixels, which
             * factors in the Game Object's scale. Setting the display size adjusts the scale automatically,
             * while setting the native size does not affect rendering directly.
             * 
             * This component is mixed into Game Objects such as Sprites and Images by the Phaser Game Object
             * Factory and is not intended to be used standalone.
             */
            interface Size {
                /**
                 * The native (un-scaled) width of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayWidth` property.
                 */
                width: number;
                /**
                 * The native (un-scaled) height of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayHeight` property.
                 */
                height: number;
                /**
                 * The displayed width of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayWidth: number;
                /**
                 * The displayed height of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayHeight: number;
                /**
                 * Sets the size of this Game Object to be that of the given Frame.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param frame The frame to base the size of this Game Object on.
                 * @returns This Game Object instance.
                 */
                setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;
                /**
                 * Sets the internal size of this Game Object, as used for frame or physics body creation.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setSize(width: number, height: number): this;
                /**
                 * Sets the display (rendered) size of this Game Object in pixels.
                 * 
                 * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
                 * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
                 * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
                 * the scale manually, but more convenient when you want to work in pixel values directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setDisplaySize(width: number, height: number): this;
            }

            /**
             * Provides methods used for setting the texture and frame of a Game Object.
             * 
             * This component is mixed in to Game Objects that support texture-based rendering,
             * such as Sprites and Images. It allows a Game Object to reference a texture stored
             * in the Texture Manager by key, and optionally a specific frame within that texture,
             * as used with texture atlases and sprite sheets. Changing the texture or frame will
             * automatically update the Game Object's size and origin to match.
             */
            interface Texture {
                /**
                 * The Texture this Game Object is using to render with.
                 */
                texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;
                /**
                 * The Texture Frame this Game Object is using to render with.
                 */
                frame: Phaser.Textures.Frame;
                /**
                 * Sets the texture and frame this Game Object will use to render with.
                 * 
                 * Textures are referenced by their string-based keys, as stored in the Texture Manager.
                 * 
                 * Calling this method will modify the `width` and `height` properties of your Game Object.
                 * 
                 * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
                 * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.
                 * @param frame The name or index of the frame within the Texture.
                 * @param updateSize Should this call adjust the size of the Game Object? Default true.
                 * @param updateOrigin Should this call change the origin of the Game Object? Default true.
                 * @returns This Game Object instance.
                 */
                setTexture(key: string | Phaser.Textures.Texture, frame?: string | number, updateSize?: boolean, updateOrigin?: boolean): this;
                /**
                 * Sets the frame this Game Object will use to render with.
                 * 
                 * If you pass a string or index then the Frame has to belong to the current Texture being used
                 * by this Game Object.
                 * 
                 * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
                 * 
                 * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
                 * 
                 * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
                 * @param frame The name or index of the frame within the Texture, or a Frame instance.
                 * @param updateSize Should this call adjust the size of the Game Object? Default true.
                 * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
                 * @returns This Game Object instance.
                 */
                setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;
            }

            /**
             * Provides methods used for getting and setting the texture of a Game Object, with integrated support for cropping. This is used by Game Objects like Image and Sprite that need both texture management and crop functionality in a single mixin.
             */
            interface TextureCrop {
                /**
                 * The Texture this Game Object is using to render with.
                 */
                texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;
                /**
                 * The Texture Frame this Game Object is using to render with.
                 */
                frame: Phaser.Textures.Frame;
                /**
                 * A boolean flag indicating if this Game Object is being cropped or not.
                 * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
                 * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
                 */
                isCropped: boolean;
                /**
                 * Applies a crop to a texture based Game Object, such as a Sprite or Image.
                 * 
                 * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
                 * 
                 * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
                 * changes what is shown when rendered.
                 * 
                 * The crop size as well as coordinates can not exceed the size of the texture frame.
                 * 
                 * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
                 * 
                 * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
                 * half of it, you could call `setCrop(0, 0, 400, 600)`.
                 * 
                 * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
                 * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
                 * 
                 * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
                 * 
                 * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
                 * 
                 * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
                 * the renderer to skip several internal calculations.
                 * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
                 * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
                 * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
                 * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
                 * @returns This Game Object instance.
                 */
                setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;
                /**
                 * Sets the texture and frame this Game Object will use to render with.
                 * 
                 * Textures are referenced by their string-based keys, as stored in the Texture Manager.
                 * @param key The key of the texture to be used, as stored in the Texture Manager.
                 * @param frame The name or index of the frame within the Texture.
                 * @returns This Game Object instance.
                 */
                setTexture(key: string, frame?: string | number): this;
                /**
                 * Sets the frame this Game Object will use to render with.
                 * 
                 * If you pass a string or index then the Frame has to belong to the current Texture being used
                 * by this Game Object.
                 * 
                 * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
                 * 
                 * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
                 * 
                 * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
                 * @param frame The name or index of the frame within the Texture, or a Frame instance.
                 * @param updateSize Should this call adjust the size of the Game Object? Default true.
                 * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
                 * @returns This Game Object instance.
                 */
                setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;
            }

            /**
             * Provides methods used for setting the tint of a Game Object.
             * Should be applied as a mixin and not used directly.
             */
            interface Tint {
                /**
                 * The tint value being applied to the top-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopLeft: number;
                /**
                 * The tint value being applied to the top-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopRight: number;
                /**
                 * The tint value being applied to the bottom-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomLeft: number;
                /**
                 * The tint value being applied to the bottom-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomRight: number;
                /**
                 * The tint mode to use when applying the tint to the texture.
                 * 
                 * Available modes are:
                 * - Phaser.TintModes.MULTIPLY (default)
                 * - Phaser.TintModes.FILL
                 * - Phaser.TintModes.ADD
                 * - Phaser.TintModes.SCREEN
                 * - Phaser.TintModes.OVERLAY
                 * - Phaser.TintModes.HARD_LIGHT
                 * 
                 * Note that in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 */
                tintMode: Phaser.TintModes;
                /**
                 * Clears all tint values associated with this Game Object.
                 * 
                 * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
                 * which results in no visible change to the texture.undefined
                 * @returns This Game Object instance.
                 */
                clearTint(): this;
                /**
                 * Sets the tint color on this Game Object.
                 * 
                 * The tint works by taking the pixel color values from the Game Objects texture, and then
                 * combining it with the color value of the tint. You can provide either one color value,
                 * in which case the whole Game Object will be tinted in that color. Or you can provide a color
                 * per corner. The colors are blended together across the extent of the Game Object.
                 * 
                 * To modify the tint color once set, either call this method again with new values or use the
                 * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
                 * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
                 * 
                 * To remove a tint call `clearTint`.
                 * 
                 * The tint color is combined according to the tint mode.
                 * By default, this is `MULTIPLY`.
                 * 
                 * Note that, in Phaser 3, this would also swap the tint mode if it was set
                 * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
                 * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
                 * @param topRight The tint being applied to the top-right of the Game Object.
                 * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
                 * @param bottomRight The tint being applied to the bottom-right of the Game Object.
                 * @returns This Game Object instance.
                 */
                setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;
                /**
                 * Sets the tint mode to use when applying the tint to the texture.
                 * 
                 * Note that, in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 * @param mode The tint mode to use.
                 * @returns This Game Object instance.
                 */
                setTintMode(mode: number | Phaser.TintModes): this;
                /**
                 * Deprecated method which does nothing.
                 * In Phaser 3, this would set the tint color, and set the tint mode to fill.
                 * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
                 */
                setTintFill(): void;
                /**
                 * The tint value being applied to the whole of the Game Object.
                 * Returns the value of `tintTopLeft` when read. When written, the same
                 * color value is applied to all four corner tint properties (`tintTopLeft`,
                 * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
                 */
                tint: number;
                /**
                 * Does this Game Object have a tint applied?
                 * 
                 * Returns `true` if any of the four corner tint values differ from 0xffffff,
                 * or if the `tintMode` property is set to anything other than `MULTIPLY`.
                 * Returns `false` when all four tint values are 0xffffff and the tint mode
                 * is `MULTIPLY`, which is the default untinted state.
                 */
                readonly isTinted: boolean;
            }

            /**
             * Build a JSON representation of the given Game Object.
             * 
             * This is typically extended further by Game Object specific implementations.
             */
            interface ToJSON {
            }

            /**
             * Provides methods used for getting and setting the position, scale and rotation of a Game Object.
             */
            interface Transform {
                /**
                 * A property indicating that a Game Object has this component.
                 */
                readonly hasTransformComponent: boolean;
                /**
                 * The x position of this Game Object.
                 */
                x: number;
                /**
                 * The y position of this Game Object.
                 */
                y: number;
                /**
                 * The z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#depth} instead.
                 */
                z: number;
                /**
                 * The w position of this Game Object.
                 */
                w: number;
                /**
                 * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
                 * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
                 * 
                 * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
                 * isn't the case, use the `scaleX` or `scaleY` properties instead.
                 */
                scale: number;
                /**
                 * The horizontal scale of this Game Object.
                 */
                scaleX: number;
                /**
                 * The vertical scale of this Game Object.
                 */
                scaleY: number;
                /**
                 * The angle of this Game Object as expressed in degrees.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
                 * and -90 is up.
                 * 
                 * If you prefer to work in radians, see the `rotation` property instead.
                 */
                angle: number;
                /**
                 * The angle of this Game Object in radians.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
                 * and -PI/2 is up.
                 * 
                 * If you prefer to work in degrees, see the `angle` property instead.
                 */
                rotation: number;
                /**
                 * Sets the position of this Game Object.
                 * @param x The x position of this Game Object. Default 0.
                 * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
                 * @param z The z position of this Game Object. Default 0.
                 * @param w The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setPosition(x?: number, y?: number, z?: number, w?: number): this;
                /**
                 * Copies an object's coordinates to this Game Object's position.
                 * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
                 * @returns This Game Object instance.
                 */
                copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;
                /**
                 * Sets the position of this Game Object to be a random position within the confines of
                 * the given area.
                 * 
                 * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
                 * 
                 * The position does not factor in the size of this Game Object, meaning that only the origin is
                 * guaranteed to be within the area.
                 * @param x The x position of the top-left of the random area. Default 0.
                 * @param y The y position of the top-left of the random area. Default 0.
                 * @param width The width of the random area.
                 * @param height The height of the random area.
                 * @returns This Game Object instance.
                 */
                setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;
                /**
                 * Sets the rotation of this Game Object.
                 * @param radians The rotation of this Game Object, in radians. Default 0.
                 * @returns This Game Object instance.
                 */
                setRotation(radians?: number): this;
                /**
                 * Sets the angle of this Game Object.
                 * @param degrees The rotation of this Game Object, in degrees. Default 0.
                 * @returns This Game Object instance.
                 */
                setAngle(degrees?: number): this;
                /**
                 * Sets the scale of this Game Object.
                 * @param x The horizontal scale of this Game Object. Default 1.
                 * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScale(x?: number, y?: number): this;
                /**
                 * Sets the x position of this Game Object.
                 * @param value The x position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setX(value?: number): this;
                /**
                 * Sets the y position of this Game Object.
                 * @param value The y position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setY(value?: number): this;
                /**
                 * Sets the z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
                 * @param value The z position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setZ(value?: number): this;
                /**
                 * Sets the w position of this Game Object.
                 * @param value The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setW(value?: number): this;
                /**
                 * Gets the local transform matrix for this Game Object.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @returns The populated Transform Matrix.
                 */
                getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;
                /**
                 * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @param parentMatrix A temporary matrix to hold parent values during the calculations.
                 * @returns The populated Transform Matrix.
                 */
                getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;
                /**
                 * Takes the given `x` and `y` coordinates and converts them into local space for this
                 * Game Object, taking into account parent and local transforms, and the Display Origin.
                 * 
                 * The returned Vector2 contains the translated point in its properties.
                 * 
                 * A Camera needs to be provided in order to handle modified scroll factors. If no
                 * camera is specified, it will use the `main` camera from the Scene to which this
                 * Game Object belongs.
                 * @param x The x position to translate.
                 * @param y The y position to translate.
                 * @param point A Vector2, or point-like object, to store the results in.
                 * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
                 * @returns The translated point.
                 */
                getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;
                /**
                 * Gets the world position of this Game Object, factoring in any parent Containers.
                 * @param point A Vector2, or point-like object, to store the result in.
                 * @param tempMatrix A temporary matrix to hold the Game Object's values.
                 * @param parentMatrix A temporary matrix to hold parent values.
                 * @returns The world position of this Game Object.
                 */
                getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;
                /**
                 * Gets the sum total rotation of all of this Game Object's parent Containers.
                 * 
                 * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
                 * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
                 */
                getParentRotation(): number;
            }

            /**
             * A TransformMatrix is a 3x3 affine transformation matrix used to encode
             * the position, rotation, scale, and skew of a Game Object for rendering.
             * 
             * It is used internally by Phaser during the render pipeline to accumulate
             * parent-child transform chains and apply camera transformations. You will
             * typically interact with it when writing custom renderers or working with
             * the camera or display list transform pipeline.
             * 
             * It is represented like so:
             * 
             * ```
             * | a | c | tx |
             * | b | d | ty |
             * | 0 | 0 | 1  |
             * ```
             */
            class TransformMatrix {
                /**
                 * 
                 * @param a The Scale X value. Default 1.
                 * @param b The Skew Y value. Default 0.
                 * @param c The Skew X value. Default 0.
                 * @param d The Scale Y value. Default 1.
                 * @param tx The Translate X value. Default 0.
                 * @param ty The Translate Y value. Default 0.
                 */
                constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number);

                /**
                 * The matrix values.
                 */
                matrix: Float32Array;

                /**
                 * The decomposed matrix.
                 */
                decomposedMatrix: object;

                /**
                 * The temporary quad value cache.
                 */
                quad: Float32Array;

                /**
                 * The Scale X value.
                 */
                a: number;

                /**
                 * The Skew Y value.
                 */
                b: number;

                /**
                 * The Skew X value.
                 */
                c: number;

                /**
                 * The Scale Y value.
                 */
                d: number;

                /**
                 * The Translate X value.
                 */
                e: number;

                /**
                 * The Translate Y value.
                 */
                f: number;

                /**
                 * The Translate X value.
                 */
                tx: number;

                /**
                 * The Translate Y value.
                 */
                ty: number;

                /**
                 * The rotation of the Matrix. Value is in radians.
                 */
                readonly rotation: number;

                /**
                 * The rotation of the Matrix, normalized to be within the Phaser right-handed
                 * clockwise rotation space. Value is in radians.
                 */
                readonly rotationNormalized: number;

                /**
                 * The decomposed horizontal scale of the Matrix. This value is always positive.
                 */
                readonly scaleX: number;

                /**
                 * The decomposed vertical scale of the Matrix. This value is always positive.
                 */
                readonly scaleY: number;

                /**
                 * Reset the Matrix to an identity matrix.undefined
                 * @returns This TransformMatrix.
                 */
                loadIdentity(): this;

                /**
                 * Translate the Matrix.
                 * @param x The horizontal translation value.
                 * @param y The vertical translation value.
                 * @returns This TransformMatrix.
                 */
                translate(x: number, y: number): this;

                /**
                 * Scale the Matrix.
                 * @param x The horizontal scale value.
                 * @param y The vertical scale value.
                 * @returns This TransformMatrix.
                 */
                scale(x: number, y: number): this;

                /**
                 * Rotate the Matrix.
                 * @param angle The angle of rotation in radians.
                 * @returns This TransformMatrix.
                 */
                rotate(angle: number): this;

                /**
                 * Multiply this Matrix by the given Matrix.
                 * 
                 * If an `out` Matrix is given then the results will be stored in it.
                 * If it is not given, this matrix will be updated in place instead.
                 * Use an `out` Matrix if you do not wish to mutate this matrix.
                 * @param rhs The Matrix to multiply by.
                 * @param out An optional Matrix to store the results in.
                 * @returns Either this TransformMatrix, or the `out` Matrix, if given in the arguments.
                 */
                multiply(rhs: Phaser.GameObjects.Components.TransformMatrix, out?: Phaser.GameObjects.Components.TransformMatrix): this | Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Multiply this Matrix by the matrix given, including the offset.
                 * 
                 * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.
                 * The offsetY is added to the ty value: `offsetX * b + offsetY * d + ty`.
                 * @param src The source Matrix to copy from.
                 * @param offsetX Horizontal offset to factor in to the multiplication.
                 * @param offsetY Vertical offset to factor in to the multiplication.
                 * @returns This TransformMatrix.
                 */
                multiplyWithOffset(src: Phaser.GameObjects.Components.TransformMatrix, offsetX: number, offsetY: number): this;

                /**
                 * Transform the Matrix.
                 * @param a The Scale X value.
                 * @param b The Shear Y value.
                 * @param c The Shear X value.
                 * @param d The Scale Y value.
                 * @param tx The Translate X value.
                 * @param ty The Translate Y value.
                 * @returns This TransformMatrix.
                 */
                transform(a: number, b: number, c: number, d: number, tx: number, ty: number): this;

                /**
                 * Transform a point in to the local space of this Matrix.
                 * @param x The x coordinate of the point to transform.
                 * @param y The y coordinate of the point to transform.
                 * @param point Optional Point object to store the transformed coordinates in.
                 * @returns The Point containing the transformed coordinates.
                 */
                transformPoint(x: number, y: number, point?: Phaser.Types.Math.Vector2Like): Phaser.Types.Math.Vector2Like;

                /**
                 * Invert the Matrix.undefined
                 * @returns This TransformMatrix.
                 */
                invert(): this;

                /**
                 * Set the values of this Matrix to copy those of the matrix given.
                 * @param src The source Matrix to copy from.
                 * @returns This TransformMatrix.
                 */
                copyFrom(src: Phaser.GameObjects.Components.TransformMatrix): this;

                /**
                 * Set the values of this Matrix to copy those of the array given.
                 * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.
                 * @param src The array of values to set into this matrix.
                 * @returns This TransformMatrix.
                 */
                copyFromArray(src: any[]): this;

                /**
                 * Set the values of this Matrix to copy those of the matrix given,
                 * combined with a camera scroll factor.
                 * 
                 * This is used in many render functions.
                 * @param src The source Matrix to copy from.
                 * @param scrollX The horizontal scroll value to factor in.
                 * @param scrollY The vertical scroll value to factor in.
                 * @param scrollFactorX The horizontal scroll factor to apply.
                 * @param scrollFactorY The vertical scroll factor to apply.
                 * @returns This TransformMatrix.
                 */
                copyWithScrollFactorFrom(src: Phaser.GameObjects.Components.TransformMatrix, scrollX: number, scrollY: number, scrollFactorX: number, scrollFactorY: number): this;

                /**
                 * Copy the values from this Matrix to the given Canvas Rendering Context.
                 * This will use the Context.transform method.
                 * @param ctx The Canvas Rendering Context to copy the matrix values to.
                 * @returns The Canvas Rendering Context.
                 */
                copyToContext(ctx: CanvasRenderingContext2D): CanvasRenderingContext2D;

                /**
                 * Copy the values from this Matrix to the given Canvas Rendering Context.
                 * This will use the Context.setTransform method.
                 * @param ctx The Canvas Rendering Context to copy the matrix values to.
                 * @returns The Canvas Rendering Context.
                 */
                setToContext(ctx: CanvasRenderingContext2D): CanvasRenderingContext2D;

                /**
                 * Copy the values in this Matrix to the array given.
                 * 
                 * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.
                 * @param out The array to copy the matrix values in to.
                 * @returns An array where elements 0 to 5 contain the values from this matrix.
                 */
                copyToArray(out?: any[]): any[];

                /**
                 * Set the values of this Matrix.
                 * @param a The Scale X value.
                 * @param b The Shear Y value.
                 * @param c The Shear X value.
                 * @param d The Scale Y value.
                 * @param tx The Translate X value.
                 * @param ty The Translate Y value.
                 * @returns This TransformMatrix.
                 */
                setTransform(a: number, b: number, c: number, d: number, tx: number, ty: number): this;

                /**
                 * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.
                 * 
                 * The result must be applied in the following order to reproduce the current matrix:
                 * 
                 * translate -> rotate -> scaleundefined
                 * @returns The decomposed Matrix.
                 */
                decomposeMatrix(): Phaser.Types.GameObjects.DecomposeMatrixResults;

                /**
                 * Apply the identity, translate, rotate and scale operations on the Matrix.
                 * @param x The horizontal translation.
                 * @param y The vertical translation.
                 * @param rotation The angle of rotation in radians.
                 * @param scaleX The horizontal scale.
                 * @param scaleY The vertical scale.
                 * @returns This TransformMatrix.
                 */
                applyITRS(x: number, y: number, rotation: number, scaleX: number, scaleY: number): this;

                /**
                 * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of
                 * the current matrix with its transformation applied.
                 * 
                 * Can be used to translate points from world to local space.
                 * @param x The x position to translate.
                 * @param y The y position to translate.
                 * @param output A Vector2, or point-like object, to store the results in.
                 * @returns The coordinates, inverse-transformed through this matrix.
                 */
                applyInverse(x: number, y: number, output?: Phaser.Math.Vector2): Phaser.Math.Vector2;

                /**
                 * Performs the 8 calculations required to create the vertices of
                 * a quad based on this matrix and the given vertex coordinates.
                 * 
                 * The result is stored in `TransformMatrix.quad`, which is returned
                 * from this method.
                 * @param x The x value of the top-left vertex of the quad.
                 * @param y The y value of the top-left vertex of the quad.
                 * @param xw The x value of the bottom-right vertex of the quad. This is the x + width.
                 * @param yh The y value of the bottom-right vertex of the quad. This is the y + height.
                 * @param quad Optional Float32Array to store the results in. Otherwise uses the local quad array.
                 * @returns The quad Float32Array.
                 */
                setQuad(x: number, y: number, xw: number, yh: number, quad?: Float32Array): Float32Array;

                /**
                 * Returns the X component of this matrix multiplied by the given values.
                 * This is the same as `x * a + y * c + e`.
                 * @param x The x value.
                 * @param y The y value.
                 * @returns The calculated x value.
                 */
                getX(x: number, y: number): number;

                /**
                 * Returns the Y component of this matrix multiplied by the given values.
                 * This is the same as `x * b + y * d + f`.
                 * @param x The x value.
                 * @param y The y value.
                 * @returns The calculated y value.
                 */
                getY(x: number, y: number): number;

                /**
                 * Returns the X component of this matrix multiplied by the given values.
                 * 
                 * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.
                 * @param x The x value.
                 * @param y The y value.
                 * @param round Math.round the resulting value? Default false.
                 * @returns The calculated x value.
                 */
                getXRound(x: number, y: number, round?: boolean): number;

                /**
                 * Returns the Y component of this matrix multiplied by the given values.
                 * 
                 * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.
                 * @param x The x value.
                 * @param y The y value.
                 * @param round Math.round the resulting value? Default false.
                 * @returns The calculated y value.
                 */
                getYRound(x: number, y: number, round?: boolean): number;

                /**
                 * Returns a string that can be used in a CSS Transform call as a `matrix` property.undefined
                 * @returns A string containing the CSS Transform matrix values.
                 */
                getCSSMatrix(): string;

                /**
                 * Destroys this Transform Matrix.
                 */
                destroy(): void;

            }

            /**
             * Provides methods used for setting the visibility of a Game Object.
             * The Visible component is mixed into Game Objects to give them a `visible` boolean property
             * and a `setVisible` method. Visibility is tracked via a bitmask flag on `renderFlags`, so
             * toggling it is a fast bitwise operation. An invisible Game Object is excluded from the
             * render pass entirely, but its `update` logic continues to run normally each frame.
             * Should be applied as a mixin and not used directly.
             */
            interface Visible {
                /**
                 * The visible state of the Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 */
                visible: boolean;
                /**
                 * Sets the visibility of this Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 * @param value The visible state of the Game Object.
                 * @returns This Game Object instance.
                 */
                setVisible(value: boolean): this;
            }

        }

        /**
         * A Container Game Object.
         * 
         * A Container, as the name implies, can 'contain' other types of Game Object.
         * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.
         * By default it will be removed from the Display List and instead added to the Containers own internal list.
         * 
         * The position of the Game Object automatically becomes relative to the position of the Container.
         * 
         * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the
         * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of
         * the Container, and position children positively and negative around it as required.
         * 
         * When the Container is rendered, all of its children are rendered as well, in the order in which they exist
         * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.
         * 
         * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will
         * automatically influence all children as well.
         * 
         * Containers can include other Containers for deeply nested transforms.
         * 
         * Containers can have masks set on them and can be used as a mask too.
         * Because masks are filters, the container's children can also have masks,
         * and the Container's mask will be applied over the top.
         * In Canvas rendering, only the Container's mask will be applied.
         * 
         * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them
         * to use as their hit area. Container children can also be enabled for input, independent of the Container.
         * 
         * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,
         * or the input area will become misaligned.
         * 
         * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,
         * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,
         * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children
         * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure
         * your game to work around this.
         * 
         * It's important to understand the impact of using Containers. They add additional processing overhead into
         * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true
         * for input events. You also lose the ability to set the display depth of Container children in the same
         * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost
         * every time you create one, try to structure your game around avoiding that where possible.
         */
        class Container extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param children An optional array of Game Objects to add to this Container.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, children?: Phaser.GameObjects.GameObject[]);

            /**
             * An array holding the children of this Container.
             */
            list: Phaser.GameObjects.GameObject[];

            /**
             * Does this Container exclusively manage its children?
             * 
             * The default is `true` which means a child added to this Container cannot
             * belong in another Container, which includes the Scene display list.
             * 
             * If you disable this then this Container will no longer exclusively manage its children.
             * This allows you to create all kinds of interesting graphical effects, such as replicating
             * Game Objects without reparenting them all over the Scene.
             * However, doing so will prevent children from receiving any kind of input event or have
             * their physics bodies work by default, as they're no longer a single entity on the
             * display list, but are being replicated where-ever this Container is.
             */
            exclusive: boolean;

            /**
             * Containers can have an optional maximum size. If set to anything above 0 it
             * will constrict the addition of new Game Objects into the Container, capping off
             * the maximum limit the Container can grow in size to.
             */
            maxSize: number;

            /**
             * An internal cursor position used for iterating through the Container's children
             * via methods such as `first`, `next`, `previous` and `last`.
             */
            position: number;

            /**
             * Internal Transform Matrix used for local space conversion.
             */
            localTransform: Phaser.GameObjects.Components.TransformMatrix;

            /**
             * The horizontal scroll factor of this Container.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Container.
             * 
             * When a camera scrolls it will change the location at which this Container is rendered on-screen.
             * It does not change the Containers actual position values.
             * 
             * For a Container, setting this value will only update the Container itself, not its children.
             * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Container.
             * 
             * Please be aware that scroll factor values other than 1 are not taken in to consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Container.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Container.
             * 
             * When a camera scrolls it will change the location at which this Container is rendered on-screen.
             * It does not change the Containers actual position values.
             * 
             * For a Container, setting this value will only update the Container itself, not its children.
             * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Container.
             * 
             * Please be aware that scroll factor values other than 1 are not taken in to consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Internal value to allow Containers to be used for input and physics.
             * Do not change this value. It has no effect other than to break things.
             */
            readonly originX: number;

            /**
             * Internal value to allow Containers to be used for input and physics.
             * Do not change this value. It has no effect other than to break things.
             */
            readonly originY: number;

            /**
             * Internal value to allow Containers to be used for input and physics.
             * Do not change this value. It has no effect other than to break things.
             */
            readonly displayOriginX: number;

            /**
             * Internal value to allow Containers to be used for input and physics.
             * Do not change this value. It has no effect other than to break things.
             */
            readonly displayOriginY: number;

            /**
             * Does this Container exclusively manage its children?
             * 
             * The default is `true` which means a child added to this Container cannot
             * belong in another Container, which includes the Scene display list.
             * 
             * If you disable this then this Container will no longer exclusively manage its children.
             * This allows you to create all kinds of interesting graphical effects, such as replicating
             * Game Objects without reparenting them all over the Scene.
             * However, doing so will prevent children from receiving any kind of input event or have
             * their physics bodies work by default, as they're no longer a single entity on the
             * display list, but are being replicated where-ever this Container is.
             * @param value The exclusive state of this Container. Default true.
             * @returns This Container.
             */
            setExclusive(value?: boolean): this;

            /**
             * Gets the bounds of this Container. It works by iterating all children of the Container,
             * getting their respective bounds, and then working out a min-max rectangle from that.
             * It does not factor in if the children render or not, all are included.
             * 
             * Some children are unable to return their bounds, such as Graphics objects, in which case
             * they are skipped.
             * 
             * Depending on the quantity of children in this Container it could be a really expensive call,
             * so cache it and only poll it as needed.
             * 
             * The values are stored and returned in a Rectangle object.
             * @param output A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds(output?: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle;

            /**
             * Takes a Point-like object, such as a Vector2, or object with public x and y properties,
             * and transforms it into the space of this Container, then returns it in the output object.
             * @param source The Source Point to be transformed.
             * @param output A destination object to store the transformed point in. If none given a Vector2 will be created and returned.
             * @returns The transformed point.
             */
            pointToContainer(source: Phaser.Types.Math.Vector2Like, output?: Phaser.Types.Math.Vector2Like): Phaser.Types.Math.Vector2Like;

            /**
             * Returns the world transform matrix as used for Bounds checks.
             * 
             * The returned matrix is temporary and shouldn't be stored.undefined
             * @returns The world transform matrix.
             */
            getBoundsTransformMatrix(): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Adds the given Game Object, or array of Game Objects, to this Container.
             * 
             * Each Game Object must be unique within the Container.
             * 
             * If you try to add a Layer, it will throw an error.
             * @param child The Game Object, or array of Game Objects, to add to the Container.
             * @returns This Container instance.
             */
            add<T extends Phaser.GameObjects.GameObject>(child: (T|T[])): this;

            /**
             * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.
             * 
             * Existing Game Objects in the Container are shifted up.
             * 
             * Each Game Object must be unique within the Container.
             * @param child The Game Object, or array of Game Objects, to add to the Container.
             * @param index The position to insert the Game Object/s at. Default 0.
             * @returns This Container instance.
             */
            addAt<T extends Phaser.GameObjects.GameObject>(child: (T|T[]), index?: number): this;

            /**
             * Returns the Game Object at the given position in this Container.
             * @param index The position to get the Game Object from.
             * @returns The Game Object at the specified index, or `null` if none found.
             */
            getAt<T extends Phaser.GameObjects.GameObject>(index: number): T;

            /**
             * Returns the index of the given Game Object in this Container.
             * @param child The Game Object to search for in this Container.
             * @returns The index of the Game Object in this Container, or -1 if not found.
             */
            getIndex<T extends Phaser.GameObjects.GameObject>(child: T): number;

            /**
             * Sort the contents of this Container so the items are in order based on the given property.
             * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.
             * @param property The property to lexically sort by.
             * @param handler Provide your own custom handler function. Will receive 2 children which it should compare and return a negative, zero, or positive number.
             * @returns This Container instance.
             */
            sort(property: string, handler?: Function): this;

            /**
             * Searches for the first instance of a child with its `name` property matching the given argument.
             * Should more than one child have the same name only the first is returned.
             * @param name The name to search for.
             * @returns The first child with a matching name, or `null` if none were found.
             */
            getByName<T extends Phaser.GameObjects.GameObject>(name: string): T;

            /**
             * Returns a random Game Object from this Container.
             * @param startIndex An optional start index. Default 0.
             * @param length An optional length, the total number of elements (from the startIndex) to choose from.
             * @returns A random child from the Container, or `null` if the Container is empty.
             */
            getRandom<T extends Phaser.GameObjects.GameObject>(startIndex?: number, length?: number): T;

            /**
             * Gets the first Game Object in this Container.
             * 
             * You can also specify a property and value to search for, in which case it will return the first
             * Game Object in this Container with a matching property and / or value.
             * 
             * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.
             * 
             * You can limit the search to the `startIndex` - `endIndex` range.
             * @param property The property to test on each Game Object in the Container.
             * @param value The value to test the property against. Must pass a strict (`===`) comparison check.
             * @param startIndex An optional start index to search from. Default 0.
             * @param endIndex An optional end index to search up to (but not included) Default Container.length.
             * @returns The first matching Game Object, or `null` if none was found.
             */
            getFirst<T extends Phaser.GameObjects.GameObject>(property: string, value: any, startIndex?: number, endIndex?: number): T;

            /**
             * Returns all Game Objects in this Container.
             * 
             * You can optionally specify a matching criteria using the `property` and `value` arguments.
             * 
             * For example: `getAll('body')` would return only Game Objects that have a body property.
             * 
             * You can also specify a value to compare the property to:
             * 
             * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.
             * 
             * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,
             * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only
             * the first 50 Game Objects.
             * @param property The property to test on each Game Object in the Container.
             * @param value If property is set then the `property` must strictly equal this value to be included in the results.
             * @param startIndex An optional start index to search from. Default 0.
             * @param endIndex An optional end index to search up to (but not included) Default Container.length.
             * @returns An array of matching Game Objects from this Container.
             */
            getAll<T extends Phaser.GameObjects.GameObject>(property?: string, value?: any, startIndex?: number, endIndex?: number): T[];

            /**
             * Returns the total number of Game Objects in this Container that have a property
             * matching the given value.
             * 
             * For example: `count('visible', true)` would count all the elements that have their visible property set.
             * 
             * You can optionally limit the operation to the `startIndex` - `endIndex` range.
             * @param property The property to check.
             * @param value The value to check.
             * @param startIndex An optional start index to search from. Default 0.
             * @param endIndex An optional end index to search up to (but not included) Default Container.length.
             * @returns The total number of Game Objects in this Container with a property matching the given value.
             */
            count(property: string, value: any, startIndex?: number, endIndex?: number): number;

            /**
             * Swaps the position of two Game Objects in this Container.
             * Both Game Objects must belong to this Container.
             * @param child1 The first Game Object to swap.
             * @param child2 The second Game Object to swap.
             * @returns This Container instance.
             */
            swap<T extends Phaser.GameObjects.GameObject>(child1: T, child2: T): this;

            /**
             * Moves a Game Object to a new position within this Container.
             * 
             * The Game Object must already be a child of this Container.
             * 
             * The Game Object is removed from its old position and inserted into the new one.
             * Therefore the Container size does not change. Other children will change position accordingly.
             * @param child The Game Object to move.
             * @param index The new position of the Game Object in this Container.
             * @returns This Container instance.
             */
            moveTo<T extends Phaser.GameObjects.GameObject>(child: T, index: number): this;

            /**
             * Moves a Game Object above another one within this Container.
             * If the Game Object is already above the other, it isn't moved.
             * 
             * These 2 Game Objects must already be children of this Container.
             * @param child1 The Game Object to move above base Game Object.
             * @param child2 The base Game Object.
             * @returns This Container instance.
             */
            moveAbove<T extends Phaser.GameObjects.GameObject>(child1: T, child2: T): this;

            /**
             * Moves a Game Object below another one within this Container.
             * If the Game Object is already below the other, it isn't moved.
             * 
             * These 2 Game Objects must already be children of this Container.
             * @param child1 The Game Object to move below base Game Object.
             * @param child2 The base Game Object.
             * @returns This Container instance.
             */
            moveBelow<T extends Phaser.GameObjects.GameObject>(child1: T, child2: T): this;

            /**
             * Removes the given Game Object, or array of Game Objects, from this Container.
             * 
             * The Game Objects must already be children of this Container.
             * 
             * You can also optionally call `destroy` on each Game Object that is removed from the Container.
             * @param child The Game Object, or array of Game Objects, to be removed from the Container.
             * @param destroyChild Optionally call `destroy` on each child successfully removed from this Container. Default false.
             * @returns This Container instance.
             */
            remove<T extends Phaser.GameObjects.GameObject>(child: (T|T[]), destroyChild?: boolean): this;

            /**
             * Removes the Game Object at the given position in this Container.
             * 
             * You can also optionally call `destroy` on the Game Object, if one is found.
             * @param index The index of the Game Object to be removed.
             * @param destroyChild Optionally call `destroy` on the Game Object if successfully removed from this Container. Default false.
             * @returns This Container instance.
             */
            removeAt(index: number, destroyChild?: boolean): this;

            /**
             * Removes the Game Objects between the given positions in this Container.
             * 
             * You can also optionally call `destroy` on each Game Object that is removed from the Container.
             * @param startIndex An optional start index to search from. Default 0.
             * @param endIndex An optional end index to search up to (but not included) Default Container.length.
             * @param destroyChild Optionally call `destroy` on each Game Object successfully removed from this Container. Default false.
             * @returns This Container instance.
             */
            removeBetween(startIndex?: number, endIndex?: number, destroyChild?: boolean): this;

            /**
             * Removes all Game Objects from this Container.
             * 
             * You can also optionally call `destroy` on each Game Object that is removed from the Container.
             * @param destroyChild Optionally call `destroy` on each Game Object successfully removed from this Container. Default false.
             * @returns This Container instance.
             */
            removeAll(destroyChild?: boolean): this;

            /**
             * Brings the given Game Object to the top of this Container.
             * This will cause it to render on-top of any other objects in the Container.
             * @param child The Game Object to bring to the top of the Container.
             * @returns This Container instance.
             */
            bringToTop<T extends Phaser.GameObjects.GameObject>(child: T): this;

            /**
             * Sends the given Game Object to the bottom of this Container.
             * This will cause it to render below any other objects in the Container.
             * @param child The Game Object to send to the bottom of the Container.
             * @returns This Container instance.
             */
            sendToBack<T extends Phaser.GameObjects.GameObject>(child: T): this;

            /**
             * Moves the given Game Object up one place in this Container, unless it's already at the top.
             * @param child The Game Object to be moved in the Container.
             * @returns This Container instance.
             */
            moveUp<T extends Phaser.GameObjects.GameObject>(child: T): this;

            /**
             * Moves the given Game Object down one place in this Container, unless it's already at the bottom.
             * @param child The Game Object to be moved in the Container.
             * @returns This Container instance.
             */
            moveDown<T extends Phaser.GameObjects.GameObject>(child: T): this;

            /**
             * Reverses the order of all Game Objects in this Container.undefined
             * @returns This Container instance.
             */
            reverse(): this;

            /**
             * Shuffles all Game Objects in this Container using the Fisher-Yates implementation.undefined
             * @returns This Container instance.
             */
            shuffle(): this;

            /**
             * Replaces a Game Object in this Container with the new Game Object.
             * The new Game Object cannot already be a child of this Container.
             * @param oldChild The Game Object in this Container that will be replaced.
             * @param newChild The Game Object to be added to this Container.
             * @param destroyChild Optionally call `destroy` on the Game Object if successfully removed from this Container. Default false.
             * @returns This Container instance.
             */
            replace<T extends Phaser.GameObjects.GameObject>(oldChild: T, newChild: T, destroyChild?: boolean): this;

            /**
             * Returns `true` if the given Game Object is a direct child of this Container.
             * 
             * This check does not scan nested Containers.
             * @param child The Game Object to check for within this Container.
             * @returns True if the Game Object is an immediate child of this Container, otherwise false.
             */
            exists<T extends Phaser.GameObjects.GameObject>(child: T): boolean;

            /**
             * Sets the property to the given value on all Game Objects in this Container.
             * 
             * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,
             * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only
             * the first 50 Game Objects.
             * @param property The property that must exist on the Game Object.
             * @param value The value to set the property to.
             * @param startIndex An optional start index to search from. Default 0.
             * @param endIndex An optional end index to search up to (but not included) Default Container.length.
             * @returns This Container instance.
             */
            setAll(property: string, value: any, startIndex?: number, endIndex?: number): this;

            /**
             * Passes all Game Objects in this Container to the given callback.
             * 
             * A copy of the Container is made before passing each entry to your callback.
             * This protects against the callback itself modifying the Container.
             * 
             * If you know for sure that the callback will not change the size of this Container
             * then you can use the more performant `Container.iterate` method instead.
             * @param callback The function to call.
             * @param context Value to use as `this` when executing callback.
             * @param args Additional arguments that will be passed to the callback, after the child.
             * @returns This Container instance.
             */
            each(callback: Function, context?: object, ...args: any[]): this;

            /**
             * Passes all Game Objects in this Container to the given callback.
             * 
             * Only use this method when you absolutely know that the Container will not be modified during
             * the iteration, i.e. by removing or adding to its contents.
             * @param callback The function to call.
             * @param context Value to use as `this` when executing callback.
             * @param args Additional arguments that will be passed to the callback, after the child.
             * @returns This Container instance.
             */
            iterate(callback: Function, context?: object, ...args: any[]): this;

            /**
             * Sets the scroll factor of this Container and optionally all of its children.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken in to consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @param updateChildren Apply this scrollFactor to all Container children as well? Default false.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number, updateChildren?: boolean): this;

            /**
             * The number of Game Objects inside this Container.
             */
            readonly length: number;

            /**
             * Returns the first Game Object within the Container, or `null` if it is empty.
             * 
             * You can move the cursor by calling `Container.next` and `Container.previous`.
             */
            readonly first: Phaser.GameObjects.GameObject | null;

            /**
             * Returns the last Game Object within the Container, or `null` if it is empty.
             * 
             * You can move the cursor by calling `Container.next` and `Container.previous`.
             */
            readonly last: Phaser.GameObjects.GameObject | null;

            /**
             * Returns the next Game Object within the Container, or `null` if it is empty.
             * 
             * You can move the cursor by calling `Container.next` and `Container.previous`.
             */
            readonly next: Phaser.GameObjects.GameObject | null;

            /**
             * Returns the previous Game Object within the Container, or `null` if it is empty.
             * 
             * You can move the cursor by calling `Container.next` and `Container.previous`.
             */
            readonly previous: Phaser.GameObjects.GameObject | null;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * Internal handler, called when a child is destroyed.
             */
            protected onChildDestroyed(): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.
         * 
         * In order for DOM Elements to display you have to enable them by adding the following to your game
         * configuration object:
         * 
         * ```javascript
         * dom {
         *   createContainer: true
         * }
         * ```
         * 
         * You must also have a parent container for Phaser. This is specified by the `parent` property in the
         * game config.
         * 
         * When these two things are added, Phaser will automatically create a DOM Container div that is positioned
         * over the top of the game canvas. This div is sized to match the canvas, and if the canvas size changes,
         * as a result of settings within the Scale Manager, the dom container is resized accordingly.
         * 
         * If you have not already done so, you have to provide a `parent` in the Game Configuration, or the DOM
         * Container will fail to be created.
         * 
         * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing
         * Element that you wish to be placed under the control of Phaser. For example:
         * 
         * ```javascript
         * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');
         * ```
         * 
         * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in
         * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case,
         * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font.
         * 
         * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control
         * alignment and positioning of the elements next to regular game content.
         * 
         * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the
         * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other
         * methods available in this class to help construct your elements.
         * 
         * Once the element has been created you can then control it like you would any other Game Object. You can set its
         * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped
         * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that
         * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have
         * a DOM Element, then a Sprite, then another DOM Element behind it.
         * 
         * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event
         * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas
         * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you
         * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly.
         * 
         * DOM Game Objects can be added to a Phaser Container, however you should only nest them **one level deep**.
         * Any further down the chain and they will ignore all root container properties.
         * 
         * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in.
         * 
         * Note that you should only have DOM Elements in a Scene with a _single_ Camera. If you require multiple cameras,
         * use parallel scenes to achieve this.
         * 
         * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert
         * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table.
         * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and
         * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top
         * of your game, and should treat it accordingly.
         */
        class DOMElement extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this DOM Element in the world. Default 0.
             * @param y The vertical position of this DOM Element in the world. Default 0.
             * @param element An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'.
             * @param style If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set.
             * @param innerText If given, will be set directly as the elements `innerText` property value, replacing whatever was there before.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, element?: Element | string, style?: string | any, innerText?: string);

            /**
             * A reference to the parent DOM Container that the Game instance created when it started.
             */
            parent: Element;

            /**
             * A reference to the HTML Cache.
             */
            cache: Phaser.Cache.BaseCache;

            /**
             * The actual DOM Element that this Game Object is bound to. For example, if you've created a `<div>`
             * then this property is a direct reference to that element within the dom.
             */
            node: Element;

            /**
             * By default a DOM Element will have its transform, display, opacity, zIndex and blend mode properties
             * updated when its rendered. If, for some reason, you don't want any of these changed other than the
             * CSS transform, then set this flag to `true`. When `true` only the CSS Transform is applied and it's
             * up to you to keep track of and set the other properties as required.
             * 
             * This can be handy if, for example, you've a nested DOM Element and you don't want the opacity to be
             * picked-up by any of its children.
             */
            transformOnly: boolean;

            /**
             * The angle, in radians, by which to skew the DOM Element on the horizontal axis.
             * 
             * https://developer.mozilla.org/en-US/docs/Web/CSS/transform
             */
            skewX: number;

            /**
             * The angle, in radians, by which to skew the DOM Element on the vertical axis.
             * 
             * https://developer.mozilla.org/en-US/docs/Web/CSS/transform
             */
            skewY: number;

            /**
             * A Vector4 that contains the 3D rotation of this DOM Element around a fixed axis in 3D space.
             * 
             * The x, y, and z components define the direction of the rotation axis. The w component holds the
             * angle of rotation, in the unit defined by the `rotate3dAngle` property (degrees by default).
             * 
             * For more details see the following MDN page:
             * 
             * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d
             */
            rotate3d: Phaser.Math.Vector4;

            /**
             * The unit that represents the 3D rotation values. By default this is `deg` for degrees, but can
             * be changed to any supported unit. See this page for further details:
             * 
             * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d
             */
            rotate3dAngle: string;

            /**
             * Sets the CSS `pointerEvents` attribute on the DOM Element during rendering.
             * 
             * This is 'auto' by default. Changing it may have unintended side-effects with
             * internal Phaser input handling, such as dragging, so only change this if you
             * understand the implications.
             */
            pointerEvents: string;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * For a DOM Element this property is read-only.
             * 
             * The property `displayWidth` holds the computed bounds of this DOM Element, factoring in scaling.
             */
            readonly width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * For a DOM Element this property is read-only.
             * 
             * The property `displayHeight` holds the computed bounds of this DOM Element, factoring in scaling.
             */
            readonly height: number;

            /**
             * The computed display width of this Game Object, based on the `getBoundingClientRect` DOM call.
             * 
             * The property `width` holds the un-scaled width of this DOM Element.
             */
            readonly displayWidth: number;

            /**
             * The computed display height of this Game Object, based on the `getBoundingClientRect` DOM call.
             * 
             * The property `height` holds the un-scaled height of this DOM Element.
             */
            readonly displayHeight: number;

            /**
             * Sets the horizontal and vertical skew values of this DOM Element.
             * 
             * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/transform
             * @param x The angle, in radians, by which to skew the DOM Element on the horizontal axis. Default 0.
             * @param y The angle, in radians, by which to skew the DOM Element on the vertical axis. Default x.
             * @returns This DOM Element instance.
             */
            setSkew(x?: number, y?: number): this;

            /**
             * Sets the perspective CSS property of the _parent DOM Container_. This determines the distance between the z=0
             * plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with
             * z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. The strength of the effect is determined
             * by the value of this property.
             * 
             * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/perspective
             * 
             * **Changing this value changes it globally for all DOM Elements, as they all share the same parent container.**
             * @param value The perspective value, in pixels, that determines the distance between the z plane and the user.
             * @returns This DOM Element instance.
             */
            setPerspective(value: number): this;

            /**
             * The perspective CSS property value of the _parent DOM Container_. This determines the distance between the z=0
             * plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with
             * z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. The strength of the effect is determined
             * by the value of this property.
             * 
             * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/perspective
             * 
             * **Changing this value changes it globally for all DOM Elements, as they all share the same parent container.**
             */
            perspective: number;

            /**
             * Adds one or more native DOM event listeners onto the underlying Element of this Game Object.
             * The event is then dispatched via this Game Objects standard event emitter.
             * 
             * For example:
             * 
             * ```javascript
             * var div = this.add.dom(x, y, element);
             * 
             * div.addListener('click');
             * 
             * div.on('click', handler);
             * ```
             * @param events The DOM event/s to listen for. You can specify multiple events by separating them with spaces.
             * @returns This DOM Element instance.
             */
            addListener(events: string): this;

            /**
             * Removes one or more native DOM event listeners from the underlying Element of this Game Object.
             * @param events The DOM event/s to stop listening for. You can specify multiple events by separating them with spaces.
             * @returns This DOM Element instance.
             */
            removeListener(events: string): this;

            /**
             * Creates a native DOM Element, adds it to the parent DOM Container and then binds it to this Game Object,
             * so you can control it. The `tagName` should be a string and is passed to `document.createElement`:
             * 
             * ```javascript
             * this.add.dom().createElement('div');
             * ```
             * 
             * For more details on acceptable tag names see: https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
             * 
             * You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`
             * value as well. Here is an example of a DOMString:
             * 
             * ```javascript
             * this.add.dom().createElement('div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');
             * ```
             * 
             * And using a style object:
             * 
             * ```javascript
             * var style = {
             *   'background-color': 'lime';
             *   'width': '200px';
             *   'height': '100px';
             *   'font': '48px Arial';
             * };
             * 
             * this.add.dom().createElement('div', style, 'Phaser');
             * ```
             * 
             * If this Game Object already has an Element, it is removed from the DOM entirely first.
             * Any event listeners you may have previously created will need to be re-created after this call.
             * @param tagName A string that specifies the type of element to be created. The nodeName of the created element is initialized with the value of tagName. Don't use qualified names (like "html:a") with this method.
             * @param style Either a DOMString that holds the CSS styles to be applied to the created element, or an object the styles will be read from.
             * @param innerText A DOMString that holds the text that will be set as the innerText of the created element.
             * @returns This DOM Element instance.
             */
            createElement(tagName: string, style?: string | any, innerText?: string): this;

            /**
             * Binds a new DOM Element to this Game Object. If this Game Object already has an Element it is removed from the DOM
             * entirely first. Any event listeners you may have previously created will need to be re-created on the new element.
             * 
             * The `element` argument you pass to this method can be either a string tagName:
             * 
             * ```javascript
             * <h1 id="heading">Phaser</h1>
             * 
             * this.add.dom().setElement('heading');
             * ```
             * 
             * Or a reference to an Element instance:
             * 
             * ```javascript
             * <h1 id="heading">Phaser</h1>
             * 
             * var h1 = document.getElementById('heading');
             * 
             * this.add.dom().setElement(h1);
             * ```
             * 
             * You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`
             * value as well. Here is an example of a DOMString:
             * 
             * ```javascript
             * this.add.dom().setElement(h1, 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');
             * ```
             * 
             * And using a style object:
             * 
             * ```javascript
             * var style = {
             *   'background-color': 'lime';
             *   'width': '200px';
             *   'height': '100px';
             *   'font': '48px Arial';
             * };
             * 
             * this.add.dom().setElement(h1, style, 'Phaser');
             * ```
             * @param element If a string it is passed to `getElementById()`, or it should be a reference to an existing Element.
             * @param style Either a DOMString that holds the CSS styles to be applied to the created element, or an object the styles will be read from.
             * @param innerText A DOMString that holds the text that will be set as the innerText of the created element.
             * @returns This DOM Element instance.
             */
            setElement(element: string | Element, style?: string | any, innerText?: string): this;

            /**
             * Takes a block of html from the HTML Cache, that has previously been preloaded into the game, and then
             * creates a DOM Element from it. The loaded HTML is set as the `innerHTML` property of the created
             * element.
             * 
             * Assume the following html is stored in a file called `loginform.html`:
             * 
             * ```html
             * <input type="text" name="nameField" placeholder="Enter your name" style="font-size: 32px">
             * <input type="button" name="playButton" value="Let's Play" style="font-size: 32px">
             * ```
             * 
             * Which is loaded into your game using the cache key 'login':
             * 
             * ```javascript
             * this.load.html('login', 'assets/loginform.html');
             * ```
             * 
             * You can create a DOM Element from it using the cache key:
             * 
             * ```javascript
             * this.add.dom().createFromCache('login');
             * ```
             * 
             * The optional `elementType` argument controls the container that is created, into which the loaded html is inserted.
             * The default is a plain `div` object, but any valid tagName can be given.
             * 
             * If this Game Object already has an Element, it is removed from the DOM entirely first.
             * Any event listeners you may have previously created will need to be re-created after this call.
             * @param key The key of the html cache entry to use for this DOM Element.
             * @param tagName The tag name of the element into which all of the loaded html will be inserted. Defaults to a plain div tag. Default 'div'.
             * @returns This DOM Element instance.
             */
            createFromCache(key: string, tagName?: string): this;

            /**
             * Takes a string of html and then creates a DOM Element from it. The HTML is set as the `innerHTML`
             * property of the created element.
             * 
             * ```javascript
             * let form = `
             * <input type="text" name="nameField" placeholder="Enter your name" style="font-size: 32px">
             * <input type="button" name="playButton" value="Let's Play" style="font-size: 32px">
             * `;
             * ```
             * 
             * You can create a DOM Element from it using the string:
             * 
             * ```javascript
             * this.add.dom().createFromHTML(form);
             * ```
             * 
             * The optional `elementType` argument controls the type of container that is created, into which the html is inserted.
             * The default is a plain `div` object, but any valid tagName can be given.
             * 
             * If this Game Object already has an Element, it is removed from the DOM entirely first.
             * Any event listeners you may have previously created will need to be re-created after this call.
             * @param html A string of html to be set as the `innerHTML` property of the created element.
             * @param tagName The tag name of the element into which all of the html will be inserted. Defaults to a plain div tag. Default 'div'.
             * @returns This DOM Element instance.
             */
            createFromHTML(html: string, tagName?: string): this;

            /**
             * Removes the current DOM Element bound to this Game Object from the DOM entirely and resets the
             * `node` property of this Game Object to be `null`.undefined
             * @returns This DOM Element instance.
             */
            removeElement(): this;

            /**
             * Internal method that sets the `displayWidth` and `displayHeight` properties, and the `clientWidth` 
             * and `clientHeight` values into the `width` and `height` properties respectively.
             * 
             * This is called automatically whenever a new element is created or set.undefined
             * @returns This DOM Element instance.
             */
            updateSize(): this;

            /**
             * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through
             * them, looking for the first one that has a property matching the given key and value. It then returns this child
             * if found, or `null` if not.
             * @param property The property to search the children for.
             * @param value The value the property must strictly equal.
             * @returns The first matching child DOM Element, or `null` if not found.
             */
            getChildByProperty(property: string, value: string): Element | null;

            /**
             * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through
             * them, looking for the first one that has a matching id. It then returns this child if found, or `null` if not.
             * 
             * Be aware that class and id names are case-sensitive.
             * @param id The id to search the children for.
             * @returns The first matching child DOM Element, or `null` if not found.
             */
            getChildByID(id: string): Element | null;

            /**
             * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through
             * them, looking for the first one that has a matching name. It then returns this child if found, or `null` if not.
             * 
             * Be aware that class and id names are case-sensitive.
             * @param name The name to search the children for.
             * @returns The first matching child DOM Element, or `null` if not found.
             */
            getChildByName(name: string): Element | null;

            /**
             * Sets the `className` property of the DOM Element node and updates the internal sizes.
             * @param className A string representing the class or space-separated classes of the element.
             * @returns This DOM Element instance.
             */
            setClassName(className: string): this;

            /**
             * Sets the `innerText` property of the DOM Element node and updates the internal sizes.
             * 
             * Note that only certain types of Elements can have `innerText` set on them.
             * @param text A DOMString representing the rendered text content of the element.
             * @returns This DOM Element instance.
             */
            setText(text: string): this;

            /**
             * Sets the `innerHTML` property of the DOM Element node and updates the internal sizes.
             * @param html A DOMString of html to be set as the `innerHTML` property of the element.
             * @returns This DOM Element instance.
             */
            setHTML(html: string): this;

            /**
             * Compares the renderMask with the renderFlags to see if this Game Object will render or not.
             * 
             * DOMElements always return `true` as they need to still set values during the render pass, even if not visible.undefined
             * @returns `true` if the Game Object should be rendered, otherwise `false`.
             */
            willRender(): boolean;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        namespace Events {
            /**
             * The Game Object Added to Scene Event.
             * 
             * This event is dispatched when a Game Object is added to a Scene.
             * 
             * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.
             */
            const ADDED_TO_SCENE: string;

            /**
             * The Game Object Destroy Event.
             * 
             * This event is dispatched when a Game Object instance is being destroyed.
             * 
             * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.
             */
            const DESTROY: string;

            /**
             * The Game Object Removed from Scene Event.
             * 
             * This event is dispatched when a Game Object is removed from a Scene.
             * 
             * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.
             */
            const REMOVED_FROM_SCENE: string;

            /**
             * The Video Game Object Complete Event.
             * 
             * This event is dispatched when a Video finishes playback by reaching the end of its duration. It
             * is also dispatched if a video marker sequence is being played and reaches the end.
             * 
             * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,
             * so never technically 'complete'.
             * 
             * If a video is stopped from playback, via the `Video.stop` method, it will emit the
             * `VIDEO_STOP` event instead of this one.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.
             */
            const VIDEO_COMPLETE: string;

            /**
             * The Video Game Object Created Event.
             * 
             * This event is dispatched when the texture for a Video has been created. This happens
             * when enough of the video source has been loaded that the browser is able to render a
             * frame from it.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.
             */
            const VIDEO_CREATED: string;

            /**
             * The Video Game Object Error Event.
             * 
             * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.
             */
            const VIDEO_ERROR: string;

            /**
             * The Video Game Object Locked Event.
             * 
             * This event is dispatched when a Video was attempted to be played, but the browser prevented it
             * from doing so due to the Media Engagement Interaction policy.
             * 
             * If you get this event you will need to wait for the user to interact with the browser before
             * the video will play. This is a browser security measure to prevent autoplaying videos with
             * audio. An interaction includes a mouse click, a touch, or a key press.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('locked', listener)`.
             */
            const VIDEO_LOCKED: string;

            /**
             * The Video Game Object Loop Event.
             * 
             * This event is dispatched when a Video that is currently playing has looped. This only
             * happens if the `loop` parameter was specified, or the `setLoop` method was called,
             * and if the video has a fixed duration. Video streams, for example, cannot loop, as
             * they have no duration.
             * 
             * Looping is based on the result of the Video `timeupdate` event. This event is not
             * frame-accurate, due to the way browsers work, so please do not rely on this loop
             * event to be time or frame precise.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.
             */
            const VIDEO_LOOP: string;

            /**
             * The Video Game Object Metadata Event.
             * 
             * This event is dispatched when a Video has access to the metadata.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('metadata', listener)`.
             */
            const VIDEO_METADATA: string;

            /**
             * The Video Game Object Playing Event.
             * 
             * The playing event is fired after playback is first started,
             * and whenever it is restarted. For example it is fired when playback
             * resumes after having been paused or delayed due to lack of data.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('playing', listener)`.
             */
            const VIDEO_PLAYING: string;

            /**
             * The Video Game Object Play Event.
             * 
             * This event is dispatched when a Video begins playback. For videos that do not require
             * interaction unlocking, this is usually as soon as the `Video.play` method is called.
             * However, for videos that require unlocking, it is fired once playback begins after
             * they've been unlocked.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.
             */
            const VIDEO_PLAY: string;

            /**
             * The Video Game Object Seeked Event.
             * 
             * This event is dispatched when a Video completes seeking to a new point in its timeline.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.
             */
            const VIDEO_SEEKED: string;

            /**
             * The Video Game Object Seeking Event.
             * 
             * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.
             * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.
             */
            const VIDEO_SEEKING: string;

            /**
             * The Video Game Object Stalled Event.
             * 
             * This event is dispatched by a Video Game Object when the video playback stalls.
             * 
             * This can happen if the video is buffering.
             * 
             * If will fire for any of the following native DOM events:
             * 
             * `stalled`
             * `suspend`
             * `waiting`
             * 
             * Listen for it from a Video Game Object instance using `Video.on('stalled', listener)`.
             * 
             * Note that being stalled isn't always a negative thing. A video can be stalled if it
             * has downloaded enough data in to its buffer to not need to download any more until
             * the current batch of frames have rendered.
             */
            const VIDEO_STALLED: string;

            /**
             * The Video Game Object Stopped Event.
             * 
             * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,
             * either directly via game code, or indirectly as the result of changing a video source or destroying it.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.
             */
            const VIDEO_STOP: string;

            /**
             * The Video Game Object Texture Ready Event.
             * 
             * This event is dispatched by a Video Game Object when it has finished creating its texture.
             * 
             * This happens when the video has finished loading enough data for its first frame.
             * 
             * If you wish to use the Video texture elsewhere in your game, such as as a Sprite texture,
             * then you should listen for this event first, before creating the Sprites that use it.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('textureready', listener)`.
             */
            const VIDEO_TEXTURE: string;

            /**
             * The Video Game Object Unlocked Event.
             * 
             * This event is dispatched when a Video that was prevented from playback due to the browsers
             * Media Engagement Interaction policy, is unlocked by a user gesture.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.
             */
            const VIDEO_UNLOCKED: string;

            /**
             * The Video Game Object Unsupported Event.
             * 
             * This event is dispatched by a Video Game Object if the media source
             * (which may be specified as a MediaStream, MediaSource, Blob, or File,
             * for example) doesn't represent a supported media format.
             * 
             * Listen for it from a Video Game Object instance using `Video.on('unsupported', listener)`.
             */
            const VIDEO_UNSUPPORTED: string;

        }

        /**
         * An Extern Game Object is a special type of Game Object that allows you to pass
         * rendering off to a 3rd party.
         * 
         * When you create an Extern and place it in the display list of a Scene, the renderer will
         * process the list as usual. When it finds an Extern it will flush the current batch
         * and prepare a transform matrix which your render function can
         * take advantage of, if required.
         * 
         * The WebGL context is then left in a 'clean' state, ready for you to bind your own shaders,
         * or draw to it, whatever you wish to do. This should all take place in the `render` method.
         * The correct way to deploy an Extern object is to create a class that extends it, then
         * override the `render` (and optionally `preUpdate`) methods and pass off control to your
         * 3rd party libraries or custom WebGL code there.
         * 
         * The `render` method is called with this signature:
         * `render(renderer: Phaser.Renderer.WebGL.WebGLRenderer, drawingContext: Phaser.Renderer.WebGL.DrawingContext, calcMatrix: Phaser.GameObjects.Components.TransformMatrix, displayList: Phaser.GameObjects.GameObject[], displayListIndex: number): void`.
         * 
         * The `displayList` and `displayListIndex` parameters allow you to check
         * other objects in the display list. This might be convenient for optimizing
         * operations such as resource management.
         * 
         * Once you've finished, you should free-up any of your resources.
         * The Extern will then return Phaser state and carry on rendering the display list.
         * 
         * Although this object has lots of properties such as Alpha, Blend Mode and Tint, none of
         * them are used during rendering unless you take advantage of them in your own render code.
         */
        class Extern extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             */
            constructor(scene: Phaser.Scene);

            /**
             * Called when this Extern is added to a Scene.
             * 
             * Registers the Extern with the Scene's Update List so that `preUpdate` is called each frame.
             */
            addedToScene(): void;

            /**
             * Called when this Extern is removed from a Scene.
             * 
             * Removes the Extern from the Scene's Update List so that `preUpdate` is no longer called.
             */
            removedFromScene(): void;

            /**
             * Called automatically by the Scene Update List each frame.
             * 
             * Override this method in your own class to add custom logic that
             * should run every frame, such as updating animations or physics.
             * @param time The current timestamp, as generated by the Request Animation Frame or SetTimeout.
             * @param delta The delta time, in ms, elapsed since the last frame.
             */
            preUpdate(time: number, delta: number): void;

            /**
             * Override this method in your own class to provide custom rendering logic.
             * 
             * When the renderer encounters this Extern in the display list, it will flush the
             * current batch, prepare a transform matrix, and leave the WebGL context in a clean
             * state for you to bind your own shaders or draw calls.
             * @param renderer The WebGL Renderer instance.
             * @param drawingContext The current Drawing Context.
             * @param calcMatrix The calculated Transform Matrix for this Extern.
             * @param displayList The current display list for the Scene.
             * @param displayListIndex The index of this Extern within the display list.
             */
            render(renderer: Phaser.Renderer.WebGL.WebGLRenderer, drawingContext: Phaser.Renderer.WebGL.DrawingContext, calcMatrix: Phaser.GameObjects.Components.TransformMatrix, displayList: Phaser.GameObjects.GameObject[], displayListIndex: number): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the size of this Game Object to be that of the given Frame.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param frame The frame to base the size of this Game Object on.
             * @returns This Game Object instance.
             */
            setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display (rendered) size of this Game Object in pixels.
             * 
             * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
             * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
             * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
             * the scale manually, but more convenient when you want to work in pixel values directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * 
             * Calling this method will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.
             * @param frame The name or index of the frame within the Texture.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call change the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setTexture(key: string | Phaser.Textures.Texture, frame?: string | number, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Gradient Game Object.
         * 
         * This Game Object is a quad which displays a gradient.
         * You can manipulate this object like any other, make it interactive,
         * and use it in filters and masks to create visually stunning effects.
         * 
         * Behind the scenes, a Gradient is a {@link Phaser.GameObjects.Shader} using a specific shader program.
         * 
         * The gradient color is determined by a {@link Phaser.Display.ColorRamp},
         * containing one or more {@link Phaser.Display.ColorBand} objects.
         * The ramp is laid out along the `shape` of the gradient,
         * originating from the `start` location.
         * The `shapeMode` describes how the gradient fills elsewhere,
         * e.g. a LINEAR gradient creates straight bands
         * while a RADIAL gradient creates circles.
         * 
         * Note that the shape of the gradient is fitted to a square.
         * If its width and height are not equal, the shape will be distorted.
         * This may be what you want.
         * 
         * A Gradient can be animated by modifying its `offset` property,
         * or by modifying the ramp data. If you modify ramp data,
         * you may have to call `gradient.ramp.encode()` to rebuild it.
         */
        class Gradient extends Phaser.GameObjects.Shader {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param config The configuration for this Game Object.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             */
            constructor(scene: Phaser.Scene, config?: Phaser.Types.GameObjects.Gradient.GradientQuadConfig, x?: number, y?: number, width?: number, height?: number);

            /**
             * The ramp which contains the color data for the gradient.
             * 
             * By default, this is a linear progression from black to white.
             * You can encode much more complex gradients with the ColorRamp.
             */
            ramp: Phaser.Display.ColorRamp;

            /**
             * Move the start of the gradient.
             * You can animate gradients in this way.
             * 
             * Note that the offset effect changes based on shape and repeat mode.
             * Conic gradients may appear weird!
             * 
             * Animate the offset from -1 to 1 using mode 1 (TRUNCATE)
             * to create a one-time shockwave.
             * 
             * Use mode 2 (SAWTOOTH) or 3 (TRIANGULAR) to create a moving pattern.
             */
            offset: number;

            /**
             * The repeat mode of the gradient.
             * Gradient progress is evaluated as a number,
             * where 0 is the start of the `shape` vector and 1 is the end.
             * Repeat mode tells us how to handle that number below 0/above 1.
             * 
             * This can be one of the following:
             * 
             * - 0 (EXTEND): values are clamped between 0 and 1,
             *   so the ends of the gradient become flat color.
             * - 1 (TRUNCATE): values are discarded outside 0-1,
             *   so the ends of the gradient become transparent.
             * - 2 (SAWTOOTH): values are modulo 1,
             *   so the gradient repeats.
             * - 3 (TRIANGULAR): values rise to 1 then fall to 0,
             *   so the gradient goes smoothly back and forth.
             * 
             * Note that conic gradients never leave the range 0-1
             * unless offset is applied. They may look weird if you do.
             */
            repeatMode: number;

            /**
             * The shape mode of the gradient.
             * Shapes are based on the `shape` vector.
             * 
             * This can be one of the following:
             * 
             * - 0 (LINEAR): a ribbon where the shape points from one side to the other.
             *   Commonly used for skies etc.
             * - 1 (BILINEAR): like LINEAR, but reflected in both directions.
             *   Useful for gentle waves, reflections etc.
             * - 2 (RADIAL): gradient spreads out from the `start`,
             *   to the radius described by `shape`.
             *   Useful for glows, ripples etc.
             * - 3 (CONIC_SYMMETRIC): gradient is determined by angle to `shape`,
             *   going from 0 along the shape vector to 1 opposite it.
             *   Useful for sharp-looking features or light effects.
             * - 4 (CONIC_ASYMMETRIC): gradient is determined by angle to `shape`,
             *   going from 0 to 1 with a full rotation. This creates a seam.
             *   Good for creating colors that change with angle,
             *   like speed meters.
             */
            shapeMode: number;

            /**
             * The start location of the gradient within its quad.
             * The gradient emanates from this point.
             * Gradient color starts here and ends at the tip of the `shape` vector.
             */
            start: Phaser.Types.Math.Vector2Like;

            /**
             * The shape vector of the gradient within its quad.
             * This points from the start in the direction that the gradient flows.
             * Gradient color starts from the `start` vector and ends at the tip of this.
             */
            shape: Phaser.Types.Math.Vector2Like;

            /**
             * Whether to dither the gradient.
             * This helps to eliminate banding by adding a tiny amount of noise
             * to the gradient.
             * Dither may lose effectiveness if resized, so you should only enable
             * it when it will make a difference.
             */
            dither: boolean;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Graphics object is a way to draw primitive shapes to your game. Primitives include forms of geometry, such as
         * Rectangles, Circles, and Polygons. They also include lines, arcs and curves. When you initially create a Graphics
         * object it will be empty.
         * 
         * To draw to it you must first specify a line style or fill style (or both), draw shapes using paths, and finally
         * fill or stroke them. For example:
         * 
         * ```javascript
         * graphics.lineStyle(5, 0xFF00FF, 1.0);
         * graphics.beginPath();
         * graphics.moveTo(100, 100);
         * graphics.lineTo(200, 200);
         * graphics.closePath();
         * graphics.strokePath();
         * ```
         * 
         * There are also many helpful methods that draw and fill/stroke common shapes for you.
         * 
         * ```javascript
         * graphics.lineStyle(5, 0xFF00FF, 1.0);
         * graphics.fillStyle(0xFFFFFF, 1.0);
         * graphics.fillRect(50, 50, 400, 200);
         * graphics.strokeRect(50, 50, 400, 200);
         * ```
         * 
         * When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL.
         * Under Canvas it will use the HTML Canvas context drawing operations to draw the path.
         * Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with
         * complex shapes.
         * 
         * If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help
         * performance by calling {@link Phaser.GameObjects.Graphics#generateTexture}. This will 'bake' the Graphics object into
         * a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object
         * updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume
         * memory.
         * 
         * Under WebGL, Graphics uses its own shader which will batch drawing operations.
         * Try to keep Graphics objects grouped together so they can be batched together.
         * Avoid mixing object types where possible, as each batch will be flushed,
         * costing performance.
         * 
         * As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful
         * in their complexity and quantity of them in your game.
         */
        class Graphics extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor {
            /**
             * 
             * @param scene The Scene to which this Graphics object belongs.
             * @param options Options that set the position and default style of this Graphics object.
             */
            constructor(scene: Phaser.Scene, options?: Phaser.Types.GameObjects.Graphics.Options);

            /**
             * The horizontal display origin of the Graphics.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of the Graphics.
             */
            displayOriginY: number;

            /**
             * The array of commands used to render the Graphics.
             */
            commandBuffer: any[];

            /**
             * The default fill color for shapes rendered by this Graphics object.
             * Set this value with `setDefaultStyles()`.
             */
            readonly defaultFillColor: number;

            /**
             * The default fill alpha for shapes rendered by this Graphics object.
             * Set this value with `setDefaultStyles()`.
             */
            readonly defaultFillAlpha: number;

            /**
             * The default stroke width for shapes rendered by this Graphics object.
             * Set this value with `setDefaultStyles()`.
             */
            readonly defaultStrokeWidth: number;

            /**
             * The default stroke color for shapes rendered by this Graphics object.
             * Set this value with `setDefaultStyles()`.
             */
            readonly defaultStrokeColor: number;

            /**
             * The default stroke alpha for shapes rendered by this Graphics object.
             * Set this value with `setDefaultStyles()`.
             */
            readonly defaultStrokeAlpha: number;

            /**
             * Path detail threshold for the WebGL renderer, in pixels.
             * Path segments will be combined until the path is complete
             * or the segment length is above the threshold.
             * 
             * If the value is negative, the threshold will be taken from the
             * game config `render.pathDetailThreshold` property.
             * 
             * This threshold can greatly improve performance on complex shapes.
             * It is calculated at render time and does not affect the original
             * path data.
             * The threshold is evaluated in screen pixels, so if the object is
             * scaled up, fine detail will emerge.
             */
            pathDetailThreshold: number;

            /**
             * Set the default style settings for this Graphics object.
             * @param options The styles to set as defaults.
             * @returns This Game Object.
             */
            setDefaultStyles(options: Phaser.Types.GameObjects.Graphics.Styles): this;

            /**
             * Set the current line style. Used for all 'stroke' related functions.
             * @param lineWidth The stroke width.
             * @param color The stroke color.
             * @param alpha The stroke alpha. Default 1.
             * @returns This Game Object.
             */
            lineStyle(lineWidth: number, color: number, alpha?: number): this;

            /**
             * Set the current fill style. Used for all 'fill' related functions.
             * @param color The fill color.
             * @param alpha The fill alpha. Default 1.
             * @returns This Game Object.
             */
            fillStyle(color: number, alpha?: number): this;

            /**
             * Sets a gradient fill style. This is a WebGL only feature.
             * 
             * The gradient color values represent the 4 corners of an untransformed rectangle.
             * The gradient is used to color all filled shapes and paths drawn after calling this method.
             * If you wish to turn a gradient off, call `fillStyle` and provide a new single fill color.
             * 
             * When filling a triangle only the first 3 color values provided are used for the 3 points of a triangle.
             * 
             * This feature is best used only on rectangles and triangles. All other shapes will give strange results.
             * 
             * Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used
             * will be filled with a gradient on its own. There is no ability to gradient fill a shape or path as a single
             * entity at this time.
             * @param topLeft The top left fill color.
             * @param topRight The top right fill color.
             * @param bottomLeft The bottom left fill color.
             * @param bottomRight The bottom right fill color. Not used when filling triangles.
             * @param alphaTopLeft The top left alpha value. If you give only this value, it's used for all corners. Default 1.
             * @param alphaTopRight The top right alpha value. Default 1.
             * @param alphaBottomLeft The bottom left alpha value. Default 1.
             * @param alphaBottomRight The bottom right alpha value. Default 1.
             * @returns This Game Object.
             */
            fillGradientStyle(topLeft: number, topRight: number, bottomLeft: number, bottomRight: number, alphaTopLeft?: number, alphaTopRight?: number, alphaBottomLeft?: number, alphaBottomRight?: number): this;

            /**
             * Sets a gradient line style. This is a WebGL only feature.
             * 
             * The gradient color values represent the 4 corners of an untransformed rectangle.
             * The gradient is used to color all stroked shapes and paths drawn after calling this method.
             * If you wish to turn a gradient off, call `lineStyle` and provide a new single line color.
             * 
             * This feature is best used only on single lines. All other shapes will give strange results.
             * 
             * Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used
             * will be filled with a gradient on its own. There is no ability to gradient stroke a shape or path as a single
             * entity at this time.
             * @param lineWidth The stroke width.
             * @param topLeft The stroke color for the top-left of the gradient.
             * @param topRight The stroke color for the top-right of the gradient.
             * @param bottomLeft The stroke color for the bottom-left of the gradient.
             * @param bottomRight The stroke color for the bottom-right of the gradient.
             * @param alpha The fill alpha. Default 1.
             * @returns This Game Object.
             */
            lineGradientStyle(lineWidth: number, topLeft: number, topRight: number, bottomLeft: number, bottomRight: number, alpha?: number): this;

            /**
             * Start a new shape path.undefined
             * @returns This Game Object.
             */
            beginPath(): this;

            /**
             * Close the current path.undefined
             * @returns This Game Object.
             */
            closePath(): this;

            /**
             * Fill the current path.undefined
             * @returns This Game Object.
             */
            fillPath(): this;

            /**
             * Fill the current path.
             * 
             * This is an alias for `Graphics.fillPath` and does the same thing.
             * It was added to match the CanvasRenderingContext 2D API.undefined
             * @returns This Game Object.
             */
            fill(): this;

            /**
             * Stroke the current path.undefined
             * @returns This Game Object.
             */
            strokePath(): this;

            /**
             * Stroke the current path.
             * 
             * This is an alias for `Graphics.strokePath` and does the same thing.
             * It was added to match the CanvasRenderingContext 2D API.undefined
             * @returns This Game Object.
             */
            stroke(): this;

            /**
             * Fill the given circle.
             * @param circle The circle to fill.
             * @returns This Game Object.
             */
            fillCircleShape(circle: Phaser.Geom.Circle): this;

            /**
             * Stroke the given circle.
             * @param circle The circle to stroke.
             * @returns This Game Object.
             */
            strokeCircleShape(circle: Phaser.Geom.Circle): this;

            /**
             * Fill a circle with the given position and radius.
             * @param x The x coordinate of the center of the circle.
             * @param y The y coordinate of the center of the circle.
             * @param radius The radius of the circle.
             * @returns This Game Object.
             */
            fillCircle(x: number, y: number, radius: number): this;

            /**
             * Stroke a circle with the given position and radius.
             * @param x The x coordinate of the center of the circle.
             * @param y The y coordinate of the center of the circle.
             * @param radius The radius of the circle.
             * @returns This Game Object.
             */
            strokeCircle(x: number, y: number, radius: number): this;

            /**
             * Fill the given rectangle.
             * @param rect The rectangle to fill.
             * @returns This Game Object.
             */
            fillRectShape(rect: Phaser.Geom.Rectangle): this;

            /**
             * Stroke the given rectangle.
             * @param rect The rectangle to stroke.
             * @returns This Game Object.
             */
            strokeRectShape(rect: Phaser.Geom.Rectangle): this;

            /**
             * Fill a rectangle with the given position and size.
             * @param x The x coordinate of the top-left of the rectangle.
             * @param y The y coordinate of the top-left of the rectangle.
             * @param width The width of the rectangle.
             * @param height The height of the rectangle.
             * @returns This Game Object.
             */
            fillRect(x: number, y: number, width: number, height: number): this;

            /**
             * Stroke a rectangle with the given position and size.
             * @param x The x coordinate of the top-left of the rectangle.
             * @param y The y coordinate of the top-left of the rectangle.
             * @param width The width of the rectangle.
             * @param height The height of the rectangle.
             * @returns This Game Object.
             */
            strokeRect(x: number, y: number, width: number, height: number): this;

            /**
             * Fill a rounded rectangle with the given position, size and radius.
             * @param x The x coordinate of the top-left of the rectangle.
             * @param y The y coordinate of the top-left of the rectangle.
             * @param width The width of the rectangle.
             * @param height The height of the rectangle.
             * @param radius The corner radius; It can also be an object to specify different radius for corners. Default 20.
             * @returns This Game Object.
             */
            fillRoundedRect(x: number, y: number, width: number, height: number, radius?: Phaser.Types.GameObjects.Graphics.RoundedRectRadius | number): this;

            /**
             * Stroke a rounded rectangle with the given position, size and radius.
             * @param x The x coordinate of the top-left of the rectangle.
             * @param y The y coordinate of the top-left of the rectangle.
             * @param width The width of the rectangle.
             * @param height The height of the rectangle.
             * @param radius The corner radius; It can also be an object to specify different radii for corners. Default 20.
             * @returns This Game Object.
             */
            strokeRoundedRect(x: number, y: number, width: number, height: number, radius?: Phaser.Types.GameObjects.Graphics.RoundedRectRadius | number): this;

            /**
             * Fill the given point.
             * 
             * Draws a square at the given position, 1 pixel in size by default.
             * @param point The point to fill.
             * @param size The size of the square to draw. Default 1.
             * @returns This Game Object.
             */
            fillPointShape(point: Phaser.Math.Vector2, size?: number): this;

            /**
             * Fill a point at the given position.
             * 
             * Draws a square at the given position, 1 pixel in size by default.
             * @param x The x coordinate of the point.
             * @param y The y coordinate of the point.
             * @param size The size of the square to draw. Default 1.
             * @returns This Game Object.
             */
            fillPoint(x: number, y: number, size?: number): this;

            /**
             * Fill the given triangle.
             * @param triangle The triangle to fill.
             * @returns This Game Object.
             */
            fillTriangleShape(triangle: Phaser.Geom.Triangle): this;

            /**
             * Stroke the given triangle.
             * @param triangle The triangle to stroke.
             * @returns This Game Object.
             */
            strokeTriangleShape(triangle: Phaser.Geom.Triangle): this;

            /**
             * Fill a triangle with the given points.
             * @param x0 The x coordinate of the first point.
             * @param y0 The y coordinate of the first point.
             * @param x1 The x coordinate of the second point.
             * @param y1 The y coordinate of the second point.
             * @param x2 The x coordinate of the third point.
             * @param y2 The y coordinate of the third point.
             * @returns This Game Object.
             */
            fillTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number): this;

            /**
             * Stroke a triangle with the given points.
             * @param x0 The x coordinate of the first point.
             * @param y0 The y coordinate of the first point.
             * @param x1 The x coordinate of the second point.
             * @param y1 The y coordinate of the second point.
             * @param x2 The x coordinate of the third point.
             * @param y2 The y coordinate of the third point.
             * @returns This Game Object.
             */
            strokeTriangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number): this;

            /**
             * Draw the given line.
             * @param line The line to stroke.
             * @returns This Game Object.
             */
            strokeLineShape(line: Phaser.Geom.Line): this;

            /**
             * Draw a line between the given points.
             * @param x1 The x coordinate of the start point of the line.
             * @param y1 The y coordinate of the start point of the line.
             * @param x2 The x coordinate of the end point of the line.
             * @param y2 The y coordinate of the end point of the line.
             * @returns This Game Object.
             */
            lineBetween(x1: number, y1: number, x2: number, y2: number): this;

            /**
             * Draw a line from the current drawing position to the given position.
             * 
             * Moves the current drawing position to the given position.
             * @param x The x coordinate to draw the line to.
             * @param y The y coordinate to draw the line to.
             * @returns This Game Object.
             */
            lineTo(x: number, y: number): this;

            /**
             * Move the current drawing position to the given position.
             * @param x The x coordinate to move to.
             * @param y The y coordinate to move to.
             * @returns This Game Object.
             */
            moveTo(x: number, y: number): this;

            /**
             * Stroke the shape represented by the given array of points.
             * 
             * Pass `closeShape` to automatically close the shape by joining the last to the first point.
             * 
             * Pass `closePath` to automatically close the path before it is stroked.
             * @param points The points to stroke.
             * @param closeShape When `true`, the shape is closed by joining the last point to the first point. Default false.
             * @param closePath When `true`, the path is closed before being stroked. Default false.
             * @param endIndex The index of `points` to stop drawing at. Defaults to `points.length`.
             * @returns This Game Object.
             */
            strokePoints(points: Phaser.Math.Vector2[], closeShape?: boolean, closePath?: boolean, endIndex?: number): this;

            /**
             * Fill the shape represented by the given array of points.
             * 
             * Pass `closeShape` to automatically close the shape by joining the last to the first point.
             * 
             * Pass `closePath` to automatically close the path before it is filled.
             * @param points The points to fill.
             * @param closeShape When `true`, the shape is closed by joining the last point to the first point. Default false.
             * @param closePath When `true`, the path is closed before being filled. Default false.
             * @param endIndex The index of `points` to stop at. Defaults to `points.length`.
             * @returns This Game Object.
             */
            fillPoints(points: Phaser.Math.Vector2[], closeShape?: boolean, closePath?: boolean, endIndex?: number): this;

            /**
             * Stroke the given ellipse.
             * @param ellipse The ellipse to stroke.
             * @param smoothness The number of points to draw the ellipse with. Default 32.
             * @returns This Game Object.
             */
            strokeEllipseShape(ellipse: Phaser.Geom.Ellipse, smoothness?: number): this;

            /**
             * Stroke an ellipse with the given position and size.
             * @param x The x coordinate of the center of the ellipse.
             * @param y The y coordinate of the center of the ellipse.
             * @param width The width of the ellipse.
             * @param height The height of the ellipse.
             * @param smoothness The number of points to draw the ellipse with. Default 32.
             * @returns This Game Object.
             */
            strokeEllipse(x: number, y: number, width: number, height: number, smoothness?: number): this;

            /**
             * Fill the given ellipse.
             * @param ellipse The ellipse to fill.
             * @param smoothness The number of points to draw the ellipse with. Default 32.
             * @returns This Game Object.
             */
            fillEllipseShape(ellipse: Phaser.Geom.Ellipse, smoothness?: number): this;

            /**
             * Fill an ellipse with the given position and size.
             * @param x The x coordinate of the center of the ellipse.
             * @param y The y coordinate of the center of the ellipse.
             * @param width The width of the ellipse.
             * @param height The height of the ellipse.
             * @param smoothness The number of points to draw the ellipse with. Default 32.
             * @returns This Game Object.
             */
            fillEllipse(x: number, y: number, width: number, height: number, smoothness?: number): this;

            /**
             * Draw an arc.
             * 
             * This method can be used to create circles, or parts of circles.
             * 
             * Make sure you call `beginPath` before starting the arc unless you wish for the arc to automatically
             * close when filled or stroked.
             * 
             * Use the optional `overshoot` argument increase the number of iterations that take place when
             * the arc is rendered in WebGL. This is useful if you're drawing an arc with an especially thick line,
             * as it will allow the arc to fully join-up. Try small values at first, i.e. 0.01.
             * 
             * Call {@link Phaser.GameObjects.Graphics#fillPath} or {@link Phaser.GameObjects.Graphics#strokePath} after calling
             * this method to draw the arc.
             * @param x The x coordinate of the center of the circle.
             * @param y The y coordinate of the center of the circle.
             * @param radius The radius of the circle.
             * @param startAngle The starting angle, in radians.
             * @param endAngle The ending angle, in radians.
             * @param anticlockwise Whether the drawing should be anticlockwise or clockwise. Default false.
             * @param overshoot This value allows you to increase the segment iterations in WebGL rendering. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Use small numbers such as 0.01 to start with and increase as needed. Default 0.
             * @returns This Game Object.
             */
            arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean, overshoot?: number): this;

            /**
             * Creates a pie-chart slice shape centered at `x`, `y` with the given radius.
             * You must define the start and end angle of the slice.
             * 
             * Setting the `anticlockwise` argument to `true` creates a shape similar to Pacman.
             * Setting it to `false` creates a shape like a slice of pie.
             * 
             * This method will begin a new path and close the path at the end of it.
             * To display the actual slice you need to call either `strokePath` or `fillPath` after it.
             * @param x The horizontal center of the slice.
             * @param y The vertical center of the slice.
             * @param radius The radius of the slice.
             * @param startAngle The start angle of the slice, given in radians.
             * @param endAngle The end angle of the slice, given in radians.
             * @param anticlockwise Whether the drawing should be anticlockwise or clockwise. Default false.
             * @param overshoot This value allows you to overshoot the endAngle by this amount. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Default 0.
             * @returns This Game Object.
             */
            slice(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean, overshoot?: number): this;

            /**
             * Saves the state of the Graphics by pushing the current state onto a stack.
             * 
             * The most recently saved state can then be restored with {@link Phaser.GameObjects.Graphics#restore}.undefined
             * @returns This Game Object.
             */
            save(): this;

            /**
             * Restores the most recently saved state of the Graphics by popping from the state stack.
             * 
             * Use {@link Phaser.GameObjects.Graphics#save} to save the current state, and call this afterwards to restore that state.
             * 
             * If there is no saved state, this command does nothing.undefined
             * @returns This Game Object.
             */
            restore(): this;

            /**
             * Inserts a translation command into this Graphics objects command buffer.
             * 
             * All objects drawn _after_ calling this method will be translated
             * by the given amount.
             * 
             * This does not change the position of the Graphics object itself,
             * only of the objects drawn by it after calling this method.
             * @param x The horizontal translation to apply.
             * @param y The vertical translation to apply.
             * @returns This Game Object.
             */
            translateCanvas(x: number, y: number): this;

            /**
             * Inserts a scale command into this Graphics objects command buffer.
             * 
             * All objects drawn _after_ calling this method will be scaled
             * by the given amount.
             * 
             * This does not change the scale of the Graphics object itself,
             * only of the objects drawn by it after calling this method.
             * @param x The horizontal scale to apply.
             * @param y The vertical scale to apply.
             * @returns This Game Object.
             */
            scaleCanvas(x: number, y: number): this;

            /**
             * Inserts a rotation command into this Graphics objects command buffer.
             * 
             * All objects drawn _after_ calling this method will be rotated
             * by the given amount.
             * 
             * This does not change the rotation of the Graphics object itself,
             * only of the objects drawn by it after calling this method.
             * @param radians The rotation angle, in radians.
             * @returns This Game Object.
             */
            rotateCanvas(radians: number): this;

            /**
             * Clear the command buffer and reset the fill style and line style to their defaults.undefined
             * @returns This Game Object.
             */
            clear(): this;

            /**
             * Generate a texture from this Graphics object.
             * 
             * If `key` is a string it'll generate a new texture using it and add it into the
             * Texture Manager (assuming no key conflict happens).
             * 
             * If `key` is a Canvas it will draw the Graphics to that canvas context. Note that it will NOT
             * automatically upload it to the GPU in WebGL mode.
             * 
             * Please understand that the texture is created via the Canvas API of the browser, therefore some
             * Graphics features, such as `fillGradientStyle`, will not appear on the resulting texture,
             * as they're unsupported by the Canvas API.
             * @param key The key to store the texture with in the Texture Manager, or a Canvas to draw to.
             * @param width The width of the graphics to generate.
             * @param height The height of the graphics to generate.
             * @returns This Game Object.
             */
            generateTexture(key: string | HTMLCanvasElement, width?: number, height?: number): this;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * A Camera used specifically by the Graphics system for rendering to textures.
             */
            static TargetCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

        }

        /**
         * A Group is a way for you to create, manipulate, or recycle similar Game Objects.
         * 
         * Groups are commonly used to implement object pools, where a fixed set of Game Objects
         * are created up front and then recycled by toggling their `active` and `visible` states,
         * avoiding the overhead of repeated construction and garbage collection. This pattern is
         * especially useful for frequently spawned objects such as bullets, particles, or enemies.
         * 
         * Group membership is non-exclusive. A Game Object can belong to several groups, one group, or none.
         * 
         * Groups themselves aren't displayable, and can't be positioned, rotated, scaled, or hidden.
         */
        class Group extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param scene The scene this group belongs to.
             * @param children Game Objects to add to this group; or the `config` argument.
             * @param config Settings for this group. If `key` is set, Phaser.GameObjects.Group#createMultiple is also called with these settings.
             */
            constructor(scene: Phaser.Scene, children?: Phaser.GameObjects.GameObject[] | Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig, config?: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig);

            /**
             * This scene this group belongs to.
             */
            scene: Phaser.Scene;

            /**
             * Members of this group.
             */
            children: Set<Phaser.GameObjects.GameObject>;

            /**
             * A flag identifying this object as a group.
             */
            isParent: boolean;

            /**
             * A textual representation of this Game Object.
             * Used internally by Phaser but is available for your own custom classes to populate.
             */
            type: string;

            /**
             * The class to create new group members from.
             * 
             * The constructor arguments must match `(scene, x, y, texture, frame)`.
             */
            classType: Function;

            /**
             * The name of this group.
             * Empty by default and never populated by Phaser, this is left for developers to use.
             */
            name: string;

            /**
             * Whether this group runs its {@link Phaser.GameObjects.Group#preUpdate} method (which may update any members).
             */
            active: boolean;

            /**
             * The maximum size of this group, if used as a pool. -1 is no limit.
             */
            maxSize: number;

            /**
             * A default texture key to use when creating new group members.
             * 
             * This is used in {@link Phaser.GameObjects.Group#create}
             * but not in {@link Phaser.GameObjects.Group#createMultiple}.
             */
            defaultKey: string;

            /**
             * A default texture frame to use when creating new group members.
             */
            defaultFrame: string | number;

            /**
             * Whether to call the update method of any members.
             */
            runChildUpdate: boolean;

            /**
             * A function to be called when adding or creating group members.
             */
            createCallback: Phaser.Types.GameObjects.Group.GroupCallback | null;

            /**
             * A function to be called when removing group members.
             */
            removeCallback: Phaser.Types.GameObjects.Group.GroupCallback | null;

            /**
             * A function to be called when creating several group members at once.
             */
            createMultipleCallback: Phaser.Types.GameObjects.Group.GroupMultipleCreateCallback | null;

            /**
             * Called when this Group is added to a Scene. Registers this Group with the Scene's update list
             * so that its `preUpdate` method is called each game step.
             */
            addedToScene(): void;

            /**
             * Called when this Group is removed from a Scene. Unregisters this Group from the Scene's
             * update list so that its `preUpdate` method is no longer called each game step.
             */
            removedFromScene(): void;

            /**
             * Creates a new Game Object and adds it to this group, unless the group {@link Phaser.GameObjects.Group#isFull is full}.
             * 
             * Calls {@link Phaser.GameObjects.Group#createCallback}.
             * @param x The horizontal position of the new Game Object in the world. Default 0.
             * @param y The vertical position of the new Game Object in the world. Default 0.
             * @param key The texture key of the new Game Object. Default defaultKey.
             * @param frame The texture frame of the new Game Object. Default defaultFrame.
             * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of the new Game Object. Default true.
             * @param active The {@link Phaser.GameObjects.GameObject#active} state of the new Game Object. Default true.
             * @returns The new Game Object (usually a Sprite, etc.).
             */
            create(x?: number, y?: number, key?: string, frame?: string | number, visible?: boolean, active?: boolean): any;

            /**
             * Creates several Game Objects and adds them to this group.
             * 
             * If the group becomes {@link Phaser.GameObjects.Group#isFull}, no further Game Objects are created.
             * 
             * Calls {@link Phaser.GameObjects.Group#createMultipleCallback} and {@link Phaser.GameObjects.Group#createCallback}.
             * @param config Creation settings. This can be a single configuration object or an array of such objects, which will be applied in turn.
             * @returns The newly created Game Objects.
             */
            createMultiple(config: Phaser.Types.GameObjects.Group.GroupCreateConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig[]): any[];

            /**
             * A helper for {@link Phaser.GameObjects.Group#createMultiple}.
             * @param options Creation settings.
             * @returns The newly created Game Objects.
             */
            createFromConfig(options: Phaser.Types.GameObjects.Group.GroupCreateConfig): any[];

            /**
             * Updates any group members, if {@link Phaser.GameObjects.Group#runChildUpdate} is enabled.
             * @param time The current timestamp.
             * @param delta The delta time elapsed since the last frame.
             */
            preUpdate(time: number, delta: number): void;

            /**
             * Adds a Game Object to this group.
             * 
             * Calls {@link Phaser.GameObjects.Group#createCallback}.
             * @param child The Game Object to add.
             * @param addToScene Also add the Game Object to the scene. Default false.
             * @returns This Group object.
             */
            add(child: Phaser.GameObjects.GameObject, addToScene?: boolean): this;

            /**
             * Adds several Game Objects to this group.
             * 
             * Calls {@link Phaser.GameObjects.Group#createCallback}.
             * @param children The Game Objects to add.
             * @param addToScene Also add the Game Objects to the scene. Default false.
             * @returns This group.
             */
            addMultiple(children: Phaser.GameObjects.GameObject[], addToScene?: boolean): this;

            /**
             * Removes a member of this Group and optionally removes it from the Scene and / or destroys it.
             * 
             * Calls {@link Phaser.GameObjects.Group#removeCallback}.
             * @param child The Game Object to remove.
             * @param removeFromScene Optionally remove the Group member from the Scene it belongs to. Default false.
             * @param destroyChild Optionally call destroy on the removed Group member. Default false.
             * @returns This Group object.
             */
            remove(child: Phaser.GameObjects.GameObject, removeFromScene?: boolean, destroyChild?: boolean): this;

            /**
             * Removes all members of this Group and optionally removes them from the Scene and / or destroys them.
             * 
             * Does not call {@link Phaser.GameObjects.Group#removeCallback}.
             * @param removeFromScene Optionally remove each Group member from the Scene. Default false.
             * @param destroyChild Optionally call destroy on the removed Group members. Default false.
             * @returns This group.
             */
            clear(removeFromScene?: boolean, destroyChild?: boolean): this;

            /**
             * Tests if a Game Object is a member of this group.
             * @param child A Game Object.
             * @returns True if the Game Object is a member of this group.
             */
            contains(child: Phaser.GameObjects.GameObject): boolean;

            /**
             * All members of the group.undefined
             * @returns The group members.
             */
            getChildren(): Phaser.GameObjects.GameObject[];

            /**
             * The number of members of the group.undefined
             * @returns The total number of members in this Group.
             */
            getLength(): number;

            /**
             * Returns all children in this Group that match the given criteria based on the `property` and `value` arguments.
             * 
             * For example: `getMatching('visible', true)` would return only children that have their `visible` property set.
             * 
             * Optionally, you can specify a start and end index. For example if the Group has 100 elements,
             * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only
             * the first 50.
             * @param property The property to test on each array element.
             * @param value The value to test the property against. Must pass a strict (`===`) comparison check.
             * @param startIndex An optional start index to search from.
             * @param endIndex An optional end index to search to.
             * @returns An array of matching Group members. The array will be empty if nothing matched.
             */
            getMatching(property?: string, value?: any, startIndex?: number, endIndex?: number): any[];

            /**
             * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
             * assigns `x` and `y`, and returns the member.
             * 
             * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
             * Unless a new member is created, `key`, `frame`, and `visible` are ignored.
             * @param state The {@link Phaser.GameObjects.GameObject#active} value to match. Default false.
             * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false.
             * @param x The horizontal position of the Game Object in the world.
             * @param y The vertical position of the Game Object in the world.
             * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey.
             * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame.
             * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true.
             * @returns The first matching group member, or a newly created member, or null.
             */
            getFirst(state?: boolean, createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | number, visible?: boolean): any | null;

            /**
             * Scans the Group, from top to bottom, for the nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
             * assigns `x` and `y`, and returns the member.
             * 
             * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
             * Unless a new member is created, `key`, `frame`, and `visible` are ignored.
             * @param nth The nth matching Group member to search for.
             * @param state The {@link Phaser.GameObjects.GameObject#active} value to match. Default false.
             * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false.
             * @param x The horizontal position of the Game Object in the world.
             * @param y The vertical position of the Game Object in the world.
             * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey.
             * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame.
             * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true.
             * @returns The nth matching group member, or a newly created member, or null.
             */
            getFirstNth(nth: number, state?: boolean, createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | number, visible?: boolean): any | null;

            /**
             * Scans the Group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
             * assigns `x` and `y`, and returns the member.
             * 
             * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
             * Unless a new member is created, `key`, `frame`, and `visible` are ignored.
             * @param state The {@link Phaser.GameObjects.GameObject#active} value to match. Default false.
             * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false.
             * @param x The horizontal position of the Game Object in the world.
             * @param y The vertical position of the Game Object in the world.
             * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey.
             * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame.
             * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true.
             * @returns The last matching group member, or a newly created member, or null.
             */
            getLast(state?: boolean, createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | number, visible?: boolean): any | null;

            /**
             * Scans the Group for the last nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
             * assigns `x` and `y`, and returns the member.
             * 
             * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
             * Unless a new member is created, `key`, `frame`, and `visible` are ignored.
             * @param nth The nth matching Group member to search for.
             * @param state The {@link Phaser.GameObjects.GameObject#active} value to match. Default false.
             * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false.
             * @param x The horizontal position of the Game Object in the world.
             * @param y The vertical position of the Game Object in the world.
             * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey.
             * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame.
             * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true.
             * @returns The nth matching group member (searching from the end), or a newly created member, or null.
             */
            getLastNth(nth: number, state?: boolean, createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | number, visible?: boolean): any | null;

            /**
             * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`,
             * assigns `x` and `y`, and returns the member.
             * 
             * If no inactive member is found and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
             * The new Game Object will have its active state set to `true`.
             * Unless a new member is created, `key`, `frame`, and `visible` are ignored.
             * @param x The horizontal position of the Game Object in the world.
             * @param y The vertical position of the Game Object in the world.
             * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey.
             * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame.
             * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true.
             * @returns The first inactive group member, or a newly created member, or null.
             */
            get(x?: number, y?: number, key?: string, frame?: string | number, visible?: boolean): any | null;

            /**
             * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `true`,
             * assigns `x` and `y`, and returns the member.
             * 
             * If no active member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.
             * Unless a new member is created, `key`, `frame`, and `visible` are ignored.
             * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false.
             * @param x The horizontal position of the Game Object in the world.
             * @param y The vertical position of the Game Object in the world.
             * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey.
             * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame.
             * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true.
             * @returns The first active group member, or a newly created member, or null.
             */
            getFirstAlive(createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | number, visible?: boolean): any;

            /**
             * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`,
             * assigns `x` and `y`, and returns the member.
             * 
             * If no inactive member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.
             * The new Game Object will have an active state set to `true`.
             * Unless a new member is created, `key`, `frame`, and `visible` are ignored.
             * @param createIfNull Create a new Game Object if no matching members are found, using the following arguments. Default false.
             * @param x The horizontal position of the Game Object in the world.
             * @param y The vertical position of the Game Object in the world.
             * @param key The texture key assigned to a new Game Object (if one is created). Default defaultKey.
             * @param frame A texture frame assigned to a new Game Object (if one is created). Default defaultFrame.
             * @param visible The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). Default true.
             * @returns The first inactive group member, or a newly created member, or null.
             */
            getFirstDead(createIfNull?: boolean, x?: number, y?: number, key?: string, frame?: string | number, visible?: boolean): any;

            /**
             * {@link Phaser.Animations.AnimationState#play Plays} an animation for all members of this group.
             * @param key The string-based key of the animation to play.
             * @param startFrame Optionally start the animation playing from this frame index. Default 0.
             * @returns This Group object.
             */
            playAnimation(key: string, startFrame?: string): this;

            /**
             * Whether this group's size is at its {@link Phaser.GameObjects.Group#maxSize maximum}.undefined
             * @returns True if the number of members equals {@link Phaser.GameObjects.Group#maxSize}.
             */
            isFull(): boolean;

            /**
             * Counts the number of active (or inactive) group members.
             * @param value Count active (true) or inactive (false) group members. Default true.
             * @returns The number of group members with an active state matching the `active` argument.
             */
            countActive(value?: boolean): number;

            /**
             * Counts the number of in-use (active) group members.undefined
             * @returns The number of group members with an active state of true.
             */
            getTotalUsed(): number;

            /**
             * The difference of {@link Phaser.GameObjects.Group#maxSize} and the number of active group members.
             * 
             * This represents the number of group members that could be created or reactivated before reaching the size limit.undefined
             * @returns maxSize minus the number of active group members; or a large number (if maxSize is -1).
             */
            getTotalFree(): number;

            /**
             * Sets the `active` property of this Group.
             * When active, this Group runs its `preUpdate` method.
             * @param value True if this Group should be set as active, false if not.
             * @returns This Group object.
             */
            setActive(value: boolean): this;

            /**
             * Sets the `name` property of this Group.
             * The `name` property is not populated by Phaser and is presented for your own use.
             * @param value The name to be given to this Group.
             * @returns This Group object.
             */
            setName(value: string): this;

            /**
             * Sets the property as defined in `key` of each group member to the given value.
             * @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 This Group object.
             */
            propertyValueSet(key: string, value: number, step?: number, index?: number, direction?: number): this;

            /**
             * Adds the given value to the property as defined in `key` of each group member.
             * @param key The property to be updated.
             * @param value The amount to add 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 This Group object.
             */
            propertyValueInc(key: string, value: number, step?: number, index?: number, direction?: number): this;

            /**
             * Sets the x of each group member.
             * @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.
             * @returns This Group object.
             */
            setX(value: number, step?: number): this;

            /**
             * Sets the y of each group member.
             * @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.
             * @returns This Group object.
             */
            setY(value: number, step?: number): this;

            /**
             * Sets the x, y of each group member.
             * @param x The amount to set the `x` property to.
             * @param y The amount to set the `y` property to. 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.
             * @returns This Group object.
             */
            setXY(x: number, y?: number, stepX?: number, stepY?: number): this;

            /**
             * Adds the given value to the x of each group member.
             * @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.
             * @returns This Group object.
             */
            incX(value: number, step?: number): this;

            /**
             * Adds the given value to the y of each group member.
             * @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.
             * @returns This Group object.
             */
            incY(value: number, step?: number): this;

            /**
             * Adds the given value to the x, y of each group member.
             * @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.
             * @returns This Group object.
             */
            incXY(x: number, y?: number, stepX?: number, stepY?: number): this;

            /**
             * Iterate through the group members changing the position of each element to be that of the element that came before
             * it in the array (or after it if direction = 1)
             * 
             * The first group member position is set to x/y.
             * @param x The x coordinate to place the first item in the array at.
             * @param y The y coordinate to place the first item in the array at.
             * @param direction The iteration direction. 0 = first to last and 1 = last to first. Default 0.
             * @returns This Group object.
             */
            shiftPosition(x: number, y: number, direction?: number): this;

            /**
             * Adds the given value to the angle of each group member.
             * @param value The amount to add to the angle, in degrees.
             * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
             * @returns This Group object.
             */
            angle(value: number, step?: number): this;

            /**
             * Sets the rotation of each group member.
             * @param value The amount to set the rotation to, in radians.
             * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
             * @returns This Group object.
             */
            rotate(value: number, step?: number): this;

            /**
             * Rotates each group member around the given point by the given angle.
             * @param point Any object with public `x` and `y` properties.
             * @param angle The angle to rotate by, in radians.
             * @returns This Group object.
             */
            rotateAround(point: Phaser.Types.Math.Vector2Like, angle: number): this;

            /**
             * Rotates each group member around the given point by the given angle and distance.
             * @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 This Group object.
             */
            rotateAroundDistance(point: Phaser.Types.Math.Vector2Like, angle: number, distance: number): this;

            /**
             * Sets the alpha of each group member.
             * @param value The amount to set the alpha to.
             * @param step This is added to the `value` amount, multiplied by the iteration counter. Default 0.
             * @returns This Group object.
             */
            setAlpha(value: number, step?: number): this;

            /**
             * Sets the tint of each group member.
             * @param topLeft The tint being applied to top-left corner of item. If other parameters are given no value, this tint will be applied to whole item.
             * @param topRight The tint to be applied to top-right corner of item.
             * @param bottomLeft The tint to be applied to the bottom-left corner of item.
             * @param bottomRight The tint to be applied to the bottom-right corner of item.
             * @returns This Group object.
             */
            setTint(topLeft: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the originX, originY of each group member.
             * @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.
             * @returns This Group object.
             */
            setOrigin(originX: number, originY?: number, stepX?: number, stepY?: number): this;

            /**
             * Sets the scaleX of each group member.
             * @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.
             * @returns This Group object.
             */
            scaleX(value: number, step?: number): this;

            /**
             * Sets the scaleY of each group member.
             * @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.
             * @returns This Group object.
             */
            scaleY(value: number, step?: number): this;

            /**
             * Sets the scaleX, scaleY of each group member.
             * @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.
             * @returns This Group object.
             */
            scaleXY(scaleX: number, scaleY?: number, stepX?: number, stepY?: number): this;

            /**
             * Sets the depth of each group member.
             * @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.
             * @returns This Group object.
             */
            setDepth(value: number, step?: number): this;

            /**
             * Sets the blendMode of each group member.
             * @param value The blend mode value to set. See `Phaser.BlendModes` for valid values.
             * @returns This Group object.
             */
            setBlendMode(value: number): this;

            /**
             * Passes all group members to the Input Manager to enable them for input with identical areas and callbacks.
             * @param hitArea Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
             * @param hitAreaCallback A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.
             * @returns This Group object.
             */
            setHitArea(hitArea: any, hitAreaCallback: Phaser.Types.Input.HitAreaCallback): this;

            /**
             * Shuffles the group members in place.undefined
             * @returns This Group object.
             */
            shuffle(): this;

            /**
             * Deactivates a member of this group.
             * @param gameObject A member of this group.
             */
            kill(gameObject: Phaser.GameObjects.GameObject): void;

            /**
             * Deactivates and hides a member of this group.
             * @param gameObject A member of this group.
             */
            killAndHide(gameObject: Phaser.GameObjects.GameObject): void;

            /**
             * Sets the visibility of each group member.
             * @param value The value to set the property to.
             * @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 This Group object.
             */
            setVisible(value: boolean, index?: number, direction?: number): this;

            /**
             * Toggles (flips) the visible state of each member of this group.undefined
             * @returns This Group object.
             */
            toggleVisible(): this;

            /**
             * Empties this Group of all children and removes it from the Scene.
             * 
             * Does not call {@link Phaser.GameObjects.Group#removeCallback}.
             * 
             * Children of this Group will _not_ be removed from the Scene by calling this method
             * unless you specify the `removeFromScene` parameter.
             * 
             * Children of this Group will also _not_ be destroyed by calling this method
             * unless you specify the `destroyChildren` parameter.
             * @param destroyChildren Also {@link Phaser.GameObjects.GameObject#destroy} each Group member. Default false.
             * @param removeFromScene Optionally remove each Group member from the Scene. Default false.
             */
            destroy(destroyChildren?: boolean, removeFromScene?: boolean): void;

        }

        /**
         * An Image Game Object.
         * 
         * An Image is a light-weight Game Object useful for the display of static images in your game,
         * such as logos, backgrounds, scenery or other non-animated elements. Images can have input
         * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an
         * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.
         */
        class Image extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.TextureCrop, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number);

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the size of this Game Object to be that of the given Frame.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param frame The frame to base the size of this Game Object on.
             * @returns This Game Object instance.
             */
            setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display (rendered) size of this Game Object in pixels.
             * 
             * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
             * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
             * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
             * the scale manually, but more convenient when you want to work in pixel values directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * A boolean flag indicating if this Game Object is being cropped or not.
             * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
             * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
             */
            isCropped: boolean;

            /**
             * Applies a crop to a texture based Game Object, such as a Sprite or Image.
             * 
             * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
             * 
             * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
             * changes what is shown when rendered.
             * 
             * The crop size as well as coordinates can not exceed the size of the texture frame.
             * 
             * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
             * 
             * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
             * half of it, you could call `setCrop(0, 0, 400, 600)`.
             * 
             * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
             * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
             * 
             * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
             * 
             * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
             * 
             * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
             * the renderer to skip several internal calculations.
             * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
             * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
             * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
             * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
             * @returns This Game Object instance.
             */
            setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture.
             * @returns This Game Object instance.
             */
            setTexture(key: string, frame?: string | number): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Layer Game Object.
         * 
         * A Layer is a special type of Game Object that acts as a Display List. You can add any type of Game Object
         * to a Layer, just as you would to a Scene. Layers can be used to visually group together 'layers' of Game
         * Objects:
         * 
         * ```javascript
         * const spaceman = this.add.sprite(150, 300, 'spaceman');
         * const bunny = this.add.sprite(400, 300, 'bunny');
         * const elephant = this.add.sprite(650, 300, 'elephant');
         * 
         * const layer = this.add.layer();
         * 
         * layer.add([ spaceman, bunny, elephant ]);
         * ```
         * 
         * The 3 sprites in the example above will now be managed by the Layer they were added to. Therefore,
         * if you then set `layer.setVisible(false)` they would all vanish from the display.
         * 
         * You can also control the depth of the Game Objects within the Layer. For example, calling the
         * `setDepth` method of a child of a Layer will allow you to adjust the depth of that child _within the
         * Layer itself_, rather than the whole Scene. The Layer, too, can have its depth set as well.
         * 
         * The Layer class also offers many different methods for manipulating the list, such as the
         * methods `moveUp`, `moveDown`, `sendToBack`, `bringToTop` and so on. These allow you to change the
         * display list position of the Layers children, causing it to adjust the order in which they are
         * rendered. Using `setDepth` on a child allows you to override this.
         * 
         * Layers have no position or size within the Scene. This means you cannot enable a Layer for
         * physics or input, or change the position, rotation or scale of a Layer. They also have no scroll
         * factor, texture, tint, origin, crop or bounds.
         * 
         * If you need those kind of features then you should use a Container instead. Containers can be added
         * to Layers, but Layers cannot be added to Containers.
         * 
         * However, you can set the Alpha, Blend Mode, Depth, Mask and Visible state of a Layer. These settings
         * will impact all children being rendered by the Layer.
         * 
         * Layers should always be the topmost elements of any scene hierarchy.
         * They can be children of layers, but not of anything else.
         * 
         * Until Phaser version 4.1.0, Layer was not a true GameObject.
         * It is now a true GameObject.
         */
        class Layer extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param children An optional array of Game Objects to add to this Layer.
             */
            constructor(scene: Phaser.Scene, children?: Phaser.GameObjects.GameObject[]);

            /**
             * A reference to the Scene to which this Game Object belongs.
             * 
             * Game Objects can only belong to one Scene.
             * 
             * You should consider this property as being read-only. You cannot move a
             * Game Object to another Scene by simply changing it.
             */
            scene: Phaser.Scene;

            /**
             * A reference to the Scene Systems.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * A reference to the Scene Event Emitter.
             */
            events: Phaser.Events.EventEmitter;

            /**
             * The flag that determines whether Game Objects should be sorted when `depthSort()` is called.
             */
            sortChildrenFlag: boolean;

            /**
             * A Layer cannot be enabled for input.
             * 
             * This method does nothing and is kept to ensure
             * the Layer has the same shape as a Game Object.undefined
             * @returns This GameObject.
             */
            setInteractive(): this;

            /**
             * A Layer cannot be enabled for input.
             * 
             * This method does nothing and is kept to ensure
             * the Layer has the same shape as a Game Object.undefined
             * @returns This GameObject.
             */
            disableInteractive(): this;

            /**
             * A Layer cannot be enabled for input.
             * 
             * This method does nothing and is kept to ensure
             * the Layer has the same shape as a Game Object.undefined
             * @returns This GameObject.
             */
            removeInteractive(): this;

            /**
             * Compares the renderMask with the renderFlags to see if this Game Object will render or not.
             * Also checks the Game Object against the given Cameras exclusion list.
             * @param camera The Camera to check against this Game Object.
             * @returns True if the Game Object should be rendered, otherwise false.
             */
            willRender(camera: Phaser.Cameras.Scene2D.Camera): boolean;

            /**
             * Force a sort of the display list on the next call to depthSort.
             */
            queueDepthSort(): void;

            /**
             * Immediately sorts the display list if the flag is set.
             */
            depthSort(): void;

            /**
             * Compare the depth of two Game Objects.
             * @param childA The first Game Object.
             * @param childB The second Game Object.
             * @returns The difference between the depths of each Game Object.
             */
            sortByDepth(childA: Phaser.GameObjects.GameObject, childB: Phaser.GameObjects.GameObject): number;

            /**
             * Returns a reference to the array which contains all Game Objects in this Layer.
             * 
             * This is a reference, not a copy of it, so be very careful not to mutate it.undefined
             * @returns An array of Game Objects within this Layer.
             */
            getChildren(): Phaser.GameObjects.GameObject[];

            /**
             * Return an array listing the events for which the emitter has registered listeners.undefined
             * @returns undefined
             */
            eventNames(): (string|symbol)[];

            /**
             * Return the listeners registered for a given event.
             * @param event The event name.
             * @returns The registered listeners.
             */
            listeners(event: string | symbol): Function[];

            /**
             * Return the number of listeners listening to a given event.
             * @param event The event name.
             * @returns The number of listeners.
             */
            listenerCount(event: string | symbol): number;

            /**
             * Calls each of the listeners registered for a given event.
             * @param event The event name.
             * @param args Additional arguments that will be passed to the event handler.
             * @returns `true` if the event had listeners, else `false`.
             */
            emit(event: string | symbol, ...args: any[]): boolean;

            /**
             * Add a listener for a given event.
             * @param event The event name.
             * @param fn The listener function.
             * @param context The context to invoke the listener with. Default this.
             * @returns This Layer instance.
             */
            on(event: string | symbol, fn: Function, context?: any): this;

            /**
             * Add a listener for a given event.
             * @param event The event name.
             * @param fn The listener function.
             * @param context The context to invoke the listener with. Default this.
             * @returns This Layer instance.
             */
            addListener(event: string | symbol, fn: Function, context?: any): this;

            /**
             * Add a one-time listener for a given event.
             * @param event The event name.
             * @param fn The listener function.
             * @param context The context to invoke the listener with. Default this.
             * @returns This Layer instance.
             */
            once(event: string | symbol, fn: Function, context?: any): this;

            /**
             * Remove the listeners of a given event.
             * @param event The event name.
             * @param fn Only remove the listeners that match this function.
             * @param context Only remove the listeners that have this context.
             * @param once Only remove one-time listeners.
             * @returns This Layer instance.
             */
            removeListener(event: string | symbol, fn?: Function, context?: any, once?: boolean): this;

            /**
             * Remove the listeners of a given event.
             * @param event The event name.
             * @param fn Only remove the listeners that match this function.
             * @param context Only remove the listeners that have this context.
             * @param once Only remove one-time listeners.
             * @returns This Layer instance.
             */
            off(event: string | symbol, fn?: Function, context?: any, once?: boolean): this;

            /**
             * Remove all listeners, or those of the specified event.
             * @param event The event name.
             * @returns This Layer instance.
             */
            removeAllListeners(event?: string | symbol): this;

            /**
             * The parent of this list.
             */
            parent: any;

            /**
             * The objects that belong to this collection.
             */
            list: Phaser.GameObjects.GameObject[];

            /**
             * The index of the current element.
             * 
             * This is used internally when iterating through the list with the {@link #first}, {@link #last}, {@link #next}, and {@link #previous} properties.
             */
            position: number;

            /**
             * A callback that is invoked every time a child is added to this list.
             */
            addCallback: Function;

            /**
             * A callback that is invoked every time a child is removed from this list.
             */
            removeCallback: Function;

            /**
             * The property key to sort by.
             */
            _sortKey: string;

            /**
             * Adds the given item to the end of the list. Each item must be unique.
             * @param child The item, or array of items, to add to the list.
             * @param skipCallback Skip calling the List.addCallback if this child is added successfully. Default false.
             * @returns The list's underlying array.
             */
            add(child: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], skipCallback?: boolean): any;

            /**
             * Adds an item to list, starting at a specified index. Each item must be unique within the list.
             * @param child The item, or array of items, to add to the list.
             * @param index The index in the list at which the element(s) will be inserted. Default 0.
             * @param skipCallback Skip calling the List.addCallback if this child is added successfully. Default false.
             * @returns The List's underlying array.
             */
            addAt(child: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], index?: number, skipCallback?: boolean): Phaser.GameObjects.GameObject[];

            /**
             * Retrieves the item at a given position inside the List.
             * @param index The index of the item.
             * @returns The retrieved item, or `undefined` if it's outside the List's bounds.
             */
            getAt(index: number): Phaser.GameObjects.GameObject | undefined;

            /**
             * Locates an item within the List and returns its index.
             * @param child The item to locate.
             * @returns The index of the item within the List, or -1 if it's not in the List.
             */
            getIndex(child: Phaser.GameObjects.GameObject): number;

            /**
             * Sort the contents of this List so the items are in order based on the given property.
             * For example, `sort('alpha')` would sort the List contents based on the value of their `alpha` property.
             * @param property The property to lexically sort by.
             * @param handler Provide your own custom handler function. Will receive 2 children which it should compare and return a number (negative if the first should come before the second, positive if after, zero if equal).
             * @returns This List object.
             */
            sort(property: string, handler?: Function): Phaser.GameObjects.Layer;

            /**
             * Searches for the first instance of a child with its `name`
             * property matching the given argument. Should more than one child have
             * the same name only the first is returned.
             * @param name The name to search for.
             * @returns The first child with a matching name, or null if none were found.
             */
            getByName(name: string): Phaser.GameObjects.GameObject | null;

            /**
             * Returns a random child from the list.
             * @param startIndex Offset from the front of the list (lowest child). Default 0.
             * @param length Restriction on the number of values you want to randomly select from. Default (to top).
             * @returns A random child of this List.
             */
            getRandom(startIndex?: number, length?: number): Phaser.GameObjects.GameObject | null;

            /**
             * Returns the first element in a given part of the List which matches a specific criterion.
             * @param property The name of the property to test or a falsey value to have no criterion.
             * @param value The value to test the `property` against, or `undefined` to allow any value and only check for existence.
             * @param startIndex The position in the List to start the search at. Default 0.
             * @param endIndex The position in the List to optionally stop the search at. It won't be checked.
             * @returns The first item which matches the given criterion, or `null` if no such item exists.
             */
            getFirst(property: string, value: Phaser.GameObjects.GameObject | undefined, startIndex?: number, endIndex?: number): Phaser.GameObjects.GameObject | null;

            /**
             * Returns all children in this List.
             * 
             * You can optionally specify a matching criteria using the `property` and `value` arguments.
             * 
             * For example: `getAll('parent')` would return only children that have a property called `parent`.
             * 
             * You can also specify a value to compare the property to:
             * 
             * `getAll('visible', true)` would return only children that have their visible property set to `true`.
             * 
             * Optionally you can specify a start and end index. For example if this List had 100 children,
             * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only
             * the first 50 children in the List.
             * @param property An optional property to test against the value argument.
             * @param value If property is set then Child.property must strictly equal this value to be included in the results.
             * @param startIndex The first child index to start the search from.
             * @param endIndex The last child index to search up until.
             * @returns All items of the List which match the given criterion, if any.
             */
            getAll(property?: string, value?: any, startIndex?: number, endIndex?: number): Phaser.GameObjects.GameObject[];

            /**
             * Returns the total number of items in the List which have a property matching the given value.
             * @param property The property to test on each item.
             * @param value The value to test the property against.
             * @returns The total number of matching elements.
             */
            count(property: string, value: Phaser.GameObjects.GameObject): number;

            /**
             * Swaps the positions of two items in the list.
             * @param child1 The first item to swap.
             * @param child2 The second item to swap.
             */
            swap(child1: Phaser.GameObjects.GameObject, child2: Phaser.GameObjects.GameObject): void;

            /**
             * Moves an item in the List to a new position.
             * @param child The item to move.
             * @param index The new position to move the item to.
             * @returns The item that was moved.
             */
            moveTo(child: Phaser.GameObjects.GameObject, index: number): Phaser.GameObjects.GameObject;

            /**
             * Moves an item above another one in the List.
             * If the given item is already above the other, it isn't moved.
             * Above means toward the end of the List.
             * @param child1 The element to move above base element.
             * @param child2 The base element.
             */
            moveAbove(child1: Phaser.GameObjects.GameObject, child2: Phaser.GameObjects.GameObject): void;

            /**
             * Moves an item below another one in the List.
             * If the given item is already below the other, it isn't moved.
             * Below means toward the start of the List.
             * @param child1 The element to move below base element.
             * @param child2 The base element.
             */
            moveBelow(child1: Phaser.GameObjects.GameObject, child2: Phaser.GameObjects.GameObject): void;

            /**
             * Removes one or many items from the List.
             * @param child The item, or array of items, to remove.
             * @param skipCallback Skip calling the List.removeCallback. Default false.
             * @returns The item, or array of items, which were successfully removed from the List.
             */
            remove(child: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], skipCallback?: boolean): Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[];

            /**
             * Removes the item at the given position in the List.
             * @param index The position to remove the item from.
             * @param skipCallback Skip calling the List.removeCallback. Default false.
             * @returns The item that was removed.
             */
            removeAt(index: number, skipCallback?: boolean): Phaser.GameObjects.GameObject;

            /**
             * Removes the items within the given range in the List.
             * @param startIndex The index to start removing from. Default 0.
             * @param endIndex The position to stop removing at. The item at this position won't be removed.
             * @param skipCallback Skip calling the List.removeCallback. Default false.
             * @returns An array of the items which were removed.
             */
            removeBetween(startIndex?: number, endIndex?: number, skipCallback?: boolean): Phaser.GameObjects.GameObject[];

            /**
             * Removes all the items.
             * @param skipCallback Skip calling the List.removeCallback. Default false.
             * @returns This List object.
             */
            removeAll(skipCallback?: boolean): this;

            /**
             * Brings the given child to the top of this List.
             * @param child The item to bring to the top of the List.
             * @returns The item which was moved.
             */
            bringToTop(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject;

            /**
             * Sends the given child to the bottom of this List.
             * @param child The item to send to the back of the list.
             * @returns The item which was moved.
             */
            sendToBack(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject;

            /**
             * Moves the given child up one place in this List unless it's already at the top.
             * @param child The item to move up.
             * @returns The item which was moved.
             */
            moveUp(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject;

            /**
             * Moves the given child down one place in this List unless it's already at the bottom.
             * @param child The item to move down.
             * @returns The item which was moved.
             */
            moveDown(child: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject;

            /**
             * Reverses the order of all children in this List.undefined
             * @returns This List object.
             */
            reverse(): Phaser.GameObjects.Layer;

            /**
             * Shuffles the items in the list.undefined
             * @returns This List object.
             */
            shuffle(): Phaser.GameObjects.Layer;

            /**
             * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List.
             * @param oldChild The child in this List that will be replaced.
             * @param newChild The child to be inserted into this List.
             * @returns Returns the oldChild that was replaced within this List.
             */
            replace(oldChild: Phaser.GameObjects.GameObject, newChild: Phaser.GameObjects.GameObject): Phaser.GameObjects.GameObject;

            /**
             * Checks if an item exists within the List.
             * @param child The item to check for the existence of.
             * @returns `true` if the item is found in the list, otherwise `false`.
             */
            exists(child: Phaser.GameObjects.GameObject): boolean;

            /**
             * Sets the property `key` to the given value on all members of this List.
             * @param property The name of the property to set.
             * @param value The value to set the property to.
             * @param startIndex The first child index to start the search from.
             * @param endIndex The last child index to search up until.
             */
            setAll(property: string, value: any, startIndex?: number, endIndex?: number): void;

            /**
             * Passes all children to the given callback.
             * @param callback The function to call.
             * @param context Value to use as `this` when executing callback.
             * @param args Additional arguments that will be passed to the callback, after the child.
             */
            each(callback: EachListCallback<Phaser.GameObjects.GameObject>, context?: any, ...args: any[]): void;

            /**
             * Clears the List and recreates its internal array.
             */
            shutdown(): void;

            /**
             * The number of items inside the List.
             */
            readonly length: number;

            /**
             * The first item in the List or `null` for an empty List.
             */
            readonly first: Phaser.GameObjects.GameObject | null;

            /**
             * The last item in the List, or `null` for an empty List.
             */
            readonly last: Phaser.GameObjects.GameObject | null;

            /**
             * The next item in the List, or `null` if the entire List has been traversed.
             * 
             * This property can be read successively after reading {@link #first} or manually setting the {@link #position} to iterate the List.
             */
            readonly next: Phaser.GameObjects.GameObject | null;

            /**
             * The previous item in the List, or `null` if the entire List has been traversed.
             * 
             * This property can be read successively after reading {@link #last} or manually setting the {@link #position} to iterate the List backwards.
             */
            readonly previous: Phaser.GameObjects.GameObject | null;

            /**
             * Destroys this Layer removing it from the Display List and Update List and
             * severing all ties to parent resources.
             * 
             * Also destroys all children of this Layer. If you do not wish for the
             * children to be destroyed, you should move them from this Layer first.
             * 
             * Use this to remove this Layer from your game if you don't ever plan to use it again.
             * As long as no reference to it exists within your own code it should become free for
             * garbage collection by the browser.
             * 
             * If you just want to temporarily disable an object then look at using the
             * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.
             * @param fromScene `True` if this Game Object is being destroyed by the Scene, `false` if not. Default false.
             */
            destroy(fromScene?: boolean): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A 2D Light.
         * 
         * These are created by the {@link Phaser.GameObjects.LightsManager}, available from within a scene via `this.lights`.
         * 
         * Any Game Objects with the Lighting Component, and `setLighting(true)`,
         * will then be affected by these Lights.
         * If they have a normal map, it will be used.
         * If they don't, the Lights will use the default normal map, a flat surface.
         * 
         * They can also simply be used to represent a point light for your own purposes.
         * 
         * Lights cannot be added to Containers. They are designed to exist in the root of a Scene.
         */
        class Light extends Phaser.Geom.Circle implements Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param x The horizontal position of the light.
             * @param y The vertical position of the light.
             * @param radius The radius of the light.
             * @param r The red color of the light. A value between 0 and 1.
             * @param g The green color of the light. A value between 0 and 1.
             * @param b The blue color of the light. A value between 0 and 1.
             * @param intensity The intensity of the light.
             * @param z The z position of the light. If not given, it will be set to `radius * 0.1`.
             */
            constructor(x: number, y: number, radius: number, r: number, g: number, b: number, intensity: number, z?: number);

            /**
             * The color of the light.
             */
            color: Phaser.Display.RGB;

            /**
             * The intensity of the light. This scales the overall brightness of the light effect.
             * A value of 1 is considered normal brightness. Higher values produce a stronger, brighter light.
             */
            intensity: number;

            /**
             * The z position of the light.
             * This affects the relief effect created by the light.
             * A higher value will make the light appear more raised.
             * 
             * Lit game objects are considered to be at z=0.
             * Thus, if z is larger than the radius of the light,
             * the light will not affect them.
             * Strong values are in the range of 0 to radius/2.
             * 
             * This is not a true position, and won't be affected by
             * perspective or camera position. It won't be set by `setTo`.
             * Use `setZ` to set it, or `setZNormal` to set it to a fraction
             * of the radius.
             */
            z: number;

            /**
             * The flags that are compared against `RENDER_MASK` to determine if this Light will render or not.
             * The relevant bit is 0001, set by the Visible component. The remaining bits are unused by Light
             * but are reserved for custom use if required.
             */
            renderFlags: number;

            /**
             * A bitmask that controls if this Game Object is drawn by a Camera or not.
             * Not usually set directly, instead call `Camera.ignore`, however you can
             * set this property directly using the Camera.id property:
             */
            cameraFilter: number;

            /**
             * The width of this Light Game Object. This is the same as `Light.diameter`.
             */
            displayWidth: number;

            /**
             * The height of this Light Game Object. This is the same as `Light.diameter`.
             */
            displayHeight: number;

            /**
             * The width of this Light Game Object. This is the same as `Light.diameter`.
             */
            width: number;

            /**
             * The height of this Light Game Object. This is the same as `Light.diameter`.
             */
            height: number;

            /**
             * The z position of the light, as a fraction of the radius.
             * This affects the relief effect created by the light.
             * A higher value will make the light appear more raised.
             * Strong values are in the range of 0 to 0.5.
             */
            zNormal: number;

            /**
             * Compares the renderMask with the renderFlags to see if this Game Object will render or not.
             * Also checks the Game Object against the given Cameras exclusion list.
             * @param camera The Camera to check against this Game Object.
             * @returns True if the Game Object should be rendered, otherwise false.
             */
            willRender(camera: Phaser.Cameras.Scene2D.Camera): boolean;

            /**
             * Set the color of the light from a single integer RGB value.
             * @param rgb The integer RGB color of the light.
             * @returns This Light object.
             */
            setColor(rgb: number): this;

            /**
             * Set the intensity of the light. This scales the overall brightness of the light effect.
             * A value of 1 is considered normal brightness. Higher values produce a stronger, brighter light.
             * @param intensity The intensity (brightness multiplier) of the light.
             * @returns This Light object.
             */
            setIntensity(intensity: number): this;

            /**
             * Set the radius of the light, in pixels. This defines the circular area of influence
             * within which lit Game Objects will be affected by this light.
             * @param radius The radius of the light, in pixels.
             * @returns This Light object.
             */
            setRadius(radius: number): this;

            /**
             * Set the z position of the light. This controls the perceived height of the light above
             * the scene, which influences the relief (normal-map shading) effect. Larger values make
             * the light appear more elevated. Lit Game Objects are considered to be at z=0, so if z
             * exceeds the light's radius the light will not affect them. Strong values are in the
             * range of 0 to radius/2.
             * @param z The z position of the light, where 0 is at the same level as lit Game Objects.
             * @returns This Light object.
             */
            setZ(z: number): this;

            /**
             * Set the z position of the light as a fraction of the radius.
             * This affects the relief effect created by the light.
             * A higher value will make the light appear more raised.
             * Strong values are in the range of 0 to 0.5.
             * @param z The normalized z position of the light.
             * @returns This Light object.
             */
            setZNormal(z: number): this;

            /**
             * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.
             */
            static readonly RENDER_MASK: number;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Lights Manager is responsible for managing all of the {@link Phaser.GameObjects.Light} objects
         * in a Scene, as well as the ambient light color that applies to all lit Game Objects.
         * 
         * It is created automatically by the Scene Systems and is accessed via `this.lights` within a Scene.
         * To use the lighting system, call `this.lights.enable()` and ensure that any Game Objects you want
         * to be affected by lighting have `setLighting(true)` applied to them.
         * 
         * The Lights Manager works in conjunction with the Light Filter (WebGL only). Game Objects rendered
         * with this filter sample the active lights and the ambient color, and use any normal maps assigned
         * to their textures to produce a dynamic lighting effect. Lighting has no effect in Canvas rendering.
         * 
         * Each Scene supports a fixed maximum number of simultaneous lights, set via the `maxLights` property
         * in the game config. When more lights exist than the maximum, the manager culls the furthest lights
         * from the camera each frame. Use {@link Phaser.GameObjects.LightsManager#addLight} to create a
         * Light and {@link Phaser.GameObjects.LightsManager#setAmbientColor} to control the base illumination.
         */
        class LightsManager {
            /**
             * The Lights in the Scene.
             */
            lights: Phaser.GameObjects.Light[];

            /**
             * The ambient color.
             */
            ambientColor: Phaser.Display.RGB;

            /**
             * Whether the Lights Manager is enabled.
             */
            active: boolean;

            /**
             * The maximum number of lights that a single Camera and the lights shader can process.
             * Change this via the `maxLights` property in your game config, as it cannot be changed at runtime.
             */
            readonly maxLights: number;

            /**
             * The number of lights processed in the _previous_ frame.
             */
            readonly visibleLights: number;

            /**
             * Creates a new Point Light Game Object and adds it to the Scene.
             * 
             * Note: This method will only be available if the Point Light Game Object has been built into Phaser.
             * 
             * The Point Light Game Object provides a way to add a point light effect into your game,
             * without the expensive shader processing requirements of the traditional Light Game Object.
             * 
             * The difference is that the Point Light renders using a custom shader, designed to give the
             * impression of a point light source, of variable radius, intensity and color, in your game.
             * However, unlike the Light Game Object, it does not impact any other Game Objects, or use their
             * normal maps for calculations. This makes them extremely fast to render compared to Lights
             * and perfect for special effects, such as flickering torches or muzzle flashes.
             * 
             * For maximum performance you should batch Point Light Game Objects together. This means
             * ensuring they follow each other consecutively on the display list. Ideally, use a Layer
             * Game Object and then add just Point Lights to it, so that it can batch together the rendering
             * of the lights. You don't _have_ to do this, and if you've only a handful of Point Lights in
             * your game then it's perfectly safe to mix them into the display list as normal. However, if
             * you're using a large number of them, please consider how they are mixed into the display list.
             * 
             * The renderer will automatically cull Point Lights. Those with a radius that does not intersect
             * with the Camera will be skipped in the rendering list. This happens automatically and the
             * culled state is refreshed every frame, for every camera.
             * 
             * The origin of a Point Light is always 0.5 and it cannot be changed.
             * 
             * Point Lights are a WebGL only feature and do not have a Canvas counterpart.
             * @param x The horizontal position of this Point Light in the world.
             * @param y The vertical position of this Point Light in the world.
             * @param color The color of the Point Light, given as a hex value. Default 0xffffff.
             * @param radius The radius of the Point Light. Default 128.
             * @param intensity The intensity, or color blend, of the Point Light. Default 1.
             * @param attenuation The attenuation of the Point Light. This is the reduction of light from the center point. Default 0.1.
             * @returns The Game Object that was created.
             */
            addPointLight(x: number, y: number, color?: number, radius?: number, intensity?: number, attenuation?: number): Phaser.GameObjects.PointLight;

            /**
             * Enable the Lights Manager. This activates the lighting system for the Scene, causing all
             * Game Objects using the Light Filter to be affected by the configured lights and ambient
             * color. On first enable, the `maxLights` value is read from the renderer configuration.undefined
             * @returns This Lights Manager instance.
             */
            enable(): this;

            /**
             * Disable the Lights Manager. When disabled, the lighting system no longer affects the rendering
             * of Game Objects using the Light Filter, effectively switching them back to unlit rendering.
             * The existing lights and ambient color are preserved and will take effect again if the manager
             * is re-enabled.undefined
             * @returns This Lights Manager instance.
             */
            disable(): this;

            /**
             * Get all lights that can be seen by the given Camera.
             * 
             * It will automatically cull lights that are outside the world view of the Camera.
             * 
             * If more lights are returned than supported by the renderer, the lights are then culled
             * based on the distance from the center of the camera. Only those closest are rendered.
             * @param camera The Camera to cull Lights for.
             * @returns The culled Lights.
             */
            getLights(camera: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Light[];

            /**
             * Sort function to sort lights by distance from the camera.
             * The sort is in reverse order, so that the furthest light is culled first.
             * @param a A light entry object with a `distance` property representing its distance from the camera center.
             * @param b A light entry object with a `distance` property representing its distance from the camera center.
             * @returns True if `a` is further than `b`, otherwise false.
             */
            sortByDistance(a: number, b: number): boolean;

            /**
             * Set the ambient light color.
             * @param rgb The integer RGB color of the ambient light.
             * @returns This Lights Manager instance.
             */
            setAmbientColor(rgb: number): this;

            /**
             * Returns the maximum number of Lights allowed to appear at once.undefined
             * @returns The maximum number of Lights allowed to appear at once.
             */
            getMaxVisibleLights(): number;

            /**
             * Get the number of Lights managed by this Lights Manager.undefined
             * @returns The number of Lights managed by this Lights Manager.
             */
            getLightCount(): number;

            /**
             * Creates a new {@link Phaser.GameObjects.Light} object, adds it to this Lights Manager, and returns it.
             * The Light will influence all Game Objects using the Light Filter that are within its radius,
             * using the texture's normal map data to compute shading. You can configure its position, radius,
             * color, intensity, and z-height (which affects the angle of the shading effect).
             * @param x The horizontal position of the Light. Default 0.
             * @param y The vertical position of the Light. Default 0.
             * @param radius The radius of the Light. Default 128.
             * @param rgb The integer RGB color of the light. Default 0xffffff.
             * @param intensity The intensity of the Light. Default 1.
             * @param z The z position of the light. If omitted, it will be set to `radius * 0.1`.
             * @returns The Light that was added.
             */
            addLight(x?: number, y?: number, radius?: number, rgb?: number, intensity?: number, z?: number): Phaser.GameObjects.Light;

            /**
             * Removes a {@link Phaser.GameObjects.Light} from this Lights Manager. The Light will no longer
             * influence the rendering of any Game Objects. The Light object itself is not destroyed; it is
             * simply removed from the manager's active list.
             * @param light The Light to remove.
             * @returns This Lights Manager instance.
             */
            removeLight(light: Phaser.GameObjects.Light): this;

            /**
             * Shuts down the Lights Manager and clears all active Lights. This is called automatically
             * when a Scene shuts down. The Lights Manager can be re-enabled afterwards by calling
             * {@link Phaser.GameObjects.LightsManager#enable}.
             */
            shutdown(): void;

            /**
             * Destroy the Lights Manager.
             * 
             * Cleans up all references by calling {@link Phaser.GameObjects.LightsManager#shutdown}.
             */
            destroy(): void;

        }

        /**
         * A Scene plugin that provides a {@link Phaser.GameObjects.LightsManager} for rendering objects with dynamic lighting.
         * 
         * Available from within a Scene via `this.lights`.
         * 
         * Add Lights using the {@link Phaser.GameObjects.LightsManager#addLight} method:
         * 
         * ```javascript
         * // Enable the Lights Manager because it is disabled by default
         * this.lights.enable();
         * 
         * // Create a Light at [400, 300] with a radius of 200
         * this.lights.addLight(400, 300, 200);
         * ```
         * 
         * For Game Objects to be affected by the Lights when rendered, you will need to set them to use lighting like so:
         * 
         * ```javascript
         * sprite.setLighting(true);
         * ```
         */
        class LightsPlugin extends Phaser.GameObjects.LightsManager {
            /**
             * 
             * @param scene The Scene that this Lights Plugin belongs to.
             */
            constructor(scene: Phaser.Scene);

            /**
             * A reference to the Scene that this Lights Plugin belongs to.
             */
            scene: Phaser.Scene;

            /**
             * A reference to the Scene's systems.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * Handles the boot event from the Scene's Event Emitter, subscribing to
             * the Scene's `shutdown` and `destroy` events so the plugin can clean up
             * its resources when the Scene is stopped or destroyed.
             */
            boot(): void;

            /**
             * Destroy the Lights Plugin.
             * 
             * Cleans up all references.
             */
            destroy(): void;

        }

        /**
         * A Nine Slice Game Object allows you to display a texture-based object that
         * can be stretched both horizontally and vertically, but that retains
         * fixed-sized corners. The dimensions of the corners are set via the
         * parameters to this class.
         * 
         * This is extremely useful for UI and button like elements, where you need
         * them to expand to accommodate the content without distorting the texture.
         * 
         * The texture you provide for this Game Object should be based on the
         * following layout structure:
         * 
         * ```
         *      A                          B
         *    +---+----------------------+---+
         *  C | 1 |          2           | 3 |
         *    +---+----------------------+---+
         *    |   |                      |   |
         *    | 4 |          5           | 6 |
         *    |   |                      |   |
         *    +---+----------------------+---+
         *  D | 7 |          8           | 9 |
         *    +---+----------------------+---+
         * ```
         * 
         * When changing this objects width and / or height:
         * 
         *     areas 1, 3, 7 and 9 (the corners) will remain unscaled
         *     areas 2 and 8 will be stretched horizontally only
         *     areas 4 and 6 will be stretched vertically only
         *     area 5 will be stretched both horizontally and vertically
         * 
         * You can also create a 3 slice Game Object:
         * 
         * This works in a similar way, except you can only stretch it horizontally.
         * Therefore, it requires less configuration:
         * 
         * ```
         *      A                          B
         *    +---+----------------------+---+
         *    |   |                      |   |
         *  C | 1 |          2           | 3 |
         *    |   |                      |   |
         *    +---+----------------------+---+
         * ```
         * 
         * When changing this objects width (you cannot change its height)
         * 
         *     areas 1 and 3 will remain unscaled
         *     area 2 will be stretched horizontally
         * 
         * The above configuration concept is adapted from the Pixi NineSlicePlane.
         * 
         * To specify a 3 slice object instead of a 9 slice you should only
         * provide the `leftWidth` and `rightWidth` parameters. To create a 9 slice
         * you must supply all parameters.
         * 
         * The _minimum_ width this Game Object can be is the total of
         * `leftWidth` + `rightWidth`.  The _minimum_ height this Game Object
         * can be is the total of `topHeight` + `bottomHeight`.
         * If you need to display this object at a smaller size, you can scale it.
         * 
         * In terms of performance, using a 3 slice Game Object is the equivalent of
         * having 3 Sprites in a row. Using a 9 slice Game Object is the equivalent
         * of having 9 Sprites in a row. The vertices of this object are all batched
         * together and can co-exist with other Sprites and graphics on the display
         * list, without incurring any additional overhead.
         * 
         * This Game Object can now populate its values automatically
         * if they have been set within Texture Packer 7.1.0 or above and exported with
         * the atlas json. If this is the case, you can just create this Game Object without
         * specifying anything more than the texture key and frame and it will pull the
         * area data from the atlas.
         * 
         * This object does not support trimmed textures from Texture Packer.
         * Trimming interferes with the ability to stretch the texture correctly.
         */
        class NineSlice extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of the center of this Game Object in the world.
             * @param y The vertical position of the center of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             * @param width The width of the Nine Slice Game Object. You can adjust the width post-creation. Default 256.
             * @param height The height of the Nine Slice Game Object. If this is a 3 slice object the height will be fixed to the height of the texture and cannot be changed. Default 256.
             * @param leftWidth The size of the left vertical column (A). Default 10.
             * @param rightWidth The size of the right vertical column (B). Default 10.
             * @param topHeight The size of the top horizontal row (C). Set to zero or undefined to create a 3 slice object. Default 0.
             * @param bottomHeight The size of the bottom horizontal row (D). Set to zero or undefined to create a 3 slice object. Default 0.
             * @param tileX When enabled, the scalable horizontal regions are repeated across the object instead of being stretched. Each tile is still slightly stretched so that it remains visible in full, which may cause minor distortion but far less than pure stretching. The texture should be seamless to avoid visible artifacts between tiles. Default false.
             * @param tileY When enabled, the scalable vertical regions are repeated across the object instead of being stretched. Each tile is still slightly stretched so that it remains visible in full, which may cause minor distortion but far less than pure stretching. The texture should be seamless to avoid visible artifacts between tiles. Default false.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number, width?: number, height?: number, leftWidth?: number, rightWidth?: number, topHeight?: number, bottomHeight?: number, tileX?: boolean, tileY?: boolean);

            /**
             * An array of Vertex objects that correspond to the quads that make-up
             * this Nine Slice Game Object. They are stored in the following order:
             * 
             * Top Left - Indexes 0 - 5
             * Top Center - Indexes 6 - 11
             * Top Right - Indexes 12 - 17
             * Center Left - Indexes 18 - 23
             * Center - Indexes 24 - 29
             * Center Right - Indexes 30 - 35
             * Bottom Left - Indexes 36 - 41
             * Bottom Center - Indexes 42 - 47
             * Bottom Right - Indexes 48 - 53
             * 
             * Each quad is represented by 6 Vertex instances.
             * 
             * This array will contain 18 elements for a 3 slice object
             * and 54 for a nine slice object.
             * 
             * You should never modify this array once it has been populated.
             */
            vertices: Phaser.GameObjects.NineSliceVertex[];

            /**
             * The size of the left vertical bar (A).
             */
            readonly leftWidth: number;

            /**
             * The size of the right vertical bar (B).
             */
            readonly rightWidth: number;

            /**
             * The size of the top horizontal bar (C).
             * 
             * If this is a 3 slice object this property will be set to the
             * height of the texture being used.
             */
            readonly topHeight: number;

            /**
             * The size of the bottom horizontal bar (D).
             * 
             * If this is a 3 slice object this property will be set to zero.
             */
            readonly bottomHeight: number;

            /**
             * Indicates whether the scalable horizontal regions of the Nine Slice
             * are repeated across the object instead of being stretched. Each tile
             * is still slightly stretched so that it remains visible in full.
             */
            readonly tileX: boolean;

            /**
             * Indicates whether the scalable vertical regions of the Nine Slice
             * are repeated across the object instead of being stretched. Each tile
             * is still slightly stretched so that it remains visible in full.
             */
            readonly tileY: boolean;

            /**
             * The tint value being applied to the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tint: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             */
            tintMode: Phaser.TintModes;

            /**
             * This property is `true` if this Nine Slice Game Object was configured
             * with just `leftWidth` and `rightWidth` values, making it a 3-slice
             * instead of a 9-slice object.
             */
            is3Slice: boolean;

            /**
             * Resets the width, height and slices for this NineSlice Game Object.
             * 
             * This allows you to modify the texture being used by this object and then reset the slice configuration,
             * to avoid having to destroy this Game Object in order to use it for a different game element.
             * 
             * Please note that you cannot change a 9-slice to a 3-slice or vice versa.
             * @param width The width of the Nine Slice Game Object. You can adjust the width post-creation. Default 256.
             * @param height The height of the Nine Slice Game Object. If this is a 3 slice object the height will be fixed to the height of the texture and cannot be changed. Default 256.
             * @param leftWidth The size of the left vertical column (A). Default 10.
             * @param rightWidth The size of the right vertical column (B). Default 10.
             * @param topHeight The size of the top horizontal row (C). Set to zero or undefined to create a 3 slice object. Default 0.
             * @param bottomHeight The size of the bottom horizontal row (D). Set to zero or undefined to create a 3 slice object. Default 0.
             * @param skipScale9 If this Nine Slice was created from Texture Packer scale9 atlas data, set this property to use the given column sizes instead of those specified in the JSON. Default false.
             * @returns This Game Object instance.
             */
            setSlices(width?: number, height?: number, leftWidth?: number, rightWidth?: number, topHeight?: number, bottomHeight?: number, skipScale9?: boolean): this;

            /**
             * Updates all of the vertex UV coordinates. This is called automatically
             * when the NineSlice Game Object is created, or if the texture frame changes.
             * 
             * Unlike with the `updateVertices` method, you do not need to call this
             * method if the Nine Slice changes size. Only if it changes texture frame.
             */
            updateUVs(): void;

            /**
             * Recalculates all of the vertices in this Nine Slice Game Object
             * based on the `leftWidth`, `rightWidth`, `topHeight`, `bottomHeight`,
             * `tileX` and `tileY` properties, combined with the Game Object size.
             * 
             * This method is called automatically when this object is created
             * or if its origin is changed.
             * 
             * You should not typically need to call this method directly, but it
             * is left public should you find a need to modify one of those properties
             * after creation.
             */
            updateVertices(): void;

            /**
             * Internally updates the position coordinates across all vertices of the
             * given quad offset.
             * 
             * You should not typically need to call this method directly, but it
             * is left public should an extended class require it.
             * @param offset The offset in the vertices array of the quad to update.
             * @param x1 The top-left X coordinate of the quad, in normalized space (-0.5 to 0.5).
             * @param y1 The top-left Y coordinate of the quad, in normalized space (-0.5 to 0.5).
             * @param x2 The bottom-right X coordinate of the quad, in normalized space (-0.5 to 0.5).
             * @param y2 The bottom-right Y coordinate of the quad, in normalized space (-0.5 to 0.5).
             */
            updateQuad(offset: number, x1: number, y1: number, x2: number, y2: number): void;

            /**
             * Internally updates the UV coordinates across all vertices of the
             * given quad offset, based on the frame size.
             * 
             * You should not typically need to call this method directly, but it
             * is left public should an extended class require it.
             * @param offset The offset in the vertices array of the quad to update.
             * @param u1 The top-left U coordinate of the quad, in the range 0 to 1.
             * @param v1 The top-left V coordinate of the quad, in the range 0 to 1.
             * @param u2 The bottom-right U coordinate of the quad, in the range 0 to 1.
             * @param v2 The bottom-right V coordinate of the quad, in the range 0 to 1.
             */
            updateQuadUVs(offset: number, u1: number, v1: number, u2: number, v2: number): void;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint type to 'multiply',
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets a tint on this Game Object.
             * 
             * The tint applies a color to the pixel color values
             * from the GameObject's texture in one of several modes,
             * set with `setTintMode` or the `tintMode` property.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property.
             * 
             * To remove a tint call `clearTint`, or call this method with no parameters.
             * @param color The tint being applied to the entire Game Object. Default 0xffffff.
             * @returns This Game Object instance.
             */
            setTint(color?: number): this;

            /**
             * Sets the tint mode for this Game Object.
             * 
             * The tint mode applies a color to the pixel color values
             * from the GameObject's texture in one of several modes:
             * 
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * @param mode The tint mode to use. Default Phaser.TintModes.MULTIPLY.
             * @returns This Game Object instance.
             */
            setTintMode(mode?: Phaser.TintModes): this;

            /**
             * Does this Game Object have a tint applied?
             * 
             * It checks to see if the tint property is set to a value other than 0xffffff
             * or the tint mode is not the default Phaser.TintModes.MULTIPLY.
             * This indicates that a Game Object is tinted.
             */
            readonly isTinted: boolean;

            /**
             * The displayed width of this Game Object.
             * 
             * Setting this value will adjust the way in which this Nine Slice
             * object scales horizontally, if configured to do so.
             * 
             * The _minimum_ width this Game Object can be is the total of
             * `leftWidth` + `rightWidth`. If you need to display this object
             * at a smaller size, you can also scale it.
             */
            width: number;

            /**
             * The displayed height of this Game Object.
             * 
             * Setting this value will adjust the way in which this Nine Slice
             * object scales vertically, if configured to do so.
             * 
             * The _minimum_ height this Game Object can be is the total of
             * `topHeight` + `bottomHeight`. If you need to display this object
             * at a smaller size, you can also scale it.
             * 
             * If this is a 3-slice object, you can only stretch it horizontally
             * and changing the height will be ignored.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the size of this Game Object.
             * 
             * For a Nine Slice Game Object this means it will be stretched (or shrunk) horizontally
             * and vertically depending on the dimensions given to this method, in accordance with
             * how it has been configured for the various corner sizes.
             * 
             * If this is a 3-slice object, you can only stretch it horizontally
             * and changing the height will be ignored.
             * 
             * If you have enabled this Game Object for input, changing the size will also change the
             * size of the hit area.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the scale.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             */
            originY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Resets the size of this Nine Slice Game Object to match the current texture frame.
             * 
             * For a 3-slice object, this sets the height to match the frame height and refreshes
             * the UV coordinates. For a 9-slice object, only the UVs are refreshed. This is called
             * automatically when the texture frame changes and should not normally need to be
             * called directly.undefined
             * @returns This Game Object instance.
             */
            setSizeToFrame(): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * 
             * Calling this method will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.
             * @param frame The name or index of the frame within the Texture.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call change the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setTexture(key: string | Phaser.Textures.Texture, frame?: string | number, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * Represents a single vertex within a NineSlice Game Object.
         * 
         * A NineSlice Game Object is divided into a 3x3 grid of regions, each defined by a mesh
         * of vertices. This class stores all the data needed for one vertex: its normalized position
         * (x, y inherited from Vector2), its projected screen-space position (vx, vy), and its
         * UV texture coordinates (u, v) used during rendering.
         * 
         * You do not typically create NineSliceVertex instances directly. They are created and
         * managed internally by the NineSlice Game Object.
         */
        class NineSliceVertex extends Phaser.Math.Vector2 {
            /**
             * 
             * @param x The x position of the vertex.
             * @param y The y position of the vertex.
             * @param u The UV u coordinate of the vertex.
             * @param v The UV v coordinate of the vertex.
             */
            constructor(x: number, y: number, u: number, v: number);

            /**
             * The projected x coordinate of this vertex.
             */
            vx: number;

            /**
             * The projected y coordinate of this vertex.
             */
            vy: number;

            /**
             * UV u coordinate of this vertex.
             */
            u: number;

            /**
             * UV v coordinate of this vertex.
             */
            v: number;

            /**
             * Sets the UV texture coordinates of this vertex.
             * @param u The UV u coordinate of the vertex.
             * @param v The UV v coordinate of the vertex.
             * @returns This Vertex.
             */
            setUVs(u: number, v: number): this;

            /**
             * Updates this vertex's position and calculates its projected screen-space coordinates.
             * 
             * Sets the normalized `x` and `y` position, then scales them by the parent object's
             * `width` and `height` to produce the projected `vx` and `vy` values. The origin
             * offset of the parent object is then factored in, shifting `vx` and `vy` so that the
             * mesh is correctly aligned relative to the object's origin point.
             * @param x The x position of the vertex.
             * @param y The y position of the vertex.
             * @param width The width of the parent object.
             * @param height The height of the parent object.
             * @param originX The originX of the parent object.
             * @param originY The originY of the parent object.
             * @returns This Vertex.
             */
            resize(x: number, y: number, width: number, height: number, originX: number, originY: number): this;

        }

        /**
         * A Noise Game Object.
         * 
         * This game object is a quad which displays random noise.
         * You can manipulate this object like any other, make it interactive,
         * and use it in filters and masks to create visually stunning effects.
         * 
         * Behind the scenes, a Noise is a {@link Phaser.GameObjects.Shader}
         * using a specific shader program.
         * 
         * Noise or 'white noise' is simply random values.
         * These are created by hashing the offset pixel coordinates,
         * so the same noise is always created at the same position.
         * This creates a reproducible effect.
         * 
         * You can set the color and transparency of the noise.
         * 
         * You can scroll the noise by animating the `noiseOffset` property.
         * Note that floating-point precision is very important to this effect.
         * Scrolling very large distances may cause blockiness in the output.
         * Scrolling very small distances may cause the output to change completely,
         * as it is not processing the same exact values.
         * If you scroll by an exact fraction of the resolution of the object,
         * the output will remain mostly the same,
         * but it is not guaranteed to be stable.
         * It's more effective to use `setRenderToTexture` and use this as a texture
         * in a TileSprite.
         * 
         * You can set `noisePower` to sculpt the output levels.
         * Higher power reduces higher values.
         * Lower power reduces lower values.
         */
        class Noise extends Phaser.GameObjects.Shader {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param config The configuration for this Game Object.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             */
            constructor(scene: Phaser.Scene, config?: Phaser.Types.GameObjects.Noise.NoiseQuadConfig, x?: number, y?: number, width?: number, height?: number);

            /**
             * The offset of the noise in each dimension: [ x, y ].
             * Animate x and y to scroll the noise pattern.
             * 
             * This must be an array of 2 numbers.
             */
            noiseOffset: number[];

            /**
             * The power to apply to the noise value.
             * This can enhance/suppress high/low noise.
             */
            noisePower: number;

            /**
             * The color mapped to low noise values (approaching 0).
             * 
             * The default is black. You can set any color, and change the alpha.
             */
            noiseColorStart: Phaser.Display.Color;

            /**
             * The color mapped to high noise values (approaching 1).
             * 
             * The default is white. You can set any color, and change the alpha.
             */
            noiseColorEnd: Phaser.Display.Color;

            /**
             * Whether to render channel noise separately,
             * creating many colors of output.
             */
            noiseRandomChannels: boolean;

            /**
             * Whether to render a random normal value per pixel.
             * The normal is in the hemisphere facing the camera.
             * 
             * This value overrides `noiseRandomChannels`.
             */
            noiseRandomNormal: boolean;

            /**
             * Set the colors of the noise, from a variety of color formats.
             * 
             * - A number is expected to be a 24 or 32 bit RGB or ARGB value.
             * - A string is expected to be a hex code.
             * - An array of numbers is expected to be RGB or RGBA in the range 0-1.
             * - A Color object can be used.
             * @param start The color mapped to low noise values (approaching 0). Default 0x000000.
             * @param end The color mapped to high noise values (approaching 1). Default 0xffffff.
             * @returns This game object.
             */
            setNoiseColor(start?: number | string | number[] | Phaser.Display.Color, end?: number | string | number[] | Phaser.Display.Color): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A NoiseCell2D Game Object.
         * 
         * This game object is a quad which displays cellular noise.
         * You can manipulate this object like any other, make it interactive,
         * and use it in filters and masks to create visually stunning effects.
         * 
         * Behind the scenes, a NoiseCell2D is a {@link Phaser.GameObjects.Shader}
         * using a specific shader program.
         * 
         * Cellular noise, also called Worley Noise or Voronoi Noise,
         * consists of a pattern of cells. This is good for modeling natural phenomena
         * like waves, clouds, or scales.
         * 
         * You can set the color and transparency, cell count, variation,
         * and seed value of the noise.
         * You can change the detail level by increasing `noiseIterations`.
         * You can change the noise mode to output sharp edges, soft edges,
         * or flat colors for the cells.
         * 
         * You can scroll the noise by animating the `noiseOffset` property.
         * 
         * You can set `noiseNormalMap` to output a normal map.
         * This is a quick way to add texture for lighting.
         */
        class NoiseCell2D extends Phaser.GameObjects.Shader {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param config The configuration for this Game Object.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             */
            constructor(scene: Phaser.Scene, config?: Phaser.Types.GameObjects.NoiseCell2D.NoiseCell2DQuadConfig, x?: number, y?: number, width?: number, height?: number);

            /**
             * The number of cells in each dimension.
             * 
             * This must be an array of 2 numbers.
             * 
             * Try to keep the cell count between 2
             * and about an eighth of the resolution of the texture.
             * A cell count of 1 has no room to vary.
             * A cell count greater than the resolution of the texture
             * will essentially be expensive white noise.
             */
            noiseCells: number[];

            /**
             * How many cells wide the pattern is.
             * 
             * By default, this is set to the same dimensions as `noiseCells`.
             * This causes the output to wrap seamlessly at the edges.
             * To restore wrapping if you changed settings, call `this.wrapNoise()`.
             * 
             * A lower value causes the output to repeat.
             * 
             * A higher value breaks visible wrapping.
             * The cell pattern still repeats off-camera.
             * Try to keep this value as low as possible,
             * as it helps avoid floating-point precision errors.
             * 
             * This must be an array of 2 numbers.
             */
            noiseWrap: number[];

            /**
             * The offset of the noise in each dimension: [ x, y ].
             * Animate x and y to scroll the noise pattern.
             * 
             * This must be an array of 2 numbers.
             * 
             * Moving too far from 0 will introduce floating-point precision issues.
             * This can cause the noise to appear blocky.
             * We start to see obvious blockiness at offsets of a few thousand,
             * so stay below that.
             */
            noiseOffset: number[];

            /**
             * How much each cell can vary from its grid position.
             * High values break further from the grid.
             * 
             * At 0, cells are perfectly square.
             * At 1, cells are fully chaotic.
             * Never go higher than 1, as this can distort the cell matrix so much
             * that the nearest cell is outside the sampling range,
             * causing seams in the noise.
             */
            noiseVariation: number[];

            /**
             * How many octaves of noise to apply.
             * This adds fine detail to the noise, at the cost of performance.
             * 
             * Each octave of noise has twice the resolution,
             * and contributes half as much to the output.
             * 
             * This value should be an integer of 1 or higher.
             * Values above 5 or so have increasingly little effect.
             * Each iteration has a cost, so only use as much as you need!
             */
            noiseIterations: number;

            /**
             * What mode to output the noise in.
             * 
             * - 0: Sharp boundaries between cells.
             * - 1: Index mode. Cells have a single flat color.
             *   It is random and may not be unique.
             * - 2: Smooth boundaries between cells.
             *   Use `noiseSmoothing` to control smoothness.
             */
            noiseMode: number;

            /**
             * How much smoothing to apply in smoothing mode.
             * 
             * The default value is 1, which applies moderate smoothing between cells.
             * The value is a factor.
             * Values from 0-1 reduce the smoothing.
             * Values above 1 intensify the smoothing.
             * Intensification slows above 4 or so.
             */
            noiseSmoothing: number;

            /**
             * Whether to convert the noise output to a normal map.
             * 
             * This works properly with noise modes 0 and 2, which form curves.
             * 
             * Control the curvature strength with `noiseNormalScale`.
             */
            noiseNormalMap: boolean;

            /**
             * Curvature strength of normal map output.
             * This is used when `noiseNormalMap` is enabled.
             * 
             * The default is 1. Higher values produce more curvature;
             * lower values are flatter.
             * 
             * Surface angle is determined by the rate of change of the noise.
             * Noise with more iterations tends to change more rapidly,
             * thus have more pronounced normals.
             */
            noiseNormalScale: number;

            /**
             * The color of the middle of the cells.
             * 
             * The default is black. You can set any color, and change the alpha.
             */
            noiseColorStart: Phaser.Display.Color;

            /**
             * The color of the edge of the cells.
             * 
             * The default is white. You can set any color, and change the alpha.
             */
            noiseColorEnd: Phaser.Display.Color;

            /**
             * Seed values for the noise.
             * Vary these to change the shape of cells in the pattern.
             * A different seed creates a completely different pattern.
             * 
             * This must be an array of 8 numbers.
             * 
             * Noise seed values should be fairly small.
             * Numbers between 0 and 1, or 0 and 8, are recommended.
             * Very large seed values may lose floating-point precision
             * and cause the noise to appear blocky.
             */
            noiseSeed: number[];

            /**
             * Whether to jitter shader inputs to force continuous high precision.
             * This is an advanced setting.
             * 
             * Chromium browsers seem to switch between WebGL rendering modes,
             * which changes the precision available to the noise shader.
             * This can change the noise calculation, causing parts of the output
             * to flicker unpredictably.
             * The `keepAwake` setting adds an imperceptible amount to the offset
             * during rendering, which seems to force Chromium to be consistent
             * and eliminate the flickering.
             * 
             * Don't disable this unless you know what you're doing.
             * It prevents an unpredictable problem that might not appear in your
             * browser or device, but will appear for other users.
             */
            keepAwake: boolean;

            /**
             * Set the colors of the noise, from a variety of color formats.
             * 
             * - A number is expected to be a 24 or 32 bit RGB or ARGB value.
             * - A string is expected to be a hex code.
             * - An array of numbers is expected to be RGB or RGBA in the range 0-1.
             * - A Color object can be used.
             * @param start The color in the middle of the cells. Default 0x000000.
             * @param end The color at the edge of the cells. Default 0xffffff.
             * @returns This game object.
             */
            setNoiseColor(start?: number | string | number[] | Phaser.Display.Color, end?: number | string | number[] | Phaser.Display.Color): this;

            /**
             * Randomize the noise seed, creating a unique pattern.undefined
             * @returns This game object.
             */
            randomizeNoiseSeed(): this;

            /**
             * Set the noise texture to wrap seamlessly.
             * 
             * This sets `noiseWrap` to equal `noiseCells` in all dimensions.undefined
             * @returns This game object.
             */
            wrapNoise(): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A NoiseCell3D Game Object.
         * 
         * This game object is a quad which displays cellular noise.
         * You can manipulate this object like any other, make it interactive,
         * and use it in filters and masks to create visually stunning effects.
         * 
         * Behind the scenes, a NoiseCell3D is a {@link Phaser.GameObjects.Shader}
         * using a specific shader program.
         * 
         * Cellular noise, also called Worley Noise or Voronoi Noise,
         * consists of a pattern of cells. This is good for modeling natural phenomena
         * like waves, clouds, or scales.
         * 
         * You can set the color and transparency, cell count, variation,
         * and seed value of the noise.
         * You can change the detail level by increasing `noiseIterations`.
         * You can change the noise mode to output sharp edges, soft edges,
         * or flat colors for the cells.
         * 
         * You can scroll the noise by animating the `noiseOffset` property.
         * 
         * You can set `noiseNormalMap` to output a normal map.
         * This is a quick way to add texture for lighting.
         * 
         * The 3D version of NoiseCell has one extra dimension: Z.
         * The shader only renders the XY slice through the noise field.
         * Because the centers of cells typically lie elsewhere in the hypervolume,
         * cells appear with variation in brightness.
         * You can scroll on the Z axis to shift the slice, smoothly changing the cell pattern.
         */
        class NoiseCell3D extends Phaser.GameObjects.Shader {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param config The configuration for this Game Object.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             */
            constructor(scene: Phaser.Scene, config?: Phaser.Types.GameObjects.NoiseCell3D.NoiseCell3DQuadConfig, x?: number, y?: number, width?: number, height?: number);

            /**
             * The number of cells in each dimension.
             * 
             * This must be an array of 3 numbers.
             * 
             * Try to keep the cell count between 2
             * and about an eighth of the resolution of the texture.
             * A cell count of 1 has no room to vary.
             * A cell count greater than the resolution of the texture
             * will essentially be expensive white noise.
             */
            noiseCells: number[];

            /**
             * How many cells wide the pattern is.
             * 
             * By default, this is set to the same dimensions as `noiseCells`.
             * This causes the output to wrap seamlessly at the edges.
             * To restore wrapping if you changed settings, call `this.wrapNoise()`.
             * 
             * A lower value causes the output to repeat.
             * 
             * A higher value breaks visible wrapping.
             * The cell pattern still repeats off-camera.
             * Try to keep this value as low as possible,
             * as it helps avoid floating-point precision errors.
             * 
             * This must be an array of 3 numbers.
             */
            noiseWrap: number[];

            /**
             * The offset of the noise in each dimension: [ x, y, z ].
             * Animate x and y to scroll the noise pattern.
             * Animate z to smoothly change the noise pattern.
             * 
             * This must be an array of 3 numbers.
             * 
             * Moving too far from 0 will introduce floating-point precision issues.
             * This can cause the noise to appear blocky.
             * We start to see obvious blockiness at offsets of a few thousand,
             * so stay below that.
             * 
             * You can evolve the noise pattern by scrolling the Z axis.
             * However, this will eventually meet those floating-point precision issues.
             */
            noiseOffset: number[];

            /**
             * How much each cell can vary from its grid position.
             * High values break further from the grid.
             * 
             * At 0, cells are perfectly square.
             * At 1, cells are fully chaotic.
             * Never go higher than 1, as this can distort the cell matrix so much
             * that the nearest cell is outside the sampling range,
             * causing seams in the noise.
             */
            noiseVariation: number[];

            /**
             * How many octaves of noise to apply.
             * This adds fine detail to the noise, at the cost of performance.
             * 
             * Each octave of noise has twice the resolution,
             * and contributes half as much to the output.
             * 
             * This value should be an integer of 1 or higher.
             * Values above 5 or so have increasingly little effect.
             * Each iteration has a cost, so only use as much as you need!
             */
            noiseIterations: number;

            /**
             * What mode to output the noise in.
             * 
             * - 0: Sharp boundaries between cells.
             * - 1: Index mode. Cells have a single flat color.
             *   The color assigned to each cell is random and may not be unique across cells.
             * - 2: Smooth boundaries between cells.
             *   Use `noiseSmoothing` to control smoothness.
             */
            noiseMode: number;

            /**
             * How much smoothing to apply in smoothing mode.
             * 
             * The default value is 1, which applies moderate smoothing between cells.
             * The value is a factor.
             * Values from 0-1 reduce the smoothing.
             * Values above 1 intensify the smoothing.
             * Intensification slows above 4 or so.
             */
            noiseSmoothing: number;

            /**
             * Whether to convert the noise output to a normal map.
             * 
             * This works properly with noise modes 0 and 2, which form curves.
             * 
             * Control the curvature strength with `noiseNormalScale`.
             */
            noiseNormalMap: boolean;

            /**
             * Curvature strength of normal map output.
             * This is used when `noiseNormalMap` is enabled.
             * 
             * The default is 1. Higher values produce more curvature;
             * lower values are flatter.
             * 
             * Surface angle is determined by the rate of change of the noise.
             * Noise with more iterations tends to change more rapidly,
             * thus have more pronounced normals.
             */
            noiseNormalScale: number;

            /**
             * The color of the middle of the cells.
             * 
             * The default is black. You can set any color, and change the alpha.
             */
            noiseColorStart: Phaser.Display.Color;

            /**
             * The color of the edge of the cells.
             * 
             * The default is white. You can set any color, and change the alpha.
             */
            noiseColorEnd: Phaser.Display.Color;

            /**
             * Seed values for the noise.
             * Vary these to change the shape of cells in the pattern.
             * A different seed creates a completely different pattern.
             * 
             * This must be an array of 12 numbers.
             * 
             * Noise seed values should be fairly small.
             * Numbers between 0 and 1, or 0 and 12, are recommended.
             * Very large seed values may lose floating-point precision
             * and cause the noise to appear blocky.
             */
            noiseSeed: number[];

            /**
             * Whether to jitter shader inputs to force continuous high precision.
             * This is an advanced setting.
             * 
             * Chromium browsers seem to switch between WebGL rendering modes,
             * which changes the precision available to the noise shader.
             * This can change the noise calculation, causing parts of the output
             * to flicker unpredictably.
             * The `keepAwake` setting adds an imperceptible amount to the offset
             * during rendering, which seems to force Chromium to be consistent
             * and eliminate the flickering.
             * 
             * Don't disable this unless you know what you're doing.
             * It prevents an unpredictable problem that might not appear in your
             * browser or device, but will appear for other users.
             */
            keepAwake: boolean;

            /**
             * Set the colors of the noise, from a variety of color formats.
             * 
             * - A number is expected to be a 24 or 32 bit RGB or ARGB value.
             * - A string is expected to be a hex code.
             * - An array of numbers is expected to be RGB or RGBA in the range 0-1.
             * - A Color object can be used.
             * @param start The color in the middle of the cells. Default 0x000000.
             * @param end The color at the edge of the cells. Default 0xffffff.
             * @returns This game object.
             */
            setNoiseColor(start?: number | string | number[] | Phaser.Display.Color, end?: number | string | number[] | Phaser.Display.Color): this;

            /**
             * Randomize the noise seed, creating a unique pattern.undefined
             * @returns This game object.
             */
            randomizeNoiseSeed(): this;

            /**
             * Set the noise texture to wrap seamlessly.
             * 
             * This sets `noiseWrap` to equal `noiseCells` in all dimensions.undefined
             * @returns This game object.
             */
            wrapNoise(): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A NoiseCell4D Game Object.
         * 
         * This game object is a quad which displays cellular noise.
         * You can manipulate this object like any other, make it interactive,
         * and use it in filters and masks to create visually stunning effects.
         * 
         * Behind the scenes, a NoiseCell4D is a {@link Phaser.GameObjects.Shader}
         * using a specific shader program.
         * 
         * Cellular noise, also called Worley Noise or Voronoi Noise,
         * consists of a pattern of cells. This is good for modeling natural phenomena
         * like waves, clouds, or scales.
         * 
         * You can set the color and transparency, cell count, variation,
         * and seed value of the noise.
         * You can change the detail level by increasing `noiseIterations`.
         * You can change the noise mode to output sharp edges, soft edges,
         * or flat colors for the cells.
         * 
         * You can scroll the noise by animating the `noiseOffset` property.
         * 
         * You can set `noiseNormalMap` to output a normal map.
         * This is a quick way to add texture for lighting.
         * 
         * The 4D version of NoiseCell has two extra dimensions: Z and W.
         * The shader only renders the XY slice through the noise field.
         * Because the centers of cells typically lie elsewhere in the hypervolume,
         * cells appear with variation in brightness.
         * You can scroll on the Z axis to shift the slice, smoothly changing the cell pattern.
         * In 4D, you can instead move the ZW offset in a circle,
         * creating a constantly changing pattern which repeats without reversing
         * or resetting.
         * This ZW circling technique is advised for long-term effects,
         * because it avoids large offsets which can cause floating-point precision issues.
         */
        class NoiseCell4D extends Phaser.GameObjects.Shader {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param config The configuration for this Game Object.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             */
            constructor(scene: Phaser.Scene, config?: Phaser.Types.GameObjects.NoiseCell4D.NoiseCell4DQuadConfig, x?: number, y?: number, width?: number, height?: number);

            /**
             * The number of cells in each dimension.
             * 
             * This must be an array of 4 numbers.
             * 
             * Try to keep the cell count between 2
             * and about an eighth of the resolution of the texture.
             * A cell count of 1 has no room to vary.
             * A cell count greater than the resolution of the texture
             * will essentially be expensive white noise.
             */
            noiseCells: number[];

            /**
             * How many cells wide the pattern is.
             * 
             * By default, this is set to the same dimensions as `noiseCells`.
             * This causes the output to wrap seamlessly at the edges.
             * To restore wrapping if you changed settings, call `this.wrapNoise()`.
             * 
             * A lower value causes the output to repeat.
             * 
             * A higher value breaks visible wrapping.
             * The cell pattern still repeats off-camera.
             * Try to keep this value as low as possible,
             * as it helps avoid floating-point precision errors.
             * 
             * This must be an array of 4 numbers.
             */
            noiseWrap: number[];

            /**
             * The offset of the noise in each dimension: [ x, y, z, w ].
             * Animate x and y to scroll the noise pattern.
             * Animate z and w to smoothly change the noise pattern.
             * 
             * This must be an array of 4 numbers.
             * 
             * Moving too far from 0 will introduce floating-point precision issues.
             * This can cause the noise to appear blocky.
             * We start to see obvious blockiness at offsets of a few thousand,
             * so stay below that.
             * 
             * You can evolve the noise pattern by scrolling the Z axis.
             * However, this will eventually meet those floating-point precision issues.
             * 
             * In four dimensions, you can instead evolve the noise pattern
             * by moving along a circle in the ZW plane.
             * This changes the pattern smoothly, without leaving the safe region,
             * and without needing to stop and reverse or reset.
             * 4D noise is very useful for continuously scrolling patterns.
             */
            noiseOffset: number[];

            /**
             * How much each cell can vary from its grid position.
             * High values break further from the grid.
             * 
             * At 0, cells are perfectly square.
             * At 1, cells are fully chaotic.
             * Never go higher than 1, as this can distort the cell matrix so much
             * that the nearest cell is outside the sampling range,
             * causing seams in the noise.
             */
            noiseVariation: number[];

            /**
             * How many octaves of noise to apply.
             * This adds fine detail to the noise, at the cost of performance.
             * 
             * Each octave of noise has twice the resolution,
             * and contributes half as much to the output.
             * 
             * This value should be an integer of 1 or higher.
             * Values above 5 or so have increasingly little effect.
             * Each iteration has a cost, so only use as much as you need!
             */
            noiseIterations: number;

            /**
             * What mode to output the noise in.
             * 
             * - 0: Sharp boundaries between cells.
             * - 1: Index mode. Cells have a single flat color.
             *   It is random and may not be unique.
             * - 2: Smooth boundaries between cells.
             *   Use `noiseSmoothing` to control smoothness.
             */
            noiseMode: number;

            /**
             * How much smoothing to apply in smoothing mode.
             * 
             * The default value is 1, which applies moderate smoothing between cells.
             * The value is a factor.
             * Values from 0-1 reduce the smoothing.
             * Values above 1 intensify the smoothing.
             * Intensification slows above 4 or so.
             */
            noiseSmoothing: number;

            /**
             * Whether to convert the noise output to a normal map.
             * 
             * This works properly with noise modes 0 and 2, which form curves.
             * 
             * Control the curvature strength with `noiseNormalScale`.
             */
            noiseNormalMap: boolean;

            /**
             * Curvature strength of normal map output.
             * This is used when `noiseNormalMap` is enabled.
             * 
             * The default is 1. Higher values produce more curvature;
             * lower values are flatter.
             * 
             * Surface angle is determined by the rate of change of the noise.
             * Noise with more iterations tends to change more rapidly,
             * thus have more pronounced normals.
             */
            noiseNormalScale: number;

            /**
             * The color of the middle of the cells.
             * 
             * The default is black. You can set any color, and change the alpha.
             */
            noiseColorStart: Phaser.Display.Color;

            /**
             * The color of the edge of the cells.
             * 
             * The default is white. You can set any color, and change the alpha.
             */
            noiseColorEnd: Phaser.Display.Color;

            /**
             * Seed values for the noise.
             * Vary these to change the shape of cells in the pattern.
             * A different seed creates a completely different pattern.
             * 
             * This must be an array of 16 numbers.
             * 
             * Noise seed values should be fairly small.
             * Numbers between 0 and 1, or 0 and 16, are recommended.
             * Very large seed values may lose floating-point precision
             * and cause the noise to appear blocky.
             */
            noiseSeed: number[];

            /**
             * Whether to jitter shader inputs to force continuous high precision.
             * This is an advanced setting.
             * 
             * Chromium browsers seem to switch between WebGL rendering modes,
             * which changes the precision available to the noise shader.
             * This can change the noise calculation, causing parts of the output
             * to flicker unpredictably.
             * The `keepAwake` setting adds an imperceptible amount to the offset
             * during rendering, which seems to force Chromium to be consistent
             * and eliminate the flickering.
             * 
             * Don't disable this unless you know what you're doing.
             * It prevents an unpredictable problem that might not appear in your
             * browser or device, but will appear for other users.
             */
            keepAwake: boolean;

            /**
             * Set the colors of the noise, from a variety of color formats.
             * 
             * - A number is expected to be a 24 or 32 bit RGB or ARGB value.
             * - A string is expected to be a hex code.
             * - An array of numbers is expected to be RGB or RGBA in the range 0-1.
             * - A Color object can be used.
             * @param start The color in the middle of the cells. Default 0x000000.
             * @param end The color at the edge of the cells. Default 0xffffff.
             * @returns This game object.
             */
            setNoiseColor(start?: number | string | number[] | Phaser.Display.Color, end?: number | string | number[] | Phaser.Display.Color): this;

            /**
             * Randomize the noise seed, creating a unique pattern.undefined
             * @returns This game object.
             */
            randomizeNoiseSeed(): this;

            /**
             * Set the noise texture to wrap seamlessly.
             * 
             * This sets `noiseWrap` to equal `noiseCells` in all dimensions.undefined
             * @returns This game object.
             */
            wrapNoise(): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A NoiseSimplex2D object.
         * 
         * This game object is a quad which displays simplex noise.
         * You can manipulate this object like any other, make it interactive,
         * and use it in filters and masks to create visually stunning effects.
         * 
         * Behind the scenes, a NoiseSimplex2D is a {@see Phaser.GameObjects.Shader}
         * using a specific shader program.
         * 
         * Simplex noise is a smooth pattern ideal for soft, natural phenomena.
         * It is useful for clouds, flame, water, and many other effects.
         * Ken Perlin, the creator of Perlin Noise, created Simplex Noise
         * to improve performance and quality over the original.
         * 
         * By default, the noise pattern is periodic: it repeats.
         * You can scroll in X and Y.
         * You can also change the `noiseFlow` value to evolve the pattern
         * along a periodic course.
         * 
         * You can set the cell count, color and transparency of the pattern.
         * You can add fine detail with `noiseIterations`.
         * You can add turbulence with `noiseWarpAmount`.
         * 
         * You can change the basic pattern with `noiseSeed`.
         * Different seeds create completely different patterns.
         * 
         * You can set `noiseNormalMap` to output a normal map.
         * This is a quick way to add texture for lighting.
         * 
         * For advanced users, you can configure the characteristics of octave iteration.
         * Use `noiseDetailPower`, `noiseFlowPower`, and `noiseContributionPower`
         * to adjust the exponential scaling rate of these values.
         * Use `noiseWarpDetailPower`, `noiseWarpFlowPower`, and
         * `noiseWarpContributionPower` to do the same for the warp effect.
         */
        class NoiseSimplex2D extends Phaser.GameObjects.Shader {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param config The configuration for this Game Object.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             */
            constructor(scene: Phaser.Scene, config?: Phaser.Types.GameObjects.NoiseSimplex2D.NoiseSimplex2DQuadConfig, x?: number, y?: number, width?: number, height?: number);

            /**
             * The number of cells in each dimension.
             * 
             * This must be an array of 2 numbers.
             * 
             * Try to keep the cell count between 2
             * and about an eighth of the resolution of the texture.
             * A cell count greater than the resolution of the texture
             * will essentially be expensive white noise.
             */
            noiseCells: number[];

            /**
             * The number of cells before the pattern wraps.
             * 
             * This must be an array of 2 numbers.
             * 
             * By default, this is the same as `noiseCells`.
             */
            noisePeriod: number[];

            /**
             * The offset of the noise in each dimension: [ x, y ].
             * Animate x and y to scroll the noise pattern.
             * 
             * This must be an array of 2 numbers.
             */
            noiseOffset: number[];

            /**
             * The current flow of the noise field.
             * The pattern changes in place with flow.
             * This is a rotation, so the pattern returns to its original state
             * after flow increases by PI * 2.
             * 
             * Use flow to evolve the pattern over time with periodic repeats.
             */
            noiseFlow: number;

            /**
             * How much to warp the noise texture.
             * Warp can add a sense of turbulence to the output.
             * 
             * This runs several octaves of noise to generate a random warp offset.
             * It adds to the expense of the shader.
             */
            noiseWarpAmount: number;

            /**
             * How many octaves of noise to apply.
             * This adds fine detail to the noise, at the cost of performance.
             * 
             * This value should be an integer of 1 or higher.
             * Values above 5 or so have increasingly little effect.
             * Each iteration has a cost, so only use as much as you need!
             * 
             * Use `noiseDetailPower`, `noiseFlowPower` and `noiseContributionPower`
             * to configure differences between octaves.
             */
            noiseIterations: number;

            /**
             * How many octaves of noise to apply when warping the noise.
             * 
             * This behaves much like `noiseIterations`,
             * but is used in the warp calculations instead.
             * It is only used when `noiseWarpAmount` is not 0.
             * You may need fewer warp iterations than regular iterations.
             */
            noiseWarpIterations: number;

            /**
             * How much to increase detail frequency between noise octaves.
             * 
             * This is used as the base of an exponent.
             * The default 2 doubles the frequency every octave.
             * Lower values scale slower.
             * Higher values scale higher.
             */
            noiseDetailPower: number;

            /**
             * How much to increase flow progression between noise octaves.
             * 
             * This is used as the base of an exponent.
             * The default 2 doubles the flow progression every octave.
             * Lower values scale slower.
             * Higher values scale higher.
             */
            noiseFlowPower: number;

            /**
             * How much value to take from subsequent noise octaves.
             * 
             * This is used as the base of an exponent.
             * The default 2 halves the contribution every octave.
             * Lower values decay slower, prioritize high frequency detail.
             * Higher values decay faster, prioritize low frequency detail.
             */
            noiseContributionPower: number;

            /**
             * How much to increase detail frequency between noise octaves
             * in the warp.
             * 
             * This is used as the base of an exponent.
             * The default 2 doubles the frequency every octave.
             * Lower values scale slower.
             * Higher values scale higher.
             */
            noiseWarpDetailPower: number;

            /**
             * How much to increase flow progression between noise octaves
             * in the warp.
             * 
             * This is used as the base of an exponent.
             * The default 2 doubles the flow progression every octave.
             * Lower values scale slower.
             * Higher values scale higher.
             */
            noiseWarpFlowPower: number;

            /**
             * How much value to take from subsequent noise octaves
             * in the warp.
             * 
             * This is used as the base of an exponent.
             * The default 2 halves the contribution every octave.
             * Lower values decay slower, prioritize high frequency detail.
             * Higher values decay faster, prioritize low frequency detail.
             */
            noiseWarpContributionPower: number;

            /**
             * Whether to convert the noise output to a normal map.
             * 
             * Control the curvature strength with `noiseNormalScale`.
             */
            noiseNormalMap: boolean;

            /**
             * Curvature strength of normal map output.
             * This is used when `noiseNormalMap` is enabled.
             * 
             * The default is 1. Higher values produce more curvature;
             * lower values are flatter.
             * 
             * Surface angle is determined by the rate of change of the noise.
             */
            noiseNormalScale: number;

            /**
             * Factor applied to the raw noise output.
             * 
             * Raw noise is emitted in the range -1 to 1.
             * It is adjusted by (rawNoise * noiseValueFactor + noiseValueAdd) ^ noiseValuePower.
             */
            noiseValueFactor: number;

            /**
             * Value added to the raw noise output.
             * 
             * Raw noise is emitted in the range -1 to 1.
             * It is adjusted by (rawNoise * noiseValueFactor + noiseValueAdd) ^ noiseValuePower.
             */
            noiseValueAdd: number;

            /**
             * Exponent applied to the raw noise output.
             * 
             * Raw noise is emitted in the range -1 to 1.
             * It is adjusted by (rawNoise * noiseValueFactor + noiseValueAdd) ^ noiseValuePower.
             */
            noiseValuePower: number;

            /**
             * The color when the adjusted noise value is 0.
             * This blends with noiseColorEnd.
             * 
             * The default is black. You can set any color, and change the alpha.
             */
            noiseColorStart: Phaser.Display.Color;

            /**
             * The color when the adjusted noise value is 1.
             * This blends with noiseColorStart.
             * 
             * The default is white. You can set any color, and change the alpha.
             */
            noiseColorEnd: Phaser.Display.Color;

            /**
             * The seed for the noise.
             * 
             * This offsets the simplex grid, causing its hashes to evaluate
             * differently. Any change to the seed results in a new pattern.
             * It must be an array of 2 numbers.
             * 
             * Use a custom seed to create different, but reproducible,
             * randomness.
             */
            noiseSeed: number[];

            /**
             * Set the colors of the noise, from a variety of color formats.
             * 
             * - A number is expected to be a 24 or 32 bit RGB or ARGB value.
             * - A string is expected to be a hex code.
             * - An array of numbers is expected to be RGB or RGBA in the range 0-1.
             * - A Color object can be used.
             * @param start The color when the noise value is 0, corresponding to `noiseColorStart`. Default 0x000000.
             * @param end The color when the noise value is 1, corresponding to `noiseColorEnd`. Default 0xffffff.
             * @returns This game object.
             */
            setNoiseColor(start?: number | string | number[] | Phaser.Display.Color, end?: number | string | number[] | Phaser.Display.Color): this;

            /**
             * Randomize the noise seed, creating a unique pattern.undefined
             * @returns This game object.
             */
            randomizeNoiseSeed(): this;

            /**
             * Set the noise texture to wrap seamlessly.
             * 
             * This sets `noisePeriod` to equal `noiseCells` in all dimensions.undefined
             * @returns This game object.
             */
            wrapNoise(): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A NoiseSimplex3D object.
         * 
         * This game object is a quad which displays simplex noise.
         * You can manipulate this object like any other, make it interactive,
         * and use it in filters and masks to create visually stunning effects.
         * 
         * Behind the scenes, a NoiseSimplex3D is a {@see Phaser.GameObjects.Shader}
         * using a specific shader program.
         * 
         * Simplex noise is a smooth pattern ideal for soft, natural phenomena.
         * It is useful for clouds, flame, water, and many other effects.
         * Ken Perlin, the creator of Perlin Noise, created Simplex Noise
         * to improve performance and quality over the original.
         * 
         * By default, the noise pattern is periodic: it repeats.
         * You can scroll in X, Y, and Z.
         * You can also change the `noiseFlow` value to evolve the pattern
         * along a periodic course. This is useful to avoid scrolling into
         * regions of reduced floating-point precision with very large numbers.
         * 
         * You can set the cell count, color and transparency of the pattern.
         * You can add fine detail with `noiseIterations`.
         * You can add turbulence with `noiseWarpAmount`.
         * 
         * You can change the basic pattern with `noiseSeed`.
         * Different seeds create completely different patterns.
         * You must use integers for the seed, or bad things will happen.
         * 
         * You can set `noiseNormalMap` to output a normal map.
         * This is a quick way to add texture for lighting.
         * 
         * For advanced users, you can configure the characteristics of octave iteration.
         * Use `noiseDetailPower`, `noiseFlowPower`, and `noiseContributionPower`
         * to adjust the exponential scaling rate of these values.
         * Use `noiseWarpDetailPower`, `noiseWarpFlowPower`, and
         * `noiseWarpContributionPower` to do the same for the warp effect.
         */
        class NoiseSimplex3D extends Phaser.GameObjects.Shader {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param config The configuration for this Game Object.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             */
            constructor(scene: Phaser.Scene, config?: Phaser.Types.GameObjects.NoiseSimplex3D.NoiseSimplex3DQuadConfig, x?: number, y?: number, width?: number, height?: number);

            /**
             * The number of cells in each dimension.
             * 
             * This must be an array of 3 numbers.
             * 
             * Try to keep the cell count between 2
             * and about an eighth of the resolution of the texture.
             * A cell count greater than the resolution of the texture
             * will essentially be expensive white noise.
             */
            noiseCells: number[];

            /**
             * The number of cells before the pattern wraps.
             * 
             * This must be an array of 3 numbers.
             * 
             * By default, this is the same as `noiseCells`.
             */
            noisePeriod: number[];

            /**
             * The offset of the noise in each dimension: [ x, y, z ].
             * Animate x and y to scroll the noise pattern.
             * Animate z to change the noise pattern by shifting the volume slice.
             * 
             * This must be an array of 3 numbers.
             */
            noiseOffset: number[];

            /**
             * The current flow of the noise field.
             * The pattern changes in place with flow.
             * This is a rotation, so the pattern returns to its original state
             * after flow increases by PI * 2.
             * 
             * Use flow to evolve the pattern over time with periodic repeats.
             */
            noiseFlow: number;

            /**
             * How much to warp the noise texture.
             * Warp can add a sense of turbulence to the output.
             * 
             * This runs several octaves of noise to generate a random warp offset.
             * It adds to the expense of the shader.
             */
            noiseWarpAmount: number;

            /**
             * How many octaves of noise to apply.
             * This adds fine detail to the noise, at the cost of performance.
             * 
             * This value should be an integer of 1 or higher.
             * Values above 5 or so have increasingly little effect.
             * Each iteration has a cost, so only use as much as you need!
             * 
             * Use `noiseDetailPower`, `noiseFlowPower` and `noiseContributionPower`
             * to configure differences between octaves.
             */
            noiseIterations: number;

            /**
             * How many octaves of noise to apply when warping the noise.
             * 
             * This behaves much like `noiseIterations`,
             * but is used in the warp calculations instead.
             * It is only used when `noiseWarpAmount` is not 0.
             * You may need fewer warp iterations than regular iterations.
             */
            noiseWarpIterations: number;

            /**
             * How much to increase detail frequency between noise octaves.
             * 
             * This is used as the base of an exponent.
             * The default 2 doubles the frequency every octave.
             * Lower values scale slower.
             * Higher values scale higher.
             */
            noiseDetailPower: number;

            /**
             * How much to increase flow progression between noise octaves.
             * 
             * This is used as the base of an exponent.
             * The default 2 doubles the frequency every octave.
             * Lower values scale slower.
             * Higher values scale higher.
             */
            noiseFlowPower: number;

            /**
             * How much value to take from subsequent noise octaves.
             * 
             * This is used as the base of an exponent.
             * The default 2 halves the contribution every octave.
             * Lower values decay slower, prioritize high frequency detail.
             * Higher values decay faster, prioritize low frequency detail.
             */
            noiseContributionPower: number;

            /**
             * How much to increase detail frequency between noise octaves
             * in the warp.
             * 
             * This is used as the base of an exponent.
             * The default 2 doubles the frequency every octave.
             * Lower values scale slower.
             * Higher values scale higher.
             */
            noiseWarpDetailPower: number;

            /**
             * How much to increase flow progression between noise octaves
             * in the warp.
             * 
             * This is used as the base of an exponent.
             * The default 2 doubles the frequency every octave.
             * Lower values scale slower.
             * Higher values scale higher.
             */
            noiseWarpFlowPower: number;

            /**
             * How much value to take from subsequent noise octaves
             * in the warp.
             * 
             * This is used as the base of an exponent.
             * The default 2 halves the contribution every octave.
             * Lower values decay slower, prioritize high frequency detail.
             * Higher values decay faster, prioritize low frequency detail.
             */
            noiseWarpContributionPower: number;

            /**
             * Whether to convert the noise output to a normal map.
             * 
             * Control the curvature strength with `noiseNormalScale`.
             */
            noiseNormalMap: boolean;

            /**
             * Curvature strength of normal map output.
             * This is used when `noiseNormalMap` is enabled.
             * 
             * The default is 1. Higher values produce more curvature;
             * lower values are flatter.
             * 
             * Surface angle is determined by the rate of change of the noise.
             */
            noiseNormalScale: number;

            /**
             * Factor applied to the raw noise output.
             * 
             * Raw noise is emitted in the range -1 to 1.
             * It is adjusted by (rawNoise * noiseValueFactor + noiseValueAdd) ^ noiseValuePower.
             */
            noiseValueFactor: number;

            /**
             * Value added to the raw noise output.
             * 
             * Raw noise is emitted in the range -1 to 1.
             * It is adjusted by (rawNoise * noiseValueFactor + noiseValueAdd) ^ noiseValuePower.
             */
            noiseValueAdd: number;

            /**
             * Exponent applied to the raw noise output.
             * 
             * Raw noise is emitted in the range -1 to 1.
             * It is adjusted by (rawNoise * noiseValueFactor + noiseValueAdd) ^ noiseValuePower.
             */
            noiseValuePower: number;

            /**
             * The color when the adjusted noise value is 0.
             * This blends with noiseColorEnd.
             * 
             * The default is black. You can set any color, and change the alpha.
             */
            noiseColorStart: Phaser.Display.Color;

            /**
             * The color when the adjusted noise value is 1.
             * This blends with noiseColorStart.
             * 
             * The default is white. You can set any color, and change the alpha.
             */
            noiseColorEnd: Phaser.Display.Color;

            /**
             * The seed for the noise.
             * 
             * This offsets the simplex grid, causing its hashes to evaluate
             * differently. Any change to the seed results in a new pattern.
             * It must be an array of 3 integers.
             * 
             * Use a custom seed to create different, but reproducible,
             * randomness.
             */
            noiseSeed: number[];

            /**
             * Set the colors of the noise, from a variety of color formats.
             * 
             * - A number is expected to be a 24 or 32 bit RGB or ARGB value.
             * - A string is expected to be a hex code.
             * - An array of numbers is expected to be RGB or RGBA in the range 0-1.
             * - A Color object can be used.
             * @param start The color when the adjusted noise value is 0 (minimum). Defaults to black. Default 0x000000.
             * @param end The color when the adjusted noise value is 1 (maximum). Defaults to white. Default 0xffffff.
             * @returns This game object.
             */
            setNoiseColor(start?: number | string | number[] | Phaser.Display.Color, end?: number | string | number[] | Phaser.Display.Color): this;

            /**
             * Randomize the noise seed, creating a unique pattern.undefined
             * @returns This game object.
             */
            randomizeNoiseSeed(): this;

            /**
             * Set the noise texture to wrap seamlessly.
             * 
             * This sets `noisePeriod` to equal `noiseCells` in all dimensions.undefined
             * @returns This game object.
             */
            wrapNoise(): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        namespace Particles {
            /**
             * A specialized emitter op that manages the `color` property of a Particle over
             * its lifetime. Unlike scalar emitter ops, `EmitterColorOp` accepts an array of
             * hexadecimal color values (e.g. `[0xff0000, 0x00ff00, 0x0000ff]`) and smoothly
             * interpolates between them as the particle ages, producing gradient color
             * transitions from birth to death.
             * 
             * The color array is decomposed into separate red, green, and blue component
             * arrays on configuration, and a linear interpolation function is used each
             * update step to recombine them into the current packed RGB color value.
             * 
             * This class is created and managed automatically by the `ParticleEmitter` when
             * a `color` property is present in the emitter configuration; you do not normally
             * need to instantiate it directly.
             * 
             * See the `ParticleEmitter` class for more details on emitter op configuration.
             */
            class EmitterColorOp extends Phaser.GameObjects.Particles.EmitterOp {
                /**
                 * 
                 * @param key The name of the property.
                 */
                constructor(key: string);

                /**
                 * An array containing the red color values.
                 * 
                 * Populated during the `setMethods` method.
                 */
                r: number[];

                /**
                 * An array containing the green color values.
                 * 
                 * Populated during the `setMethods` method.
                 */
                g: number[];

                /**
                 * An array containing the blue color values.
                 * 
                 * Populated during the `setMethods` method.
                 */
                b: number[];

                /**
                 * Checks the type of `EmitterOp.propertyValue` to determine which
                 * method is required in order to return values from this op function.undefined
                 * @returns Either `0` if no color property value is set, or `9` if a color array is configured. The result should be passed to `setMethods`.
                 */
                getMethod(): number;

                /**
                 * Configures the emit and update callbacks for this color op based on the
                 * current `method` value. When a color array is present (method 9), it
                 * decomposes each packed hex color in `propertyValue` into separate red,
                 * green, and blue component arrays, sets up the linear easing and
                 * interpolation functions, and assigns the eased emit and update handlers.
                 * If no color value is set (method 0), the default no-op handlers are used.undefined
                 * @returns This Emitter Op object.
                 */
                setMethods(): this;

                /**
                 * Sets the Ease function to use for Color interpolation.
                 * @param ease The string-based name of the Ease function to use.
                 */
                setEase(ease: string): void;

                /**
                 * An `onEmit` callback for an eased property.
                 * 
                 * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate}.
                 * @param particle The particle.
                 * @param key The name of the property.
                 * @returns {@link Phaser.GameObjects.Particles.EmitterColorOp#start}, as the new value of the property.
                 */
                easedValueEmit(particle: Phaser.GameObjects.Particles.Particle, key: string): number;

                /**
                 * An `onUpdate` callback that returns an interpolated packed RGB color value
                 * across the configured color array, based on the particle's current
                 * normalized lifetime.
                 * @param particle The particle.
                 * @param key The name of the property.
                 * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
                 * @returns The new value of the property.
                 */
                easeValueUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number): number;

            }

            /**
             * This class is responsible for taking control over a single property
             * in the Particle class and managing its emission and updating functions.
             * 
             * Particles properties such as `x`, `y`, `scaleX`, `lifespan` and others all use
             * EmitterOp instances to manage them, as they can be given in a variety of
             * formats: from simple values, to functions, to dynamic callbacks.
             * 
             * See the `ParticleEmitter` class for more details on emitter op configuration.
             */
            class EmitterOp {
                /**
                 * 
                 * @param key The name of the property.
                 * @param defaultValue The default value of the property.
                 * @param emitOnly Whether the property can only be modified when a Particle is emitted. Default false.
                 */
                constructor(key: string, defaultValue: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType, emitOnly?: boolean);

                /**
                 * The name of this property.
                 */
                propertyKey: string;

                /**
                 * The current value of this property.
                 * 
                 * This can be a simple value, an array, a function or an onEmit
                 * configuration object.
                 */
                propertyValue: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;

                /**
                 * The default value of this property.
                 * 
                 * This can be a simple value, an array, a function or an onEmit
                 * configuration object.
                 */
                defaultValue: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;

                /**
                 * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and
                 * {@link Phaser.GameObjects.Particles.EmitterOp#end} values, per emit.
                 */
                steps: number;

                /**
                 * The step counter for stepped easing, per emit.
                 */
                counter: number;

                /**
                 * When the step counter reaches its maximum, should it then
                 * yoyo back to the start again, or flip over to it?
                 */
                yoyo: boolean;

                /**
                 * The counter direction. 0 for up and 1 for down.
                 */
                direction: number;

                /**
                 * The start value for this property to ease between.
                 * 
                 * If an interpolation this holds a reference to the number data array.
                 */
                start: number | number[];

                /**
                 * The most recently calculated value. Updated every time an
                 * emission or update method is called. Treat as read-only.
                 */
                current: number;

                /**
                 * The end value for this property to ease between.
                 */
                end: number;

                /**
                 * The easing function to use for updating this property, if any.
                 */
                ease: Function | null;

                /**
                 * The interpolation function to use for updating this property, if any.
                 */
                interpolation: Function | null;

                /**
                 * Whether this property can only be modified when a Particle is emitted.
                 * 
                 * Set to `true` to allow only {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} callbacks to be set and
                 * affect this property.
                 * 
                 * Set to `false` to allow both {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and
                 * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks to be set and affect this property.
                 */
                emitOnly: boolean;

                /**
                 * The callback to run for Particles when they are emitted from the Particle Emitter.
                 */
                onEmit: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback;

                /**
                 * The callback to run for Particles when they are updated.
                 */
                onUpdate: Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback;

                /**
                 * Set to `false` to disable this EmitterOp.
                 */
                active: boolean;

                /**
                 * The onEmit method type of this EmitterOp.
                 * 
                 * Set as part of `setMethod` and cached here to avoid
                 * re-setting when only the value changes.
                 */
                method: number;

                /**
                 * Load the property from a Particle Emitter configuration object.
                 * 
                 * Optionally accepts a new property key to use, replacing the current one.
                 * @param config Settings for the Particle Emitter that owns this property.
                 * @param newKey The new key to use for this property, if any.
                 */
                loadConfig(config?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig, newKey?: string): void;

                /**
                 * Build a JSON representation of this Particle Emitter property.undefined
                 * @returns A JSON representation of this Particle Emitter property.
                 */
                toJSON(): object;

                /**
                 * Change the current value of the property and update its callback methods.
                 * @param value The new numeric value of this property.
                 * @returns This Emitter Op object.
                 */
                onChange(value: number): this;

                /**
                 * Checks the type of `EmitterOp.propertyValue` to determine which
                 * method is required in order to return values from this op function.undefined
                 * @returns A number between 0 and 9 which should be passed to `setMethods`.
                 */
                getMethod(): number;

                /**
                 * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and
                 * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the method returned
                 * from `getMethod`. The method is stored in the `EmitterOp.method` property
                 * and is a number between 0 and 9 inclusively.undefined
                 * @returns This Emitter Op object.
                 */
                setMethods(): this;

                /**
                 * Check whether an object has the given property.
                 * @param object The object to check.
                 * @param key The key of the property to look for in the object.
                 * @returns `true` if the property exists in the object, `false` otherwise.
                 */
                has(object: object, key: string): boolean;

                /**
                 * Check whether an object has both of the given properties.
                 * @param object The object to check.
                 * @param key1 The key of the first property to check the object for.
                 * @param key2 The key of the second property to check the object for.
                 * @returns `true` if both properties exist in the object, `false` otherwise.
                 */
                hasBoth(object: object, key1: string, key2: string): boolean;

                /**
                 * Check whether an object has at least one of the given properties.
                 * @param object The object to check.
                 * @param key1 The key of the first property to check the object for.
                 * @param key2 The key of the second property to check the object for.
                 * @returns `true` if at least one of the properties exists in the object, `false` if neither exist.
                 */
                hasEither(object: object, key1: string, key2: string): boolean;

                /**
                 * The returned value sets what the property will be at the START of the particle's life, on emit.undefined
                 * @returns The new value of the property.
                 */
                defaultEmit(): number;

                /**
                 * The returned value updates the property for the duration of the particle's life.
                 * @param particle The particle.
                 * @param key The name of the property.
                 * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
                 * @param value The current value of the property.
                 * @returns The new value of the property.
                 */
                defaultUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number, value: number): number;

                /**
                 * The returned value sets what the property will be at the START of the particle's life, on emit.
                 * 
                 * This method is only used when you have provided a custom emit callback.
                 * @param particle The particle.
                 * @param key The name of the property.
                 * @param value The current value of the property.
                 * @returns The new value of the property.
                 */
                proxyEmit(particle: Phaser.GameObjects.Particles.Particle, key: string, value?: number): number;

                /**
                 * The returned value updates the property for the duration of the particle's life.
                 * 
                 * This method is only used when you have provided a custom update callback.
                 * @param particle The particle.
                 * @param key The name of the property.
                 * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
                 * @param value The current value of the property.
                 * @returns The new value of the property.
                 */
                proxyUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number, value: number): number;

                /**
                 * An `onEmit` callback that returns the current value of the property.undefined
                 * @returns The current value of the property.
                 */
                staticValueEmit(): number;

                /**
                 * An `onUpdate` callback that returns the current value of the property.undefined
                 * @returns The current value of the property.
                 */
                staticValueUpdate(): number;

                /**
                 * An `onEmit` callback that returns a random value from the current value array.undefined
                 * @returns The new value of the property.
                 */
                randomStaticValueEmit(): number;

                /**
                 * An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and
                 * {@link Phaser.GameObjects.Particles.EmitterOp#end} range.
                 * @param particle The particle.
                 * @param key The key of the property.
                 * @returns The new value of the property.
                 */
                randomRangedValueEmit(particle: Phaser.GameObjects.Particles.Particle, key: string): number;

                /**
                 * An `onEmit` callback that returns a random integer value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and
                 * {@link Phaser.GameObjects.Particles.EmitterOp#end} range.
                 * @param particle The particle.
                 * @param key The key of the property.
                 * @returns The new value of the property.
                 */
                randomRangedIntEmit(particle: Phaser.GameObjects.Particles.Particle, key: string): number;

                /**
                 * An `onEmit` callback that returns a stepped value between the
                 * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}
                 * range.undefined
                 * @returns The new value of the property.
                 */
                steppedEmit(): number;

                /**
                 * An `onEmit` callback for an eased property.
                 * 
                 * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate}.
                 * @param particle The particle.
                 * @param key The name of the property.
                 * @returns {@link Phaser.GameObjects.Particles.EmitterOp#start}, as the new value of the property.
                 */
                easedValueEmit(particle: Phaser.GameObjects.Particles.Particle, key: string): number;

                /**
                 * An `onUpdate` callback that returns an eased value between the
                 * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}
                 * range.
                 * @param particle The particle.
                 * @param key The name of the property.
                 * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
                 * @returns The new value of the property.
                 */
                easeValueUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number): number;

                /**
                 * Destroys this EmitterOp instance and all of its references.
                 * 
                 * Called automatically when the ParticleEmitter that owns this
                 * EmitterOp is destroyed.
                 */
                destroy(): void;

            }

            /**
             * The Gravity Well Particle Processor applies a force on the particles to draw
             * them towards, or repel them from, a single point.
             * 
             * The force applied is inversely proportional to the square of the distance
             * from the particle to the point, in accordance with Newton's law of gravity.
             * 
             * This simulates the effect of gravity over large distances (as between planets, for example).
             */
            class GravityWell extends Phaser.GameObjects.Particles.ParticleProcessor {
                /**
                 * 
                 * @param x The x coordinate of the Gravity Well, in world space. Default 0.
                 * @param y The y coordinate of the Gravity Well, in world space. Default 0.
                 * @param power The strength of the gravity force - larger numbers produce a stronger force. Default 0.
                 * @param epsilon The minimum distance for which the gravity force is calculated. Default 100.
                 * @param gravity The gravitational force of this Gravity Well. Default 50.
                 */
                constructor(x?: number | Phaser.Types.GameObjects.Particles.GravityWellConfig, y?: number, power?: number, epsilon?: number, gravity?: number);

                /**
                 * Takes a Particle and updates its velocity based on the gravitational force exerted
                 * by this Gravity Well. The force is calculated using the squared distance between the
                 * particle and the well, clamped by `epsilon` to avoid extreme forces at very close range,
                 * then applied to the particle's horizontal and vertical velocity components.
                 * @param particle The Particle to update.
                 * @param delta The delta time in ms.
                 * @param step The delta value divided by 1000.
                 */
                update(particle: Phaser.GameObjects.Particles.Particle, delta: number, step: number): void;

                /**
                 * The minimum distance for which the gravity force is calculated, in pixels.
                 * 
                 * This acts as a lower bound on the distance used in the gravity calculation,
                 * preventing extreme or infinite forces when a particle passes very close to
                 * the well's position. Increase this value to soften the effect at close range.
                 * 
                 * Defaults to 100.
                 */
                epsilon: number;

                /**
                 * The strength of the gravity force - larger numbers produce a stronger attractive force.
                 * Negative values reverse the effect, repelling particles away from the well instead.
                 * 
                 * Internally this value is scaled by `gravity`, so changing `gravity` will also affect
                 * the effective force even if `power` remains the same.
                 * 
                 * Defaults to 0.
                 */
                power: number;

                /**
                 * The base gravitational force of this Gravity Well. This value acts as a scalar
                 * that is multiplied with `power` to determine the total force applied to particles.
                 * Increasing `gravity` amplifies the effect of `power`; setting it to zero will
                 * neutralise the well regardless of the `power` value.
                 * 
                 * Defaults to 50.
                 */
                gravity: number;

            }

            /**
             * A Particle is a lightweight object owned and controlled by a ParticleEmitter. Each Particle
             * holds its own position, velocity, acceleration, rotation, scale, alpha, tint, and lifespan
             * values, which are updated each frame by the Emitter's configured EmitterOp instances.
             * Particles are pooled and recycled by the Emitter for performance. When a particle's lifespan
             * expires, it is deactivated and returned to the pool for reuse rather than being destroyed.
             * You do not normally create Particle instances directly; instead, the Emitter manages their
             * lifecycle. You can extend this class to add custom properties by providing a custom
             * `particleClass` in the emitter configuration.
             */
            class Particle {
                /**
                 * 
                 * @param emitter The Emitter to which this Particle belongs.
                 */
                constructor(emitter: Phaser.GameObjects.Particles.ParticleEmitter);

                /**
                 * The Emitter to which this Particle belongs.
                 * 
                 * A Particle can only belong to a single Emitter and is created, updated and destroyed by it.
                 */
                emitter: Phaser.GameObjects.Particles.ParticleEmitter;

                /**
                 * The texture used by this Particle when it renders.
                 */
                texture: Phaser.Textures.Texture;

                /**
                 * The texture frame used by this Particle when it renders.
                 */
                frame: Phaser.Textures.Frame;

                /**
                 * The x coordinate of this Particle.
                 */
                x: number;

                /**
                 * The y coordinate of this Particle.
                 */
                y: number;

                /**
                 * The coordinates of this Particle in world space.
                 * 
                 * Updated as part of `computeVelocity`.
                 */
                worldPosition: Phaser.Math.Vector2;

                /**
                 * The x velocity of this Particle, in pixels per second.
                 */
                velocityX: number;

                /**
                 * The y velocity of this Particle, in pixels per second.
                 */
                velocityY: number;

                /**
                 * The x acceleration of this Particle, in pixels per second squared.
                 */
                accelerationX: number;

                /**
                 * The y acceleration of this Particle, in pixels per second squared.
                 */
                accelerationY: number;

                /**
                 * The maximum horizontal velocity this Particle can travel at, in pixels per second.
                 */
                maxVelocityX: number;

                /**
                 * The maximum vertical velocity this Particle can travel at, in pixels per second.
                 */
                maxVelocityY: number;

                /**
                 * The bounciness, or restitution, of this Particle.
                 */
                bounce: number;

                /**
                 * The horizontal scale of this Particle.
                 */
                scaleX: number;

                /**
                 * The vertical scale of this Particle.
                 */
                scaleY: number;

                /**
                 * The alpha value of this Particle.
                 */
                alpha: number;

                /**
                 * The angle of this Particle in degrees.
                 */
                angle: number;

                /**
                 * The angle of this Particle in radians.
                 */
                rotation: number;

                /**
                 * The tint applied to this Particle.
                 */
                tint: number;

                /**
                 * The lifespan of this Particle in ms.
                 */
                life: number;

                /**
                 * The current life of this Particle in ms.
                 */
                lifeCurrent: number;

                /**
                 * The delay applied to this Particle upon emission, in ms.
                 */
                delayCurrent: number;

                /**
                 * The hold applied to this Particle before it expires, in ms.
                 */
                holdCurrent: number;

                /**
                 * The normalized lifespan T value, where 0 is the start and 1 is the end.
                 */
                lifeT: number;

                /**
                 * An object that stores the min/max interpolation values for each of this Particle's
                 * properties (such as alpha, tint, scaleX, rotate, etc.) as they are eased over the
                 * particle's lifetime. These values are populated and used by the EmitterOp instances
                 * on the parent Emitter.
                 */
                data: Phaser.Types.GameObjects.Particles.ParticleData;

                /**
                 * A reference to the Scene to which this Game Object belongs.
                 * 
                 * Game Objects can only belong to one Scene.
                 * 
                 * You should consider this property as being read-only. You cannot move a
                 * Game Object to another Scene by simply changing it.
                 */
                scene: Phaser.Scene;

                /**
                 * The Animation State component of this Particle.
                 * 
                 * This component provides features to apply animations to this Particle.
                 * It is responsible for playing, loading, queuing animations for later playback,
                 * mixing between animations and setting the current animation frame to this Particle.
                 * 
                 * It is created only if the Particle's Emitter has at least one Animation.
                 */
                anims: Phaser.Animations.AnimationState | null;

                /**
                 * A rectangle that holds the bounds of this Particle after a call to
                 * the `Particle.getBounds` method has been made.
                 */
                bounds: Phaser.Geom.Rectangle;

                /**
                 * The Event Emitter proxy.
                 * 
                 * Passes on all parameters to the `ParticleEmitter` to emit directly.
                 * @param event The event name.
                 * @param a1 Optional argument 1.
                 * @param a2 Optional argument 2.
                 * @param a3 Optional argument 3.
                 * @param a4 Optional argument 4.
                 * @param a5 Optional argument 5.
                 * @returns `true` if the event had listeners, else `false`.
                 */
                emit(event: string | Symbol, a1?: any, a2?: any, a3?: any, a4?: any, a5?: any): boolean;

                /**
                 * Checks to see if this Particle is alive and updating.undefined
                 * @returns `true` if this Particle is alive and updating, otherwise `false`.
                 */
                isAlive(): boolean;

                /**
                 * Kills this particle. This sets the `lifeCurrent` value to 0, which forces
                 * the Particle to be removed the next time its parent Emitter runs an update.
                 */
                kill(): void;

                /**
                 * Sets the position of this particle to the given x/y coordinates.
                 * 
                 * If the parameters are left undefined, it resets the particle back to (0, 0).
                 * @param x The x coordinate to set this Particle to. Default 0.
                 * @param y The y coordinate to set this Particle to. Default 0.
                 */
                setPosition(x?: number, y?: number): void;

                /**
                 * Starts this Particle from the given coordinates.
                 * @param x The x coordinate to launch this Particle from.
                 * @param y The y coordinate to launch this Particle from.
                 * @returns `true` if the Particle is alive, or `false` if it was spawned inside a DeathZone.
                 */
                fire(x?: number, y?: number): boolean;

                /**
                 * The main update method for this Particle.
                 * 
                 * Updates its life values, computes the velocity and repositions the Particle.
                 * @param delta The delta time in ms.
                 * @param step The delta value divided by 1000.
                 * @param processors An array of all active Particle Processors.
                 * @returns Returns `true` if this Particle has now expired and should be removed, otherwise `false` if still active.
                 */
                update(delta: number, step: number, processors: Phaser.GameObjects.Particles.ParticleProcessor[]): boolean;

                /**
                 * An internal method that calculates the velocity of the Particle and
                 * its world position. It also runs it against any active Processors
                 * that are set on the Emitter.
                 * @param emitter The Emitter that is updating this Particle.
                 * @param delta The delta time in ms.
                 * @param step The delta value divided by 1000.
                 * @param processors An array of all active Particle Processors.
                 * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
                 */
                computeVelocity(emitter: Phaser.GameObjects.Particles.ParticleEmitter, delta: number, step: number, processors: Phaser.GameObjects.Particles.ParticleProcessor[], t: number): void;

                /**
                 * This is a NOOP method and does nothing when called.
                 */
                setSizeToFrame(): void;

                /**
                 * Gets the bounds of this particle as a Geometry Rectangle, factoring in any
                 * transforms of the parent emitter and anything else above it in the display list.
                 * 
                 * Once calculated the bounds can be accessed via the `Particle.bounds` property.
                 * @param matrix Optional transform matrix to apply to this particle.
                 * @returns A Rectangle containing the transformed bounds of this particle.
                 */
                getBounds(matrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Geom.Rectangle;

                /**
                 * Destroys this Particle by nulling its references to the emitter, texture, frame,
                 * and scene. If this Particle has an AnimationState, it is also destroyed. After
                 * calling this method the Particle should not be used again.
                 */
                destroy(): void;

            }

            /**
             * The Particle Bounds Processor.
             * 
             * Defines a rectangular region, in world space, within which particle movement
             * is restrained.
             * 
             * Use the properties `collideLeft`, `collideRight`, `collideTop` and
             * `collideBottom` to control if a particle will rebound off the sides
             * of this boundary, or not.
             * 
             * This happens when the particles worldPosition x/y coordinate hits the boundary.
             * 
             * The strength of the rebound is determined by the `Particle.bounce` property.
             */
            class ParticleBounds extends Phaser.GameObjects.Particles.ParticleProcessor {
                /**
                 * 
                 * @param x The x position (top-left) of the bounds, in world space.
                 * @param y The y position (top-left) of the bounds, in world space.
                 * @param width The width of the bounds.
                 * @param height The height of the bounds.
                 * @param collideLeft Whether particles interact with the left edge of the bounds. Default true.
                 * @param collideRight Whether particles interact with the right edge of the bounds. Default true.
                 * @param collideTop Whether particles interact with the top edge of the bounds. Default true.
                 * @param collideBottom Whether particles interact with the bottom edge of the bounds. Default true.
                 */
                constructor(x: number, y: number, width: number, height: number, collideLeft?: boolean, collideRight?: boolean, collideTop?: boolean, collideBottom?: boolean);

                /**
                 * A rectangular boundary constraining particle movement. Use the ParticleBounds properties `collideLeft`,
                 * `collideRight`, `collideTop` and `collideBottom` to control if a particle will rebound off
                 * the sides of this boundary, or not. This happens when the particles x/y coordinate hits
                 * the boundary.
                 */
                bounds: Phaser.Geom.Rectangle;

                /**
                 * Whether particles interact with the left edge of the {@link Phaser.GameObjects.Particles.ParticleBounds#bounds}.
                 */
                collideLeft: boolean;

                /**
                 * Whether particles interact with the right edge of the emitter {@link Phaser.GameObjects.Particles.ParticleBounds#bounds}.
                 */
                collideRight: boolean;

                /**
                 * Whether particles interact with the top edge of the emitter {@link Phaser.GameObjects.Particles.ParticleBounds#bounds}.
                 */
                collideTop: boolean;

                /**
                 * Whether particles interact with the bottom edge of the emitter {@link Phaser.GameObjects.Particles.ParticleBounds#bounds}.
                 */
                collideBottom: boolean;

                /**
                 * Checks the given Particle against the boundary rectangle. If the particle's world position
                 * crosses an active edge, its position is clamped back inside the boundary and its velocity
                 * along that axis is negated and scaled by the particle's `bounce` value, causing it to rebound.
                 * @param particle The Particle to update.
                 */
                update(particle: Phaser.GameObjects.Particles.Particle): void;

            }

            /**
             * A Particle Emitter is a special kind of Game Object that controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles}.
             * 
             * Particle Emitters are created via a configuration object. The properties of this object
             * can be specified in a variety of formats, giving you plenty of scope over the values they
             * return, leading to complex visual effects. Here are the different forms of configuration
             * value you can give:
             * 
             * ## An explicit static value:
             * 
             * ```js
             * x: 400
             * ```
             * 
             * The x value will always be 400 when the particle is spawned.
             * 
             * ## A random value:
             * 
             * ```js
             * x: [ 100, 200, 300, 400 ]
             * ```
             * 
             * The x value will be one of the 4 elements in the given array, picked at random on emission.
             * 
             * ## A custom callback:
             * 
             * ```js
             * x: (particle, key, t, value) => {
             *   return value + 50;
             * }
             * ```
             * 
             * The x value is the result of calling this function. This is only used when the
             * particle is emitted, so it provides its initial starting value. It is not used
             * when the particle is updated (see the onUpdate callback for that)
             * 
             * ## A start / end object:
             * 
             * This allows you to control the change in value between the given start and
             * end parameters over the course of the particles lifetime:
             * 
             * ```js
             * scale: { start: 0, end: 1 }
             * ```
             * 
             * The particle scale will start at 0 when emitted and ease to a scale of 1
             * over the course of its lifetime. You can also specify the ease function
             * used for this change (the default is Linear):
             * 
             * ```js
             * scale: { start: 0, end: 1, ease: 'bounce.out' }
             * ```
             * 
             * ## A start / end random object:
             * 
             * The start and end object can have an optional `random` parameter.
             * This forces it to pick a random value between the two values and use
             * this as the starting value, then easing to the 'end' parameter over
             * its lifetime.
             * 
             * ```js
             * scale: { start: 4, end: 0.5, random: true }
             * ```
             * 
             * The particle will start with a random scale between 0.5 and 4 and then
             * scale to the end value over its lifetime. You can combine the above
             * with the `ease` parameter as well to control the value easing.
             * 
             * ## An interpolation object:
             * 
             * You can provide an array of values which will be used for interpolation
             * during the particles lifetime. You can also define the interpolation
             * function to be used. There are three provided: `linear` (the default),
             * `bezier` and `catmull`, or you can provide your own function.
             * 
             * ```js
             * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull' }
             * ```
             * 
             * The particle scale will interpolate from 50 when emitted to 800 via the other
             * points over the course of its lifetime. You can also specify an ease function
             * used to control the rate of change through the values (the default is Linear):
             * 
             * ```js
             * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull', ease: 'bounce.out }
             * ```
             * 
             * ## A stepped emitter object:
             * 
             * The `steps` parameter allows you to control the placement of sequential
             * particles across the start-end range:
             * 
             * ```js
             * x: { steps: 32, start: 0, end: 576 }
             * ```
             * 
             * Here we have a range of 576 (start to end). This is divided into 32 steps.
             * 
             * The first particle will emit at the x position of 0. The next will emit
             * at the next 'step' along, which would be 18. The following particle will emit
             * at the next step, which is 36, and so on. Because the range of 576 has been
             * divided by 32, creating 18 pixels steps. When a particle reaches the 'end'
             * value the next one will start from the beginning again.
             * 
             * ## A stepped emitter object with yoyo:
             * 
             * You can add the optional `yoyo` property to a stepped object:
             * 
             * ```js
             * x: { steps: 32, start: 0, end: 576, yoyo: true }
             * ```
             * 
             * As with the stepped emitter, particles are emitted in sequence, from 'start'
             * to 'end' in step sized jumps. Normally, when a stepped emitter reaches the
             * end it snaps around to the start value again. However, if you provide the 'yoyo'
             * parameter then when it reaches the end it will reverse direction and start
             * emitting back down to 'start' again. Depending on the effect you require this
             * can often look better.
             * 
             * ## A min / max object:
             * 
             * This allows you to pick a random float value between the min and max properties:
             * 
             * ```js
             * x: { min: 100, max: 700 }
             * ```
             * 
             * The x value will be a random float between min and max.
             * 
             * You can force it select an integer by setting the 'int' flag:
             * 
             * ```js
             * x: { min: 100, max: 700, int: true }
             * ```
             * 
             * Or, you could use the 'random' array approach (see below)
             * 
             * ## A random object:
             * 
             * This allows you to pick a random integer value between the first and second array elements:
             * 
             * ```js
             * x: { random: [ 100, 700 ] }
             * ```
             * 
             * The x value will be a random integer between 100 and 700 as it takes the first
             * element in the 'random' array as the 'min' value and the 2nd element as the 'max' value.
             * 
             * ## Custom onEmit and onUpdate callbacks:
             * 
             * If the above won't give you the effect you're after, you can provide your own
             * callbacks that will be used when the particle is both emitted and updated:
             * 
             * ```js
             * x: {
             *   onEmit: (particle, key, t, value) => {
             *     return value;
             *   },
             *   onUpdate: (particle, key, t, value) => {
             *     return value;
             *   }
             * }
             * ```
             * 
             * You can provide either one or both functions. The `onEmit` is called at the
             * start of the particles life and defines the value of the property on birth.
             * 
             * The `onUpdate` function is called every time the Particle Emitter updates
             * until the particle dies. Both must return a value.
             * 
             * The properties are:
             * 
             * particle - A reference to the Particle instance.
             * key - The string based key of the property, i.e. 'x' or 'lifespan'.
             * t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
             * value - The current property value. At a minimum you should return this.
             * 
             * By using the above configuration options you have an unlimited amount of
             * control over how your particles behave.
             * 
             * ## v3.60 Differences
             * 
             * Prior to v3.60 Phaser used a `ParticleEmitterManager`. This was removed in v3.60
             * and now calling `this.add.particles` returns a `ParticleEmitter` instance instead.
             * 
             * In order to streamline memory and the display list we have removed the
             * `ParticleEmitterManager` entirely. When you call `this.add.particles` you're now
             * creating a `ParticleEmitter` instance, which is being added directly to the
             * display list and can be manipulated just like any other Game Object, i.e.
             * scaled, rotated, positioned, added to a Container, etc. It now extends the
             * `GameObject` base class, meaning it's also an event emitter, which allowed us
             * to create some handy new events for particles.
             * 
             * So, to create an emitter, you now give it an xy coordinate, a texture and an
             * emitter configuration object (you can also set this later, but most commonly
             * you'd do it on creation). I.e.:
             * 
             * ```js
             * const emitter = this.add.particles(100, 300, 'flares', {
             *   frame: 'red',
             *   angle: { min: -30, max: 30 },
             *   speed: 150
             * });
             * ```
             * 
             * This will create a 'red flare' emitter at 100 x 300.
             * 
             * Please update your code to ensure it adheres to the new function signatures.
             */
            class ParticleEmitter extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
                /**
                 * 
                 * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param config Settings for this emitter.
                 */
                constructor(scene: Phaser.Scene, x?: number, y?: number, texture?: string | Phaser.Textures.Texture, config?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig);

                /**
                 * The Particle Class which will be emitted by this Emitter.
                 */
                particleClass: Function;

                /**
                 * An internal object holding the configuration for the Emitter.
                 * 
                 * These are populated as part of the Emitter configuration parsing.
                 * 
                 * You typically do not access them directly, but instead use the
                 * `ParticleEmitter.setConfig` or `ParticleEmitter.updateConfig` methods.
                 */
                config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig;

                /**
                 * An internal object holding all of the EmitterOp instances.
                 * 
                 * These are populated as part of the Emitter configuration parsing.
                 * 
                 * You typically do not access them directly, but instead use the
                 * provided getters and setters on this class, such as `ParticleEmitter.speedX` etc.
                 */
                ops: Phaser.Types.GameObjects.Particles.ParticleEmitterOps;

                /**
                 * A radial emitter will emit particles in all directions between angle min and max,
                 * using {@link Phaser.GameObjects.Particles.ParticleEmitter#speed} as the value. If set to false then this acts as a point Emitter.
                 * A point emitter will emit particles only in the direction derived from the speedX and speedY values.
                 */
                radial: boolean;

                /**
                 * Horizontal acceleration applied to emitted particles, in pixels per second squared.
                 */
                gravityX: number;

                /**
                 * Vertical acceleration applied to emitted particles, in pixels per second squared.
                 */
                gravityY: number;

                /**
                 * Whether accelerationX and accelerationY are non-zero. Set automatically during configuration.
                 */
                acceleration: boolean;

                /**
                 * Whether moveToX and moveToY are set. Set automatically during configuration.
                 * 
                 * When true the particles move toward the moveToX and moveToY coordinates and arrive at the end of their life.
                 * Emitter angle, speedX, and speedY are ignored.
                 */
                moveTo: boolean;

                /**
                 * A function to call when a particle is emitted.
                 */
                emitCallback: Phaser.Types.GameObjects.Particles.ParticleEmitterCallback | null;

                /**
                 * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallback}.
                 */
                emitCallbackScope: any | null;

                /**
                 * A function to call when a particle dies.
                 */
                deathCallback: Phaser.Types.GameObjects.Particles.ParticleDeathCallback | null;

                /**
                 * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallback}.
                 */
                deathCallbackScope: any | null;

                /**
                 * Set to hard limit the amount of particle objects this emitter is allowed to create
                 * in total. This is the number of `Particle` instances it can create, not the number
                 * of 'alive' particles.
                 * 
                 * 0 means unlimited.
                 */
                maxParticles: number;

                /**
                 * The maximum number of alive and rendering particles this emitter will update.
                 * When this limit is reached, a particle needs to die before another can be emitted.
                 * 
                 * 0 means no limits.
                 */
                maxAliveParticles: number;

                /**
                 * If set, either via the Emitter config, or by directly setting this property,
                 * the Particle Emitter will stop emitting particles once this total has been
                 * reached. It will then enter a 'stopped' state, firing the `STOP`
                 * event. Note that entering a stopped state doesn't mean all the particles
                 * have finished, just that it's not emitting any further ones.
                 * 
                 * To know when the final particle expires, listen for the COMPLETE event.
                 * 
                 * Use this if you wish to launch an exact number of particles and then stop
                 * your emitter afterwards.
                 * 
                 * The counter is reset each time the `ParticleEmitter.start` method is called.
                 * 
                 * 0 means the emitter will not stop based on total emitted particles.
                 */
                stopAfter: number;

                /**
                 * The number of milliseconds this emitter will emit particles for when in flow mode,
                 * before it stops emission. A value of 0 (the default) means there is no duration.
                 * 
                 * When the duration expires the `STOP` event is emitted. Note that entering a
                 * stopped state doesn't mean all the particles have finished, just that it's
                 * not emitting any further ones.
                 * 
                 * To know when the final particle expires, listen for the COMPLETE event.
                 * 
                 * The counter is reset each time the `ParticleEmitter.start` method is called.
                 * 
                 * 0 means the emitter will not stop based on duration.
                 */
                duration: number;

                /**
                 * For a flow emitter, the time interval (>= 0) between particle flow cycles in ms.
                 * A value of 0 means there is one particle flow cycle for each logic update (the maximum flow frequency). This is the default setting.
                 * For an exploding emitter, this value will be -1.
                 * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} also puts the emitter in flow mode (frequency >= 0).
                 * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} also puts the emitter in explode mode (frequency = -1).
                 */
                frequency: number;

                /**
                 * Controls if the emitter is currently emitting a particle flow (when frequency >= 0).
                 * 
                 * Already alive particles will continue to update until they expire.
                 * 
                 * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}.
                 */
                emitting: boolean;

                /**
                 * Newly emitted particles are added to the top of the particle list, i.e. rendered above those already alive.
                 * 
                 * Set to false to send them to the back.
                 * 
                 * Also see the `sortOrder` property for more complex particle sorting.
                 */
                particleBringToTop: boolean;

                /**
                 * The time rate applied to active particles, affecting lifespan, movement, and tweens. Values larger than 1 are faster than normal.
                 */
                timeScale: number;

                /**
                 * An array containing Particle Emission Zones. These can be either EdgeZones or RandomZones.
                 * 
                 * Particles are emitted from a randomly selected zone from this array.
                 * 
                 * Prior to Phaser v3.60 an Emitter could only have one single Emission Zone.
                 * In 3.60 they can now have an array of Emission Zones.
                 */
                emitZones: Phaser.Types.GameObjects.Particles.EmitZoneObject[];

                /**
                 * An array containing Particle Death Zone objects. A particle is immediately killed as soon as its x/y coordinates
                 * intersect with any of the configured Death Zones.
                 * 
                 * Prior to Phaser v3.60 an Emitter could only have one single Death Zone.
                 * In 3.60 they can now have an array of Death Zones.
                 */
                deathZones: Phaser.GameObjects.Particles.Zones.DeathZone[];

                /**
                 * An optional Rectangle object that is used during rendering to cull Particles from
                 * display. For example, if your particles are limited to only move within a 300x300
                 * sized area from their origin, then you can set this Rectangle to those dimensions.
                 * 
                 * The renderer will check to see if the `viewBounds` Rectangle intersects with the
                 * Camera bounds during the render step and if not it will skip rendering the Emitter
                 * entirely.
                 * 
                 * This allows you to create many emitters in a Scene without the cost of
                 * rendering if the contents aren't visible.
                 * 
                 * Note that the Emitter will not perform any checks to see if the Particles themselves
                 * are outside of these bounds, or not. It will simply check the bounds against the
                 * camera. Use the `getBounds` method with the `advance` parameter to help define
                 * the location and placement of the view bounds.
                 */
                viewBounds: Phaser.Geom.Rectangle | null;

                /**
                 * A Game Object whose position is used as the particle origin.
                 */
                follow: Phaser.Types.Math.Vector2Like | null;

                /**
                 * The offset of the particle origin from the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target.
                 */
                followOffset: Phaser.Math.Vector2;

                /**
                 * Whether the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#visible} state will track
                 * the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target's visibility state.
                 */
                trackVisible: boolean;

                /**
                 * The texture frames assigned to particles.
                 */
                frames: Phaser.Textures.Frame[];

                /**
                 * Whether texture {@link Phaser.GameObjects.Particles.ParticleEmitter#frames} are selected at random.
                 */
                randomFrame: boolean;

                /**
                 * The number of consecutive particles that receive a single texture frame (per frame cycle).
                 */
                frameQuantity: number;

                /**
                 * The animations assigned to particles.
                 */
                anims: string[];

                /**
                 * Whether animations {@link Phaser.GameObjects.Particles.ParticleEmitter#anims} are selected at random.
                 */
                randomAnim: boolean;

                /**
                 * The number of consecutive particles that receive a single animation (per frame cycle).
                 */
                animQuantity: number;

                /**
                 * An internal property used to tell when the emitter is in fast-forward mode.
                 */
                skipping: boolean;

                /**
                 * An internal Transform Matrix used to cache this emitters world matrix.
                 */
                worldMatrix: Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Optionally sort the particles before they render based on this
                 * property. The property must exist on the `Particle` class, such
                 * as `y`, `lifeT`, `scaleX`, etc.
                 * 
                 * When set this overrides the `particleBringToTop` setting.
                 * 
                 * To reset this and disable sorting, set this property to an empty string.
                 */
                sortProperty: string;

                /**
                 * When `sortProperty` is defined this controls the sorting order,
                 * either ascending or descending. Toggle to control the visual effect.
                 */
                sortOrderAsc: boolean;

                /**
                 * The callback used to sort the particles. Only used if `sortProperty`
                 * has been set. Set this via the `setSortCallback` method.
                 */
                sortCallback: Phaser.Types.GameObjects.Particles.ParticleSortCallback | null;

                /**
                 * A list of Particle Processors being managed by this Emitter.
                 */
                processors: Phaser.Structs.List<Phaser.GameObjects.Particles.ParticleProcessor>;

                /**
                 * The tint mode used by the Particles in this Emitter.
                 * 
                 * Available modes are:
                 * - Phaser.TintModes.MULTIPLY (default)
                 * - Phaser.TintModes.FILL
                 * - Phaser.TintModes.ADD
                 * - Phaser.TintModes.SCREEN
                 * - Phaser.TintModes.OVERLAY
                 * - Phaser.TintModes.HARD_LIGHT
                 */
                tintMode: Phaser.TintModes;

                /**
                 * Called when this Game Object is added to a Scene. Registers this emitter
                 * with the Scene's update list so it receives `preUpdate` calls each frame.
                 */
                addedToScene(): void;

                /**
                 * Called when this Game Object is removed from a Scene. Unregisters this
                 * emitter from the Scene's update list so it no longer receives `preUpdate` calls.
                 */
                removedFromScene(): void;

                /**
                 * Takes an Emitter Configuration file and resets this Emitter, using any
                 * properties defined in the config to then set it up again.
                 * @param config Settings for this emitter.
                 * @returns This Particle Emitter.
                 */
                setConfig(config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig): this;

                /**
                 * Takes an existing Emitter Configuration file and updates this Emitter.
                 * Existing properties are overridden while new properties are added. The
                 * updated configuration is then passed to the `setConfig` method to reset
                 * the Emitter with the updated configuration.
                 * @param config Settings for this emitter.
                 * @returns This Particle Emitter.
                 */
                updateConfig(config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig): this;

                /**
                 * Creates a description of this emitter suitable for JSON serialization.undefined
                 * @returns A JSON representation of the Game Object.
                 */
                toJSON(): Phaser.Types.GameObjects.JSONGameObject;

                /**
                 * Resets the internal counter trackers.
                 * 
                 * You shouldn't ever need to call this directly.
                 * @param frequency The frequency counter.
                 * @param on Set the complete flag.
                 */
                resetCounters(frequency: number, on: boolean): void;

                /**
                 * Continuously moves the particle origin to follow a Game Object's position.
                 * @param target The Object to follow.
                 * @param offsetX Horizontal offset of the particle origin from the Game Object. Default 0.
                 * @param offsetY Vertical offset of the particle origin from the Game Object. Default 0.
                 * @param trackVisible Whether the emitter's visible state will track the target's visible state. Default false.
                 * @returns This Particle Emitter.
                 */
                startFollow(target: Phaser.Types.Math.Vector2Like, offsetX?: number, offsetY?: number, trackVisible?: boolean): this;

                /**
                 * Stops following a Game Object.undefined
                 * @returns This Particle Emitter.
                 */
                stopFollow(): this;

                /**
                 * Chooses a texture frame from {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.undefined
                 * @returns The texture frame.
                 */
                getFrame(): Phaser.Textures.Frame;

                /**
                 * Sets a pattern for assigning texture frames to emitted particles. The `frames` configuration can be any of:
                 * 
                 * frame: 0
                 * frame: 'red'
                 * frame: [ 0, 1, 2, 3 ]
                 * frame: [ 'red', 'green', 'blue', 'pink', 'white' ]
                 * frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] }
                 * @param frames One or more texture frames, or a configuration object.
                 * @param pickRandom Whether frames should be assigned at random from `frames`. Default true.
                 * @param quantity The number of consecutive particles that will receive each frame. Default 1.
                 * @returns This Particle Emitter.
                 */
                setEmitterFrame(frames: any[] | string | number | Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig, pickRandom?: boolean, quantity?: number): this;

                /**
                 * Chooses an animation from {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}, if populated.undefined
                 * @returns The animation to play, or `null` if there aren't any.
                 */
                getAnim(): string;

                /**
                 * Sets a pattern for assigning animations to emitted particles. The `anims` configuration can be any of:
                 * 
                 * anim: 'red'
                 * anim: [ 'red', 'green', 'blue', 'pink', 'white' ]
                 * anim: { anims: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] }
                 * 
                 * Call this method at least once before any particles are created, or set `anim` in the Particle Emitter's configuration when creating the Emitter.
                 * @param anims One or more animations, or a configuration object.
                 * @param pickRandom Whether animations should be assigned at random from `anims`. If a config object is given, this parameter is ignored. Default true.
                 * @param quantity The number of consecutive particles that will receive each animation. If a config object is given, this parameter is ignored. Default 1.
                 * @returns This Particle Emitter.
                 */
                setAnim(anims: string | string[] | Phaser.Types.GameObjects.Particles.ParticleEmitterAnimConfig, pickRandom?: boolean, quantity?: number): this;

                /**
                 * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off.
                 * @param value Radial mode (true) or point mode (false). Default true.
                 * @returns This Particle Emitter.
                 */
                setRadial(value?: boolean): this;

                /**
                 * Creates a Particle Bounds processor and adds it to this Emitter.
                 * 
                 * This processor will check to see if any of the active Particles hit
                 * the defined boundary, as specified by a Rectangle shape in world-space.
                 * 
                 * If so, they are 'rebounded' back again by having their velocity adjusted.
                 * 
                 * The strength of the rebound is controlled by the `Particle.bounce`
                 * property.
                 * 
                 * You should be careful to ensure that you emit particles within a bounds,
                 * if set, otherwise it will lead to unpredictable visual results as the
                 * particles are hastily repositioned.
                 * 
                 * The Particle Bounds processor is returned from this method. If you wish
                 * to modify the area you can directly change its `bounds` property, along
                 * with the `collideLeft` etc values.
                 * 
                 * To disable the bounds you can either set its `active` property to `false`,
                 * or if you no longer require it, call `ParticleEmitter.removeParticleProcessor`.
                 * @param x The x-coordinate of the left edge of the boundary, or an object representing a rectangle.
                 * @param y The y-coordinate of the top edge of the boundary.
                 * @param width The width of the boundary.
                 * @param height The height of the boundary.
                 * @param collideLeft Whether particles interact with the left edge of the bounds. Default true.
                 * @param collideRight Whether particles interact with the right edge of the bounds. Default true.
                 * @param collideTop Whether particles interact with the top edge of the bounds. Default true.
                 * @param collideBottom Whether particles interact with the bottom edge of the bounds. Default true.
                 * @returns The Particle Bounds processor.
                 */
                addParticleBounds(x: number | Phaser.Types.GameObjects.Particles.ParticleEmitterBounds | Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt, y?: number, width?: number, height?: number, collideLeft?: boolean, collideRight?: boolean, collideTop?: boolean, collideBottom?: boolean): Phaser.GameObjects.Particles.ParticleBounds;

                /**
                 * Sets the initial radial speed of emitted particles.
                 * 
                 * Changes the emitter to radial mode.
                 * @param x The horizontal speed of the emitted Particles.
                 * @param y The vertical speed of emitted Particles. If not set it will use the `x` value. Default x.
                 * @returns This Particle Emitter.
                 */
                setParticleSpeed(x: number, y?: number): this;

                /**
                 * Sets the vertical and horizontal scale of the emitted particles.
                 * 
                 * You can also set the scale of the entire emitter via `setScale`.
                 * @param x The horizontal scale of the emitted Particles. Default 1.
                 * @param y The vertical scale of emitted Particles. If not set it will use the `x` value. Default x.
                 * @returns This Particle Emitter.
                 */
                setParticleScale(x?: number, y?: number): this;

                /**
                 * Sets the gravity applied to emitted particles.
                 * @param x Horizontal acceleration due to gravity, in pixels per second squared. Set to zero for no gravity.
                 * @param y Vertical acceleration due to gravity, in pixels per second squared. Set to zero for no gravity.
                 * @returns This Particle Emitter.
                 */
                setParticleGravity(x: number, y: number): this;

                /**
                 * Sets the opacity (alpha) of emitted particles.
                 * 
                 * You can also set the alpha of the entire emitter via `setAlpha`.
                 * @param value A value between 0 (transparent) and 1 (opaque).
                 * @returns This Particle Emitter.
                 */
                setParticleAlpha(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): this;

                /**
                 * Sets the color tint of emitted particles.
                 * 
                 * This is a WebGL only feature.
                 * @param value A value between 0 and 0xffffff.
                 * @returns This Particle Emitter.
                 */
                setParticleTint(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): this;

                /**
                 * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream.
                 * 
                 * The value is given in degrees using Phaser's right-handed coordinate system.
                 * @param value The angle of the initial velocity of emitted particles, in degrees.
                 * @returns This Particle Emitter.
                 */
                setEmitterAngle(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this;

                /**
                 * Sets the lifespan of newly emitted particles in milliseconds.
                 * @param value The lifespan of a particle, in ms.
                 * @returns This Particle Emitter.
                 */
                setParticleLifespan(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this;

                /**
                 * Sets the number of particles released at each flow cycle or explosion.
                 * @param quantity The number of particles to release at each flow cycle or explosion.
                 * @returns This Particle Emitter.
                 */
                setQuantity(quantity: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this;

                /**
                 * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency}
                 * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.
                 * @param frequency The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode.
                 * @param quantity The number of particles to release at each flow cycle or explosion.
                 * @returns This Particle Emitter.
                 */
                setFrequency(frequency: number, quantity?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this;

                /**
                 * Adds a new Particle Death Zone to this Emitter.
                 * 
                 * A particle is immediately killed as soon as its x/y coordinates intersect
                 * with any of the configured Death Zones.
                 * 
                 * The `source` can be a Geometry Shape, such as a Circle, Rectangle or Triangle.
                 * Any valid object from the `Phaser.Geometry` namespace is allowed, as long as
                 * it supports a `contains` function. You can set the `type` to be either `onEnter`
                 * or `onLeave`.
                 * 
                 * A single Death Zone instance can only exist once within this Emitter, but can belong
                 * to multiple Emitters.
                 * @param config A Death Zone configuration object, a Death Zone instance, a valid Geometry object or an array of them.
                 * @returns An array of the Death Zones that were added to this Emitter.
                 */
                addDeathZone(config: Phaser.Types.GameObjects.Particles.DeathZoneObject | Phaser.Types.GameObjects.Particles.DeathZoneObject[]): Phaser.GameObjects.Particles.Zones.DeathZone[];

                /**
                 * Removes the given Particle Death Zone from this Emitter.
                 * @param zone The Death Zone that should be removed from this Emitter.
                 * @returns This Particle Emitter.
                 */
                removeDeathZone(zone: Phaser.GameObjects.Particles.Zones.DeathZone): this;

                /**
                 * Clear all Death Zones from this Particle Emitter.undefined
                 * @returns This Particle Emitter.
                 */
                clearDeathZones(): this;

                /**
                 * Adds a new Particle Emission Zone to this Emitter.
                 * 
                 * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges.
                 * Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle;
                 * or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method.
                 * 
                 * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places the particles randomly within its interior.
                 * Its {@link Phaser.GameObjects.Particles.Zones.RandomZone#source source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method.
                 * 
                 * An Emission Zone can only exist once within this Emitter.
                 * @param zone An Emission Zone configuration object, a RandomZone or EdgeZone instance, or an array of them.
                 * @returns An array of the Emission Zones that were added to this Emitter.
                 */
                addEmitZone(zone: Phaser.Types.GameObjects.Particles.EmitZoneData | Phaser.Types.GameObjects.Particles.EmitZoneData[]): Phaser.Types.GameObjects.Particles.EmitZoneObject[];

                /**
                 * Removes the given Particle Emission Zone from this Emitter.
                 * @param zone The Emission Zone that should be removed from this Emitter.
                 * @returns This Particle Emitter.
                 */
                removeEmitZone(zone: Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone): this;

                /**
                 * Clear all Emission Zones from this Particle Emitter.undefined
                 * @returns This Particle Emitter.
                 */
                clearEmitZones(): this;

                /**
                 * Takes the given particle and sets its x/y coordinates to match the next available
                 * emission zone, if any have been configured. This method is called automatically
                 * as part of the `Particle.fire` process.
                 * 
                 * The Emit Zones are iterated in sequence. Once a zone has had a particle emitted
                 * from it, then the next zone is used and so on, in a loop.
                 * @param particle The particle to set the emission zone for.
                 */
                getEmitZone(particle: Phaser.GameObjects.Particles.Particle): void;

                /**
                 * Takes the given particle and checks to see if any of the configured Death Zones
                 * will kill it and returns the result. This method is called automatically as part
                 * of the `Particle.update` process.
                 * @param particle The particle to test against the Death Zones.
                 * @returns `true` if the particle should be killed, otherwise `false`.
                 */
                getDeathZone(particle: Phaser.GameObjects.Particles.Particle): boolean;

                /**
                 * Changes the currently active Emission Zone. The zones should have already
                 * been added to this Emitter either via the emitter config, or the
                 * `addEmitZone` method.
                 * 
                 * Call this method by passing either a numeric zone index value, or
                 * the zone instance itself.
                 * 
                 * Prior to v3.60 an Emitter could only have a single Emit Zone and this
                 * method was how you set it. From 3.60 and up it now performs a different
                 * function and swaps between all available active zones.
                 * @param zone The Emit Zone to set as the active zone.
                 * @returns This Particle Emitter.
                 */
                setEmitZone(zone: number | Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone): this;

                /**
                 * Adds a Particle Processor, such as a Gravity Well, to this Emitter.
                 * 
                 * It will start processing particles from the next update as long as its `active`
                 * property is set.
                 * @param processor The Particle Processor to add to this Emitter Manager.
                 * @returns The Particle Processor that was added to this Emitter Manager.
                 */
                addParticleProcessor<T extends Phaser.GameObjects.Particles.ParticleProcessor>(processor: T): T;

                /**
                 * Removes a Particle Processor from this Emitter.
                 * 
                 * The Processor must belong to this Emitter to be removed.
                 * 
                 * It is not destroyed when removed, allowing you to move it to another Emitter Manager,
                 * so if you no longer require it you should call its `destroy` method directly.
                 * @param processor The Particle Processor to remove from this Emitter Manager.
                 * @returns The Particle Processor that was removed, or null if it could not be found.
                 */
                removeParticleProcessor<T extends Phaser.GameObjects.Particles.ParticleProcessor>(processor: T): T | null;

                /**
                 * Gets all active Particle Processors.undefined
                 * @returns - An array of active Particle Processors.
                 */
                getProcessors(): Phaser.GameObjects.Particles.ParticleProcessor[];

                /**
                 * Creates a new Gravity Well, adds it to this Emitter and returns a reference to it.
                 * @param config Configuration settings for the Gravity Well to create.
                 * @returns The Gravity Well that was created.
                 */
                createGravityWell(config: Phaser.Types.GameObjects.Particles.GravityWellConfig): Phaser.GameObjects.Particles.GravityWell;

                /**
                 * Creates inactive particles and adds them to this emitter's pool.
                 * 
                 * If `ParticleEmitter.maxParticles` is set it will limit the
                 * value passed to this method to make sure it's not exceeded.
                 * @param count The number of particles to create.
                 * @returns This Particle Emitter.
                 */
                reserve(count: number): this;

                /**
                 * Gets the number of active (in-use) particles in this emitter.undefined
                 * @returns The number of particles with `active=true`.
                 */
                getAliveParticleCount(): number;

                /**
                 * Gets the number of inactive (available) particles in this emitter.undefined
                 * @returns The number of particles with `active=false`.
                 */
                getDeadParticleCount(): number;

                /**
                 * Gets the total number of particles in this emitter.undefined
                 * @returns The number of particles, including both alive and dead.
                 */
                getParticleCount(): number;

                /**
                 * Whether this emitter is at either its hard-cap limit (maxParticles), if set, or
                 * the max allowed number of 'alive' particles (maxAliveParticles).undefined
                 * @returns Returns `true` if this Emitter is at its limit, or `false` if no limit, or below the `maxParticles` level.
                 */
                atLimit(): boolean;

                /**
                 * Sets a function to call for each newly emitted particle.
                 * @param callback The function.
                 * @param context The calling context.
                 * @returns This Particle Emitter.
                 */
                onParticleEmit(callback: Phaser.Types.GameObjects.Particles.ParticleEmitterCallback, context?: any): this;

                /**
                 * Sets a function to call for each particle death.
                 * @param callback The function.
                 * @param context The function's calling context.
                 * @returns This Particle Emitter.
                 */
                onParticleDeath(callback: Phaser.Types.GameObjects.Particles.ParticleDeathCallback, context?: any): this;

                /**
                 * Deactivates every particle in this emitter immediately.
                 * 
                 * These particles are killed but do not emit an event or callback.undefined
                 * @returns This Particle Emitter.
                 */
                killAll(): this;

                /**
                 * Calls a function for each active particle in this emitter. The function is
                 * sent two parameters: a reference to the Particle instance and to this Emitter.
                 * @param callback The function.
                 * @param context The function's calling context.
                 * @returns This Particle Emitter.
                 */
                forEachAlive(callback: Phaser.Types.GameObjects.Particles.ParticleEmitterCallback, context: any): this;

                /**
                 * Calls a function for each inactive particle in this emitter.
                 * @param callback The function.
                 * @param context The function's calling context.
                 * @returns This Particle Emitter.
                 */
                forEachDead(callback: Phaser.Types.GameObjects.Particles.ParticleEmitterCallback, context: any): this;

                /**
                 * Enables emitting, sets {@link Phaser.GameObjects.Particles.ParticleEmitter#emitting} to `true`, and resets the flow counter.
                 * 
                 * If this emitter is in flow mode (frequency >= 0; the default), the particle flow will start (or restart).
                 * 
                 * If this emitter is in explode mode (frequency = -1), nothing will happen.
                 * Use {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} or {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} instead.
                 * 
                 * Calling this method will emit the `START` event.
                 * @param advance Advance this number of ms in time through the emitter. Default 0.
                 * @param duration Limit this emitter to only emit particles for the given number of ms. Setting this parameter will override any duration already set in the Emitter configuration object. Default 0.
                 * @returns This Particle Emitter.
                 */
                start(advance?: number, duration?: number): this;

                /**
                 * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#emitting off} the emitter and
                 * stops it from emitting further particles. Currently alive particles will remain
                 * active until they naturally expire unless you set the `kill` parameter to `true`.
                 * 
                 * Calling this method will emit the `STOP` event. When the final particle has
                 * expired the `COMPLETE` event will be emitted.
                 * @param kill Kill all particles immediately (true), or leave them to die after their lifespan expires? (false, the default) Default false.
                 * @returns This Particle Emitter.
                 */
                stop(kill?: boolean): this;

                /**
                 * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Deactivates} the emitter.undefined
                 * @returns This Particle Emitter.
                 */
                pause(): this;

                /**
                 * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Activates} the emitter.undefined
                 * @returns This Particle Emitter.
                 */
                resume(): this;

                /**
                 * Set the property by which active particles are sorted prior to be rendered.
                 * 
                 * It allows you to control the rendering order of the particles.
                 * 
                 * This can be any valid property of the `Particle` class, such as `y`, `alpha`
                 * or `lifeT`.
                 * 
                 * The 'alive' particles array is sorted in place each game frame. Setting a
                 * sort property will override the `particleBringToTop` setting.
                 * 
                 * If you wish to use your own sorting function, see `setSortCallback` instead.
                 * @param property The property on the `Particle` class to sort by.
                 * @param ascending Should the particles be sorted in ascending or descending order? Default true.
                 * @returns This Particle Emitter.
                 */
                setSortProperty(property?: string, ascending?: boolean): this;

                /**
                 * Sets a callback to be used to sort the particles before rendering each frame.
                 * 
                 * This allows you to define your own logic and behavior in the callback.
                 * 
                 * The callback will be sent two parameters: the two Particles being compared,
                 * and must adhere to the criteria of the `compareFn` in `Array.sort`:
                 * 
                 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description
                 * 
                 * Call this method with no parameters to reset the sort callback.
                 * 
                 * Setting your own callback will override both the `particleBringToTop` and
                 * `sortProperty` settings of this Emitter.
                 * @param callback The callback to invoke when the particles are sorted. Leave undefined to reset to the default.
                 * @returns This Particle Emitter.
                 */
                setSortCallback(callback?: Phaser.Types.GameObjects.Particles.ParticleSortCallback): this;

                /**
                 * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}.undefined
                 * @returns This Particle Emitter.
                 */
                depthSort(): this;

                /**
                 * Calculates the difference of two particles, for sorting them by depth.
                 * @param a The first particle.
                 * @param b The second particle.
                 * @returns The difference of a and b's y coordinates.
                 */
                depthSortCallback(a: object, b: object): number;

                /**
                 * Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow.
                 * 
                 * To resume a flow at the current frequency and quantity, use {@link Phaser.GameObjects.Particles.ParticleEmitter#start} instead.
                 * @param frequency The time interval (>= 0) of each flow cycle, in ms.
                 * @param count The number of particles to emit at each flow cycle. Default 1.
                 * @param stopAfter Stop this emitter from firing any more particles once this value is reached. Set to zero for unlimited. Setting this parameter will override any `stopAfter` value already set in the Emitter configuration object.
                 * @returns This Particle Emitter.
                 */
                flow(frequency: number, count?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType, stopAfter?: number): this;

                /**
                 * Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once.
                 * @param count The number of Particles to emit. Default this.quantity.
                 * @param x The x coordinate to emit the Particles from. Default this.x.
                 * @param y The y coordinate to emit the Particles from. Default this.y.
                 * @returns The most recently emitted Particle, or `undefined` if the emitter is at its limit.
                 */
                explode(count?: number, x?: number, y?: number): Phaser.GameObjects.Particles.Particle | undefined;

                /**
                 * Emits particles at the given position. If no position is given, it will
                 * emit from this Emitters current location.
                 * @param x The x coordinate to emit the Particles from. Default this.x.
                 * @param y The y coordinate to emit the Particles from. Default this.y.
                 * @param count The number of Particles to emit. Default this.quantity.
                 * @returns The most recently emitted Particle, or `undefined` if the emitter is at its limit.
                 */
                emitParticleAt(x?: number, y?: number, count?: number): Phaser.GameObjects.Particles.Particle | undefined;

                /**
                 * Emits particles at a given position (or the emitters current position).
                 * @param count The number of Particles to emit. Default this.quantity.
                 * @param x The x coordinate to emit the Particles from. Default this.x.
                 * @param y The y coordinate to emit the Particles from. Default this.y.
                 * @returns The most recently emitted Particle, or `undefined` if the emitter is at its limit.
                 */
                emitParticle(count?: number, x?: number, y?: number): Phaser.GameObjects.Particles.Particle | undefined;

                /**
                 * Fast forwards this Particle Emitter and all of its particles.
                 * 
                 * Works by running the Emitter `preUpdate` handler in a loop until the `time`
                 * has been reached at `delta` steps per loop.
                 * 
                 * All callbacks and emitter related events that would normally be fired
                 * will still be invoked.
                 * 
                 * You can make an emitter 'fast forward' via the emitter config using the
                 * `advance` property. Set this value to the number of ms you wish the
                 * emitter to be fast-forwarded by. Or, call this method post-creation.
                 * @param time The number of ms to advance the Particle Emitter by.
                 * @param delta The amount of delta to use for each step. Defaults to 1000 / 60.
                 * @returns This Particle Emitter.
                 */
                fastForward(time: number, delta?: number): this;

                /**
                 * Updates this emitter and its particles.
                 * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                 * @param delta The delta time, in ms, elapsed since the last frame.
                 */
                preUpdate(time: number, delta: number): void;

                /**
                 * Takes either a Rectangle Geometry object or an Arcade Physics Body and tests
                 * to see if it intersects with any currently alive Particle in this Emitter.
                 * 
                 * Overlapping particles are returned in an array, where you can perform further
                 * processing on them. If nothing overlaps then the array will be empty.
                 * @param target A Rectangle or Arcade Physics Body to check for intersection against all alive particles.
                 * @returns An array of Particles that overlap with the given target.
                 */
                overlap(target: Phaser.Geom.Rectangle | Phaser.Physics.Arcade.Body): Phaser.GameObjects.Particles.Particle[];

                /**
                 * Returns a bounds Rectangle calculated from the bounds of all currently
                 * _active_ Particles in this Emitter. If this Emitter has only just been
                 * created and not yet rendered, then calling this method will return a Rectangle
                 * with a max safe integer for dimensions. Use the `advance` parameter to
                 * avoid this.
                 * 
                 * Typically it takes a few seconds for a flow Emitter to 'warm up'. You can
                 * use the `advance` and `delta` parameters to force the Emitter to
                 * 'fast forward' in time to try and allow the bounds to be more accurate,
                 * as it will calculate the bounds based on the particle bounds across all
                 * timesteps, giving a better result.
                 * 
                 * You can also use the `padding` parameter to increase the size of the
                 * bounds. Emitters with a lot of randomness in terms of direction or lifespan
                 * can often return a bounds smaller than their possible maximum. By using
                 * the `padding` (and `advance` if needed) you can help limit this.
                 * @param padding The amount of padding, in pixels, to add to the bounds Rectangle.
                 * @param advance The number of ms to advance the Particle Emitter by. Defaults to 0, i.e. not used.
                 * @param delta The amount of delta to use for each step. Defaults to 1000 / 60.
                 * @param output The Rectangle to store the results in. If not given a new one will be created.
                 * @returns A Rectangle containing the calculated bounds of this Emitter.
                 */
                getBounds(padding?: number, advance?: number, delta?: number, output?: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle;

                /**
                 * Prints a warning to the console if you mistakenly call this function
                 * thinking it works the same way as Phaser v3.55.
                 */
                createEmitter(): void;

                /**
                 * The x coordinate the particles are emitted from.
                 * 
                 * This is relative to the Emitters x coordinate and that of any parent.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                particleX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;

                /**
                 * The y coordinate the particles are emitted from.
                 * 
                 * This is relative to the Emitters y coordinate and that of any parent.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                particleY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;

                /**
                 * The horizontal acceleration applied to emitted particles, in pixels per second squared.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                accelerationX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The vertical acceleration applied to emitted particles, in pixels per second squared.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                accelerationY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The maximum horizontal velocity emitted particles can reach, in pixels per second.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                maxVelocityX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The maximum vertical velocity emitted particles can reach, in pixels per second.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                maxVelocityY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The initial speed of emitted particles, in pixels per second.
                 * 
                 * If using this as a getter it will return the `speedX` value.
                 * 
                 * If using it as a setter it will update both `speedX` and `speedY` to the
                 * given value.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                speed: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The initial horizontal speed of emitted particles, in pixels per second.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                speedX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The initial vertical speed of emitted particles, in pixels per second.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                speedY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The x coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                moveToX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The y coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                moveToY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The amount of velocity particles will use when rebounding off the
                 * emitter bounds, if set. A value of 0 means no bounce. A value of 1
                 * means a full rebound.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                bounce: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The horizontal scale of emitted particles.
                 * 
                 * This is relative to the Emitters scale and that of any parent.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                particleScaleX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The vertical scale of emitted particles.
                 * 
                 * This is relative to the Emitters scale and that of any parent.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                particleScaleY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * A color tint value that is applied to the texture of the emitted
                 * particle. The value should be given in hex format, i.e. 0xff0000
                 * for a red tint, and should not include the alpha channel.
                 * 
                 * Tints are multiplicative by default, meaning a tint value of white
                 * (0xffffff) will effectively reset the tint to nothing.
                 * 
                 * Modify the `ParticleEmitter.tintMode` property to change the tint mode.
                 * 
                 * When you define the color via the Emitter config you should give
                 * it as an array of color values. The Particle will then interpolate
                 * through these colors over the course of its lifespan. Setting this
                 * will override any `tint` value that may also be given.
                 * 
                 * This is a WebGL only feature.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                particleColor: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * Controls the easing function used when you have created an
                 * Emitter that uses the `color` property to interpolate the
                 * tint of Particles over their lifetime.
                 * 
                 * Setting this has no effect if you haven't also applied a
                 * `particleColor` to this Emitter.
                 */
                colorEase: string;

                /**
                 * A color tint value that is applied to the texture of the emitted
                 * particle. The value should be given in hex format, i.e. 0xff0000
                 * for a red tint, and should not include the alpha channel.
                 * 
                 * Tints are multiplicative by default, meaning a tint value of white
                 * (0xffffff) will effectively reset the tint to nothing.
                 * 
                 * Modify the `ParticleEmitter.tintMode` property to change the tint mode.
                 * 
                 * The `tint` value will be overridden if a `color` array is provided.
                 * 
                 * This is a WebGL only feature.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                particleTint: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The alpha value of the emitted particles. This is a value
                 * between 0 and 1. Particles with alpha zero are invisible
                 * and are therefore not rendered, but are still processed
                 * by the Emitter.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                particleAlpha: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The lifespan of the emitted particles. This value is given
                 * in milliseconds and defaults to 1000ms (1 second). When a
                 * particle reaches this amount it is killed.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                lifespan: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The angle at which the particles are emitted. The values are
                 * given in degrees. This allows you to control the direction
                 * of the emitter. If you wish instead to change the rotation
                 * of the particles themselves, see the `particleRotate` property.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                particleAngle: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The rotation (or angle) of each particle when it is emitted.
                 * The value is given in degrees and uses a right-handed
                 * coordinate system, where 0 degrees points to the right, 90 degrees
                 * points down and -90 degrees points up.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                particleRotate: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The number of particles that are emitted each time an emission
                 * occurs, i.e. from one 'explosion' or each frame in a 'flow' cycle.
                 * 
                 * The default is 1.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                quantity: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The number of milliseconds to wait after emission before
                 * the particles start updating. This allows you to emit particles
                 * that appear 'static' or still on-screen and then, after this value,
                 * begin to move.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                delay: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The number of milliseconds to wait after a particle has finished
                 * its life before it will be removed. This allows you to 'hold' a
                 * particle on the screen once it has reached its final state
                 * before it then vanishes.
                 * 
                 * Note that all particle updates will cease, including changing
                 * alpha, scale, movement or animation.
                 * 
                 * Accessing this property should typically return a number.
                 * However, it can be set to any valid EmitterOp onEmit type.
                 */
                hold: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;

                /**
                 * The internal flow counter.
                 * 
                 * Treat this property as read-only.
                 */
                flowCounter: number;

                /**
                 * The internal frame counter.
                 * 
                 * Treat this property as read-only.
                 */
                frameCounter: number;

                /**
                 * The internal animation counter.
                 * 
                 * Treat this property as read-only.
                 */
                animCounter: number;

                /**
                 * The internal elapsed counter.
                 * 
                 * Treat this property as read-only.
                 */
                elapsed: number;

                /**
                 * The internal stop counter.
                 * 
                 * Treat this property as read-only.
                 */
                stopCounter: number;

                /**
                 * The internal complete flag.
                 * 
                 * Treat this property as read-only.
                 */
                completeFlag: boolean;

                /**
                 * The internal zone index.
                 * 
                 * Treat this property as read-only.
                 */
                zoneIndex: number;

                /**
                 * The internal zone total.
                 * 
                 * Treat this property as read-only.
                 */
                zoneTotal: number;

                /**
                 * The current frame index.
                 * 
                 * Treat this property as read-only.
                 */
                currentFrame: number;

                /**
                 * The current animation index.
                 * 
                 * Treat this property as read-only.
                 */
                currentAnim: number;

                /**
                 * Destroys this Particle Emitter and all Particles it owns.
                 */
                preDestroy(): void;

                /**
                 * The Camera used for filters.
                 * You can use this to alter the perspective of filters.
                 * It is not necessary to use this camera for ordinary rendering.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                filterCamera: Phaser.Cameras.Scene2D.Camera;

                /**
                 * The filter lists for this Game Object.
                 * This is an object with `internal` and `external` properties.
                 * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

                /**
                 * Whether any filters should be rendered on this Game Object.
                 * This is `true` by default, even if there are no filters yet.
                 * Disable this to skip filter rendering.
                 * 
                 * Use `willRenderFilters()` to see if there are any active filters.
                 */
                renderFilters: boolean;

                /**
                 * The maximum size of the base filter texture.
                 * Filters may use a larger texture after the base texture is rendered.
                 * The maximum texture size is at least 4096 in WebGL, based on the hardware.
                 * You may set this lower to save memory or prevent resizing.
                 */
                maxFilterSize: Phaser.Math.Vector2;

                /**
                 * Whether `filterCamera` should update every frame
                 * to focus on the Game Object.
                 * Disable this if you want to manually control the camera.
                 */
                filtersAutoFocus: boolean;

                /**
                 * Whether the filters should focus on the context,
                 * rather than attempt to focus on the Game Object.
                 * This is enabled automatically when enabling filters on objects
                 * which don't have well-defined bounds.
                 * 
                 * This effectively sets the internal filters to render the same way
                 * as the external filters.
                 * 
                 * This is only used if `filtersAutoFocus` is enabled.
                 * 
                 * The "context" is the framebuffer to which the Game Object is rendered.
                 * This is usually the main framebuffer, but might be another framebuffer.
                 * It can even be several different framebuffers if the Game Object is
                 * rendered multiple times.
                 */
                filtersFocusContext: boolean;

                /**
                 * Whether the Filters component should always draw to a framebuffer,
                 * even if there are no active filters.
                 */
                filtersForceComposite: boolean;

                /**
                 * Whether this Game Object will render filters.
                 * This is true if it has active filters,
                 * and if the `renderFilters` property is also true.undefined
                 * @returns Whether the Game Object will render filters.
                 */
                willRenderFilters(): boolean;

                /**
                 * Enable this Game Object to have filters.
                 * 
                 * You need to call this method if you want to use the `filterCamera`
                 * and `filters` properties. It sets up the necessary data structures.
                 * You may disable filter rendering with the `renderFilters` property.
                 * 
                 * This is a WebGL only feature. It will return early if not available.undefined
                 * @returns undefined
                 */
                enableFilters(): this;

                /**
                 * Render this object using filters.
                 * 
                 * This function's scope is not guaranteed, so it doesn't refer to `this`.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
                 * @returns undefined
                 */
                renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

                /**
                 * Focus the filter camera.
                 * This sets the size and position of the filter camera to match the GameObject.
                 * This is called automatically on render if `filtersAutoFocus` is enabled.
                 * 
                 * This will focus on the GameObject's raw dimensions if available.
                 * If the GameObject has no dimensions, this will focus on the context:
                 * the camera belonging to the DrawingContext used to render the GameObject.
                 * Context focus occurs during rendering,
                 * as the context is not known until then.undefined
                 * @returns undefined
                 */
                focusFilters(): this;

                /**
                 * Focus the filter camera on a specific camera.
                 * This is used internally when `filtersFocusContext` is enabled.
                 * @param camera The camera to focus on.
                 * @returns undefined
                 */
                focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

                /**
                 * Manually override the focus of the filter camera.
                 * This allows you to set the size and position of the filter camera manually.
                 * It deactivates `filtersAutoFocus` when called.
                 * 
                 * The camera will set scroll to place the game object at the
                 * given position within a rectangle of the given width and height.
                 * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
                 * will focus the camera to place the object's center
                 * 100 pixels above the center of the camera (which is at 400x300).
                 * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param width The width of the focus area. Default is the filter width.
                 * @param height The height of the focus area. Default is the filter height.
                 * @returns undefined
                 */
                focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Set the base size of the filter camera.
                 * This is the size of the texture that internal filters will be drawn to.
                 * External filters are drawn to the size of the context (usually the game canvas).
                 * 
                 * This is typically the size of the GameObject.
                 * It is set automatically when the Game Object is rendered
                 * and `filtersAutoFocus` is enabled.
                 * Turn off auto focus to set it manually.
                 * 
                 * Technically, larger framebuffers may be used to provide padding.
                 * This is the size of the final framebuffer used for "internal" rendering.
                 * @param width Base width of the filter texture.
                 * @param height Base height of the filter texture.
                 * @returns undefined
                 */
                setFilterSize(width: number, height: number): this;

                /**
                 * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
                 * Sets the `filtersAutoFocus` property.
                 * @param value Whether filters should be updated every frame.
                 * @returns undefined
                 */
                setFiltersAutoFocus(value: boolean): this;

                /**
                 * Set whether the filters should focus on the context.
                 * Sets the `filtersFocusContext` property.
                 * @param value Whether the filters should focus on the context.
                 * @returns undefined
                 */
                setFiltersFocusContext(value: boolean): this;

                /**
                 * Set whether the filters should always draw to a framebuffer.
                 * Sets the `filtersForceComposite` property.
                 * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
                 * @returns undefined
                 */
                setFiltersForceComposite(value: boolean): this;

                /**
                 * Set whether the filters should be rendered.
                 * Sets the `renderFilters` property.
                 * @param value Whether the filters should be rendered.
                 * @returns undefined
                 */
                setRenderFilters(value: boolean): this;

                /**
                 * Run a step in the render process.
                 * This is called automatically by the Render module.
                 * 
                 * In most cases, it just runs the `renderWebGL` function.
                 * 
                 * When `_renderSteps` has more than one entry,
                 * such as when Filters are enabled for this object,
                 * it allows those processes to defer `renderWebGL`
                 * and otherwise manage the flow of rendering.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep Which step of the rendering process should be run? Default 0.
                 * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
                 * @param displayListIndex The index of the Game Object within the display list. Default 0.
                 */
                renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

                /**
                 * Adds a render step function to this Game Object's WebGL render pipeline.
                 * 
                 * The first render step in `_renderSteps` is run first.
                 * It should call the next render step in the list.
                 * This allows render steps to control the rendering flow.
                 * @param fn The render step function to add.
                 * @param index The index in the render list to add the step to. Omit to add to the end.
                 * @returns This Game Object instance.
                 */
                addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

                /**
                 * Clears the alpha value associated with this Game Object.
                 * 
                 * Immediately sets the alpha back to 1 (fully opaque).undefined
                 * @returns This Game Object instance.
                 */
                clearAlpha(): this;

                /**
                 * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
                 * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
                 * @param value The alpha value applied across the whole Game Object. Default 1.
                 * @returns This Game Object instance.
                 */
                setAlpha(value?: number): this;

                /**
                 * The alpha value of the Game Object.
                 * 
                 * This is a global value, impacting the entire Game Object, not just a region of it.
                 * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
                 * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
                 */
                alpha: number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 */
                blendMode: Phaser.BlendModes | string | number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 * @param value The BlendMode value. Either a string, a CONST or a number.
                 * @returns This Game Object instance.
                 */
                setBlendMode(value: string | Phaser.BlendModes | number): this;

                /**
                 * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * The default depth is zero. A Game Object with a higher depth
                 * value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 */
                depth: number;

                /**
                 * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * A Game Object with a higher depth value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
                 * @returns This Game Object instance.
                 */
                setDepth(value: number): this;

                /**
                 * Sets this Game Object to be at the top of the display list, or the top of its parent container.
                 * 
                 * Being at the top means it will render on top of everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToTop(): this;

                /**
                 * Sets this Game Object to the back of the display list, or the back of its parent container.
                 * 
                 * Being at the back means it will render below everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToBack(): this;

                /**
                 * Move this Game Object so that it appears above the given Game Object.
                 * 
                 * This means it will render immediately after the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be above.
                 * @returns This Game Object instance.
                 */
                setAbove(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * Move this Game Object so that it appears below the given Game Object.
                 * 
                 * This means it will render immediately under the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be below.
                 * @returns This Game Object instance.
                 */
                setBelow(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * Controls whether this Game Object participates in the WebGL lighting system.
                 * When `true`, the object will respond to dynamic lights added via the Lights plugin,
                 * using normal maps to calculate per-pixel diffuse lighting.
                 * 
                 * This flag is used to select the appropriate WebGL shader at render time.
                 */
                readonly lighting: boolean;

                /**
                 * Configuration object controlling self-shadowing for this Game Object.
                 * Self-shadowing causes surfaces to cast contact shadows on themselves based on
                 * the normal map, giving the appearance of depth. It is only active when
                 * `lighting` is also enabled.
                 * 
                 * If `enabled` is `null`, the value from the game config option `render.selfShadow`
                 * is used instead.
                 * 
                 * This object is used to select and configure the appropriate WebGL shader at render time.
                 */
                selfShadow: Object;

                /**
                 * Enables or disables WebGL-based per-pixel lighting for this Game Object.
                 * When enabled, the object will respond to dynamic lights added to the scene
                 * via the Lights plugin, using a normal map for lighting calculations.
                 * Disabling lighting restores the standard unlit rendering path.
                 * @param enable `true` to use lighting, or `false` to disable it.
                 * @returns This GameObject instance.
                 */
                setLighting(enable: boolean): this;

                /**
                 * Configures the self-shadowing properties of this Game Object.
                 * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
                 * giving the impression of depth and raised detail. It is only active when
                 * `lighting` is also enabled on this Game Object.
                 * 
                 * Parameters that are `undefined` are left unchanged, allowing partial updates.
                 * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
                 * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
                 * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
                 * @returns This GameObject instance.
                 */
                setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

                /**
                 * The Mask this Game Object is using during render, or `null` if no mask has been set.
                 */
                mask: Phaser.Display.Masks.GeometryMask;

                /**
                 * Sets the mask that this Game Object will use to render with.
                 * 
                 * The mask must have been previously created and must be a GeometryMask.
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * 
                 * If a mask is already set on this Game Object it will be immediately replaced.
                 * 
                 * Masks are positioned in global space and are not relative to the Game Object to which they
                 * are applied. The reason for this is that multiple Game Objects can all share the same mask.
                 * 
                 * Masks have no impact on physics or input detection. They are purely a rendering component
                 * that allows you to limit what is visible during the render pass.
                 * @param mask The mask this Game Object will use when rendering.
                 * @returns This Game Object instance.
                 */
                setMask(mask: Phaser.Display.Masks.GeometryMask): this;

                /**
                 * Clears the mask that this Game Object was using.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param destroyMask Destroy the mask before clearing it? Default false.
                 * @returns This Game Object instance.
                 */
                clearMask(destroyMask?: boolean): this;

                /**
                 * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
                 * including this one.
                 * 
                 * To create the mask you need to pass in a reference to a Graphics Game Object.
                 * 
                 * If you do not provide a graphics object, and this Game Object is an instance
                 * of a Graphics object, then it will use itself to create the mask.
                 * 
                 * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
                 * @returns This Geometry Mask that was created.
                 */
                createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

                /**
                 * Customized WebGL render nodes of this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * A default set of RenderNodes is coded into the engine,
                 * but the renderer will check this object first to see if a custom node has been set.
                 */
                customRenderNodes: object;

                /**
                 * The default RenderNodes for this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * These are the nodes that are used if no custom ones are set.
                 * 
                 * RenderNodes are identified by a unique key for their role.
                 * 
                 * Common role keys include:
                 * 
                 * - 'Submitter': responsible for running other node roles for each element.
                 * - 'Transformer': responsible for providing vertex coordinates for an element.
                 * - 'Texturer': responsible for handling textures for an element.
                 */
                defaultRenderNodes: object;

                /**
                 * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * 
                 * Render nodes store their data under their own name, not their role.
                 */
                renderNodeData: object;

                /**
                 * Initializes the render nodes for this Game Object.
                 * 
                 * This method is called when the Game Object is added to the Scene.
                 * It is responsible for setting up the default render nodes
                 * this Game Object will use.
                 * @param defaultNodes The default render nodes to set for this Game Object.
                 */
                initRenderNodes(defaultNodes: Map<string, string>): void;

                /**
                 * Sets the RenderNode for a given role.
                 * 
                 * Also sets the relevant render node data object, if specified.
                 * 
                 * If the node cannot be set, no changes are made.
                 * @param key The key of the role to set the render node for.
                 * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
                 * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
                 * @returns This Game Object instance.
                 */
                setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

                /**
                 * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
                 * 
                 * If `key` is not set, it is created. If it is set, it is updated.
                 * 
                 * If `value` is undefined and `key` exists, the key is removed.
                 * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
                 * @param key The key of the property to set.
                 * @param value The value to set the property to.
                 * @returns This Game Object instance.
                 */
                setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

                /**
                 * The horizontal scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorX: number;

                /**
                 * The vertical scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorY: number;

                /**
                 * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
                 * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
                 * and `scrollFactorY` in a single call.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 * @param x The horizontal scroll factor of this Game Object.
                 * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScrollFactor(x: number, y?: number): this;

                /**
                 * The Texture this Game Object is using to render with.
                 */
                texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

                /**
                 * The Texture Frame this Game Object is using to render with.
                 */
                frame: Phaser.Textures.Frame;

                /**
                 * Sets the texture and frame this Game Object will use to render with.
                 * 
                 * Textures are referenced by their string-based keys, as stored in the Texture Manager.
                 * 
                 * Calling this method will modify the `width` and `height` properties of your Game Object.
                 * 
                 * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
                 * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.
                 * @param frame The name or index of the frame within the Texture.
                 * @param updateSize Should this call adjust the size of the Game Object? Default true.
                 * @param updateOrigin Should this call change the origin of the Game Object? Default true.
                 * @returns This Game Object instance.
                 */
                setTexture(key: string | Phaser.Textures.Texture, frame?: string | number, updateSize?: boolean, updateOrigin?: boolean): this;

                /**
                 * Sets the frame this Game Object will use to render with.
                 * 
                 * If you pass a string or index then the Frame has to belong to the current Texture being used
                 * by this Game Object.
                 * 
                 * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
                 * 
                 * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
                 * 
                 * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
                 * @param frame The name or index of the frame within the Texture, or a Frame instance.
                 * @param updateSize Should this call adjust the size of the Game Object? Default true.
                 * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
                 * @returns This Game Object instance.
                 */
                setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

                /**
                 * A property indicating that a Game Object has this component.
                 */
                readonly hasTransformComponent: boolean;

                /**
                 * The x position of this Game Object.
                 */
                x: number;

                /**
                 * The y position of this Game Object.
                 */
                y: number;

                /**
                 * The z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#depth} instead.
                 */
                z: number;

                /**
                 * The w position of this Game Object.
                 */
                w: number;

                /**
                 * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
                 * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
                 * 
                 * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
                 * isn't the case, use the `scaleX` or `scaleY` properties instead.
                 */
                scale: number;

                /**
                 * The horizontal scale of this Game Object.
                 */
                scaleX: number;

                /**
                 * The vertical scale of this Game Object.
                 */
                scaleY: number;

                /**
                 * The angle of this Game Object as expressed in degrees.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
                 * and -90 is up.
                 * 
                 * If you prefer to work in radians, see the `rotation` property instead.
                 */
                angle: number;

                /**
                 * The angle of this Game Object in radians.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
                 * and -PI/2 is up.
                 * 
                 * If you prefer to work in degrees, see the `angle` property instead.
                 */
                rotation: number;

                /**
                 * Sets the position of this Game Object.
                 * @param x The x position of this Game Object. Default 0.
                 * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
                 * @param z The z position of this Game Object. Default 0.
                 * @param w The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setPosition(x?: number, y?: number, z?: number, w?: number): this;

                /**
                 * Copies an object's coordinates to this Game Object's position.
                 * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
                 * @returns This Game Object instance.
                 */
                copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

                /**
                 * Sets the position of this Game Object to be a random position within the confines of
                 * the given area.
                 * 
                 * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
                 * 
                 * The position does not factor in the size of this Game Object, meaning that only the origin is
                 * guaranteed to be within the area.
                 * @param x The x position of the top-left of the random area. Default 0.
                 * @param y The y position of the top-left of the random area. Default 0.
                 * @param width The width of the random area.
                 * @param height The height of the random area.
                 * @returns This Game Object instance.
                 */
                setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Sets the rotation of this Game Object.
                 * @param radians The rotation of this Game Object, in radians. Default 0.
                 * @returns This Game Object instance.
                 */
                setRotation(radians?: number): this;

                /**
                 * Sets the angle of this Game Object.
                 * @param degrees The rotation of this Game Object, in degrees. Default 0.
                 * @returns This Game Object instance.
                 */
                setAngle(degrees?: number): this;

                /**
                 * Sets the scale of this Game Object.
                 * @param x The horizontal scale of this Game Object. Default 1.
                 * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScale(x?: number, y?: number): this;

                /**
                 * Sets the x position of this Game Object.
                 * @param value The x position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setX(value?: number): this;

                /**
                 * Sets the y position of this Game Object.
                 * @param value The y position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setY(value?: number): this;

                /**
                 * Sets the z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
                 * @param value The z position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setZ(value?: number): this;

                /**
                 * Sets the w position of this Game Object.
                 * @param value The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setW(value?: number): this;

                /**
                 * Gets the local transform matrix for this Game Object.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @returns The populated Transform Matrix.
                 */
                getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @param parentMatrix A temporary matrix to hold parent values during the calculations.
                 * @returns The populated Transform Matrix.
                 */
                getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Takes the given `x` and `y` coordinates and converts them into local space for this
                 * Game Object, taking into account parent and local transforms, and the Display Origin.
                 * 
                 * The returned Vector2 contains the translated point in its properties.
                 * 
                 * A Camera needs to be provided in order to handle modified scroll factors. If no
                 * camera is specified, it will use the `main` camera from the Scene to which this
                 * Game Object belongs.
                 * @param x The x position to translate.
                 * @param y The y position to translate.
                 * @param point A Vector2, or point-like object, to store the results in.
                 * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
                 * @returns The translated point.
                 */
                getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

                /**
                 * Gets the world position of this Game Object, factoring in any parent Containers.
                 * @param point A Vector2, or point-like object, to store the result in.
                 * @param tempMatrix A temporary matrix to hold the Game Object's values.
                 * @param parentMatrix A temporary matrix to hold parent values.
                 * @returns The world position of this Game Object.
                 */
                getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

                /**
                 * Gets the sum total rotation of all of this Game Object's parent Containers.
                 * 
                 * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
                 * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
                 */
                getParentRotation(): number;

                /**
                 * The visible state of the Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 */
                visible: boolean;

                /**
                 * Sets the visibility of this Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 * @param value The visible state of the Game Object.
                 * @returns This Game Object instance.
                 */
                setVisible(value: boolean): this;

            }

            /**
             * This class provides the structure required for all Particle Processors.
             * 
             * You should extend it and add the functionality required for your processor,
             * including tidying up any resources this may create in the `destroy` method.
             * 
             * See the GravityWell for an example of a processor.
             */
            class ParticleProcessor {
                /**
                 * 
                 * @param x The x coordinate of the Particle Processor, in world space. Default 0.
                 * @param y The y coordinate of the Particle Processor, in world space. Default 0.
                 * @param active The active state of this Particle Processor. Default true.
                 */
                constructor(x?: number, y?: number, active?: boolean);

                /**
                 * A reference to the Particle Emitter that owns this Processor.
                 * This is set automatically when the Processor is added to an Emitter
                 * and nulled when removed or destroyed.
                 */
                emitter: Phaser.GameObjects.Particles.ParticleEmitter;

                /**
                 * The x coordinate of the Particle Processor, in world space.
                 */
                x: number;

                /**
                 * The y coordinate of the Particle Processor, in world space.
                 */
                y: number;

                /**
                 * The active state of the Particle Processor.
                 * 
                 * An inactive Particle Processor will be skipped for processing by
                 * its parent Emitter.
                 */
                active: boolean;

                /**
                 * The Particle Processor update method should be overridden by your own
                 * method and handle the processing of the particles, typically modifying
                 * their velocityX/Y values based on the criteria of this processor.
                 * @param particle The Particle to update.
                 * @param delta The delta time in ms.
                 * @param step The delta value divided by 1000.
                 * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
                 */
                update(particle: Phaser.GameObjects.Particles.Particle, delta: number, step: number, t: number): void;

                /**
                 * Destroys this Particle Processor by removing all external references.
                 * 
                 * This is called automatically when the owning Particle Emitter is destroyed.
                 */
                destroy(): void;

            }

            namespace Events {
                /**
                 * The Particle Emitter Complete Event.
                 * 
                 * This event is dispatched when the final particle, emitted from a Particle Emitter that
                 * has been stopped, dies. Upon receipt of this event you know that no particles are
                 * still rendering at this point in time.
                 * 
                 * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('complete', listener)`.
                 */
                const COMPLETE: string;

                /**
                 * The Particle Emitter Death Zone Event.
                 * 
                 * This event is dispatched when a Death Zone kills a Particle instance.
                 * 
                 * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('deathzone', listener)`.
                 * 
                 * If you wish to know when the final particle is killed, see the `COMPLETE` event.
                 */
                const DEATH_ZONE: string;

                /**
                 * The Particle Emitter Explode Event.
                 * 
                 * This event is dispatched when a Particle Emitter explodes a set of particles.
                 * 
                 * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('explode', listener)`.
                 */
                const EXPLODE: string;

                /**
                 * The Particle Emitter Start Event.
                 * 
                 * This event is dispatched when a Particle Emitter starts emission of particles.
                 * 
                 * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('start', listener)`.
                 */
                const START: string;

                /**
                 * The Particle Emitter Stop Event.
                 * 
                 * This event is dispatched when a Particle Emitter is stopped. This can happen either
                 * when you directly call the `ParticleEmitter.stop` method, or if the emitter has
                 * been configured to stop after a set time via the `duration` property, or after a
                 * set number of particles via the `stopAfter` property.
                 * 
                 * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('stop', listener)`.
                 * 
                 * Note that just because the emitter has stopped, that doesn't mean there aren't still
                 * particles alive and rendering. It just means the emitter has stopped emitting particles.
                 * 
                 * If you wish to know when the final particle is killed, see the `COMPLETE` event.
                 */
                const STOP: string;

            }

            namespace Zones {
                /**
                 * A Death Zone.
                 * 
                 * A Death Zone is a special type of zone that will kill a Particle as soon as it either enters, or leaves, the zone.
                 * 
                 * The zone consists of a `source` which could be a Geometric shape, such as a Rectangle or Ellipse, or your own
                 * object as long as it includes a `contains` method for which the Particles can be tested against.
                 */
                class DeathZone {
                    /**
                     * 
                     * @param source An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments.
                     * @param killOnEnter Should the Particle be killed when it enters the zone? `true` or leaves it? `false`
                     */
                    constructor(source: Phaser.Types.GameObjects.Particles.DeathZoneSource, killOnEnter: boolean);

                    /**
                     * An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments.
                     * This could be a Geometry shape, such as `Phaser.Geom.Circle`, or your own custom object.
                     */
                    source: Phaser.Types.GameObjects.Particles.DeathZoneSource;

                    /**
                     * Set to `true` if the Particle should be killed if it enters this zone.
                     * Set to `false` to kill the Particle if it leaves this zone.
                     */
                    killOnEnter: boolean;

                    /**
                     * Checks if the given Particle will be killed or not by this zone.
                     * @param particle The particle to test against this Death Zone.
                     * @returns Return `true` if the Particle is to be killed, otherwise return `false`.
                     */
                    willKill(particle: Phaser.GameObjects.Particles.Particle): boolean;

                }

                /**
                 * An Edge Zone is an emit zone for a Particle Emitter that places emitted particles
                 * sequentially along the edges of a shape. The shape is defined by a source object
                 * that provides a `getPoints(quantity, stepRate)` method, such as a Phaser Curve,
                 * Path, or any compatible geometry object.
                 * 
                 * As each particle is emitted, it is positioned at the next point along the shape's
                 * edge, cycling through all points in order. If `yoyo` is enabled, the traversal
                 * reverses direction when it reaches either end, creating a back-and-forth effect.
                 * If `seamless` is enabled, duplicate endpoints are removed to avoid stacking
                 * particles at the join when the shape loops back on itself.
                 * 
                 * Use this zone when you want particles to trace or outline a shape — for example,
                 * sparks running along a wire, particles orbiting a path, or effects that follow
                 * the boundary of a geometric figure.
                 */
                class EdgeZone {
                    /**
                     * 
                     * @param source An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.
                     * @param quantity The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.
                     * @param stepRate The distance between each particle. When set, `quantity` is implied and should be set to 0.
                     * @param yoyo Whether particles are placed from start to end and then end to start. Default false.
                     * @param seamless Whether one endpoint will be removed if it's identical to the other. Default true.
                     * @param total The total number of particles this zone will emit before passing over to the next emission zone in the Emitter. -1 means it will never pass over and you must use `setEmitZone` to change it. Default -1.
                     */
                    constructor(source: Phaser.Types.GameObjects.Particles.EdgeZoneSource, quantity: number, stepRate?: number, yoyo?: boolean, seamless?: boolean, total?: number);

                    /**
                     * An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.
                     */
                    source: Phaser.Types.GameObjects.Particles.EdgeZoneSource | Phaser.Types.GameObjects.Particles.RandomZoneSource;

                    /**
                     * The points placed on the source edge.
                     */
                    points: Phaser.Math.Vector2[];

                    /**
                     * The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.
                     */
                    quantity: number;

                    /**
                     * The distance between each particle. When set, `quantity` is implied and should be set to 0.
                     */
                    stepRate: number;

                    /**
                     * Whether particles are placed from start to end and then end to start.
                     */
                    yoyo: boolean;

                    /**
                     * The counter used for iterating the EdgeZone's points.
                     */
                    counter: number;

                    /**
                     * Whether one endpoint will be removed if it's identical to the other.
                     */
                    seamless: boolean;

                    /**
                     * The total number of particles this zone will emit before the Emitter
                     * transfers control over to the next zone in its emission zone list.
                     * 
                     * By default this is -1, meaning it will never pass over from this
                     * zone to another one. You can call the `ParticleEmitter.setEmitZone`
                     * method to change it, or set this value to something else via the
                     * config, or directly at runtime.
                     * 
                     * A value of 1 would mean the zones rotate in order, but it can
                     * be set to any integer value.
                     */
                    total: number;

                    /**
                     * Update the {@link Phaser.GameObjects.Particles.Zones.EdgeZone#points} from the EdgeZone's
                     * {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}.
                     * 
                     * Also updates internal properties.undefined
                     * @returns This Edge Zone.
                     */
                    updateSource(): this;

                    /**
                     * Change the source of the EdgeZone, replacing the existing shape with a new one.
                     * The new source must provide a `getPoints(quantity, stepRate)` method. After
                     * the source is replaced, `updateSource` is called automatically to regenerate
                     * the edge points and reset internal state accordingly.
                     * @param source An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.
                     * @returns This Edge Zone.
                     */
                    changeSource(source: Phaser.Types.GameObjects.Particles.EdgeZoneSource): this;

                    /**
                     * Get the next point in the Zone and set its coordinates on the given Particle.
                     * 
                     * Points are stepped through sequentially. When the end of the point list is
                     * reached, the counter wraps back to the start, or reverses direction if `yoyo`
                     * is enabled. Called automatically by the Particle Emitter each time a new
                     * particle is emitted.
                     * @param particle The Particle.
                     */
                    getPoint(particle: Phaser.GameObjects.Particles.Particle): void;

                }

                /**
                 * A Random Zone is an Emit Zone that places particles at random positions within the area of a
                 * shape. The shape must provide a `getRandomPoint` method, which receives a Vector2 and populates
                 * it with a random coordinate from anywhere inside the shape.
                 * 
                 * Phaser geometry objects such as `Phaser.Geom.Rectangle`, `Phaser.Geom.Circle`,
                 * `Phaser.Geom.Ellipse`, and `Phaser.Geom.Triangle` all implement this method and can be used
                 * directly as the source for this zone.
                 * 
                 * Use this zone when you want particles to spawn at random positions distributed across the
                 * interior of a shape. To spawn particles along the edges of a shape instead, use an EdgeZone.
                 */
                class RandomZone {
                    /**
                     * 
                     * @param source An object instance with a `getRandomPoint(point)` method.
                     */
                    constructor(source: Phaser.Types.GameObjects.Particles.RandomZoneSource);

                    /**
                     * An object instance with a `getRandomPoint(point)` method.
                     */
                    source: Phaser.Types.GameObjects.Particles.RandomZoneSource;

                    /**
                     * The total number of particles this zone will emit before the Emitter
                     * transfers control over to the next zone in its emission zone list.
                     * 
                     * By default this is -1, meaning it will never pass over from this
                     * zone to another one. You can call the `ParticleEmitter.setEmitZone`
                     * method to change it, or set this value to something else via the
                     * config, or directly at runtime.
                     * 
                     * A value of 1 would mean the zones rotate in order, but it can
                     * be set to any integer value.
                     */
                    total: number;

                    /**
                     * Get the next point in the Zone and set its coordinates on the given Particle.
                     * @param particle The Particle.
                     */
                    getPoint(particle: Phaser.GameObjects.Particles.Particle): void;

                }

            }

        }

        /**
         * A PathFollower is a Sprite that automatically moves along a {@link Phaser.Curves.Path}, making it ideal
         * for cutscenes, enemy patrol routes, moving platforms, projectile arcs, or any Game Object that should
         * travel a predefined course through the world.
         * 
         * It extends Sprite, so everything available on a standard Sprite — animations, tinting, scaling,
         * alpha, blend modes, and so on — works identically here.
         * 
         * A PathFollower is bound to a single Path at any one time and can traverse the full length of that
         * Path from start to finish, in either direction, or from any given point along it to the end.
         * Playback speed and duration are controlled via a tween-like configuration object passed to
         * `startFollow`. The follower can optionally rotate to face the direction of travel, be offset
         * from the path coordinates, or rotate independently of the Path.
         */
        class PathFollower extends Phaser.GameObjects.Sprite implements Phaser.GameObjects.Components.PathFollower {
            /**
             * 
             * @param scene The Scene to which this PathFollower belongs.
             * @param path The Path this PathFollower is following. It can only follow one Path at a time.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             */
            constructor(scene: Phaser.Scene, path: Phaser.Curves.Path, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number);

            /**
             * An additional vector to add to the PathFollowers position, allowing you to offset it from the
             * Path coordinates.
             */
            pathOffset: Phaser.Math.Vector2;

            /**
             * A Vector2 that stores the current point of the path the follower is on.
             */
            pathVector: Phaser.Math.Vector2;

            /**
             * The distance the follower has traveled from the previous point to the current one, at the last update.
             */
            pathDelta: Phaser.Math.Vector2;

            /**
             * The Tween used for following the Path.
             */
            pathTween: Phaser.Tweens.Tween;

            /**
             * Settings for the PathFollower.
             */
            pathConfig: Phaser.Types.GameObjects.PathFollower.PathConfig | null;

            /**
             * Internal update handler that advances this PathFollower along the path.
             * 
             * Called automatically by the Scene step, should not typically be called directly.
             * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
             * @param delta The delta time, in ms, elapsed since the last frame.
             */
            protected preUpdate(time: number, delta: number): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the size of this Game Object to be that of the given Frame.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param frame The frame to base the size of this Game Object on.
             * @returns This Game Object instance.
             */
            setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display (rendered) size of this Game Object in pixels.
             * 
             * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
             * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
             * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
             * the scale manually, but more convenient when you want to work in pixel values directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * A boolean flag indicating if this Game Object is being cropped or not.
             * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
             * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
             */
            isCropped: boolean;

            /**
             * Applies a crop to a texture based Game Object, such as a Sprite or Image.
             * 
             * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
             * 
             * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
             * changes what is shown when rendered.
             * 
             * The crop size as well as coordinates can not exceed the size of the texture frame.
             * 
             * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
             * 
             * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
             * half of it, you could call `setCrop(0, 0, 400, 600)`.
             * 
             * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
             * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
             * 
             * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
             * 
             * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
             * 
             * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
             * the renderer to skip several internal calculations.
             * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
             * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
             * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
             * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
             * @returns This Game Object instance.
             */
            setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture.
             * @returns This Game Object instance.
             */
            setTexture(key: string, frame?: string | number): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

            /**
             * The Path this PathFollower is following. It can only follow one Path at a time.
             */
            path: Phaser.Curves.Path;

            /**
             * Should the PathFollower automatically rotate to point in the direction of the Path?
             */
            rotateToPath: boolean;

            /**
             * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.Components.PathFollower#rotateToPath)
             * this value is added to the rotation value, in degrees. This allows you to rotate objects to a path but control
             * the angle of the rotation as well.
             */
            pathRotationOffset: number;

            /**
             * Set the Path that this PathFollower should follow.
             * 
             * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.
             * @param path The Path this PathFollower is following. It can only follow one Path at a time.
             * @param config Settings for the PathFollower.
             * @returns This Game Object.
             */
            setPath(path: Phaser.Curves.Path, config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig): this;

            /**
             * Set whether the PathFollower should automatically rotate to point in the direction of the Path.
             * @param value Whether the PathFollower should automatically rotate to point in the direction of the Path.
             * @param offset Rotation offset in degrees. Default 0.
             * @returns This Game Object.
             */
            setRotateToPath(value: boolean, offset?: number): this;

            /**
             * Is this PathFollower actively following a Path or not?
             * 
             * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.undefined
             * @returns `true` if this PathFollower is actively following a Path, otherwise `false`.
             */
            isFollowing(): boolean;

            /**
             * Starts this PathFollower following its given Path.
             * @param config The duration of the follow, or a PathFollower config object. Default {}.
             * @param startAt Optional start position of the follow, between 0 and 1. Default 0.
             * @returns This Game Object.
             */
            startFollow(config?: number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig, startAt?: number): this;

            /**
             * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the
             * point on the Path at which you paused it.undefined
             * @returns This Game Object.
             */
            pauseFollow(): this;

            /**
             * Resumes a previously paused PathFollower.
             * 
             * If the PathFollower was not paused this has no effect.undefined
             * @returns This Game Object.
             */
            resumeFollow(): this;

            /**
             * Stops this PathFollower from following the path any longer.
             * 
             * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.undefined
             * @returns This Game Object.
             */
            stopFollow(): this;

            /**
             * Internal update handler that advances this PathFollower along the path.
             * 
             * Called automatically by the Scene step, should not typically be called directly.
             */
            pathUpdate(): void;

        }

        /**
         * The Point Light Game Object provides a way to add a point light effect into your game,
         * without the expensive shader processing requirements of the traditional Light Game Object.
         * 
         * The difference is that the Point Light renders using a custom shader, designed to give the
         * impression of a point light source, of variable radius, intensity and color, in your game.
         * However, unlike the Light Game Object, it does not impact any other Game Objects, or use their
         * normal maps for calculations. This makes them extremely fast to render compared to Lights
         * and perfect for special effects, such as flickering torches or muzzle flashes.
         * 
         * For maximum performance you should batch Point Light Game Objects together. This means
         * ensuring they follow each other consecutively on the display list. Ideally, use a Layer
         * Game Object and then add just Point Lights to it, so that it can batch together the rendering
         * of the lights. You don't _have_ to do this, and if you've only a handful of Point Lights in
         * your game then it's perfectly safe to mix them into the display list as normal. However, if
         * you're using a large number of them, please consider how they are mixed into the display list.
         * 
         * The renderer will automatically cull Point Lights. Those with a radius that does not intersect
         * with the Camera will be skipped in the rendering list. This happens automatically and the
         * culled state is refreshed every frame, for every camera.
         * 
         * The origin of a Point Light is always 0.5 and it cannot be changed.
         * 
         * Point Lights are a WebGL only feature and do not have a Canvas counterpart.
         */
        class PointLight extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Point Light belongs. A Point Light can only belong to one Scene at a time.
             * @param x The horizontal position of this Point Light in the world.
             * @param y The vertical position of this Point Light in the world.
             * @param color The color of the Point Light, given as a hex value. Default 0xffffff.
             * @param radius The radius of the Point Light. Default 128.
             * @param intensity The intensity, or color blend, of the Point Light. Default 1.
             * @param attenuation The attenuation of the Point Light. This is the reduction of light from the center point. Default 0.1.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, color?: number, radius?: number, intensity?: number, attenuation?: number);

            /**
             * The color of this Point Light. This property is an instance of a
             * Color object, so you can use the methods within it, such as `setTo(r, g, b)`
             * to change the color value.
             */
            color: Phaser.Display.Color;

            /**
             * The intensity of the Point Light.
             * 
             * The colors of the light are multiplied by this value during rendering.
             */
            intensity: number;

            /**
             * The attenuation of the Point Light.
             * 
             * This value controls the force with which the light falls-off from the center of the light.
             * 
             * Use small float-based values, i.e. 0.1.
             */
            attenuation: number;

            /**
             * The radius of the Point Light, in pixels. Changing this value also updates
             * the `width` and `height` properties of this Game Object to `radius * 2`.
             */
            radius: number;

            /**
             * The horizontal origin of this Point Light. This is always fixed at 0.5 and cannot be changed.
             */
            readonly originX: number;

            /**
             * The vertical origin of this Point Light. This is always fixed at 0.5 and cannot be changed.
             */
            readonly originY: number;

            /**
             * The horizontal display origin of this Point Light, in pixels. This is equal to the radius of the light.
             */
            readonly displayOriginX: number;

            /**
             * The vertical display origin of this Point Light, in pixels. This is equal to the radius of the light.
             */
            readonly displayOriginY: number;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Render Texture is a combination of Dynamic Texture and an Image Game Object, that uses the
         * Dynamic Texture to display itself with.
         * 
         * A Dynamic Texture is a special texture that allows you to draw textures, frames and most kind of
         * Game Objects directly to it.
         * 
         * You can take many complex objects and draw them to this one texture, which can then be used as the
         * base texture for other Game Objects, such as Sprites. Should you then update this texture, all
         * Game Objects using it will instantly be updated as well, reflecting the changes immediately.
         * 
         * It's a powerful way to generate dynamic textures at run-time that are WebGL friendly and don't invoke
         * expensive GPU uploads on each change.
         * 
         * In versions of Phaser before 3.60 a Render Texture was the only way you could create a texture
         * like this, that had the ability to be drawn on. But in 3.60 we split the core functions out to
         * the Dynamic Texture class as it made a lot more sense for them to reside in there. As a result,
         * the Render Texture is now a light-weight shim that sits on-top of an Image Game Object and offers
         * proxy methods to the features available from a Dynamic Texture.
         * 
         * **When should you use a Render Texture vs. a Dynamic Texture?**
         * 
         * You should use a Dynamic Texture if the texture is going to be used by multiple Game Objects,
         * or you want to use it across multiple Scenes, because textures are globally stored.
         * 
         * You should use a Dynamic Texture if the texture isn't going to be displayed in-game, but is
         * instead going to be used for something like a mask or shader.
         * 
         * You should use a Render Texture if you need to display the texture in-game on a single Game Object,
         * as it provides the convenience of wrapping an Image and Dynamic Texture together for you.
         * 
         * Under WebGL1, a FrameBuffer, which is what this Dynamic Texture uses internally, cannot be anti-aliased.
         * This means that when drawing objects such as Shapes or Graphics instances to this texture, they may appear
         * to be drawn with no aliasing around the edges. This is a technical limitation of WebGL1. To get around it,
         * create your shape as a texture in an art package, then draw that to this texture.
         * 
         * If you activate mipmap support in your game, it will not automatically
         * be applied to DynamicTextures.
         * This is because regenerating the mipmap for a texture
         * costs over 10 microseconds, a big performance loss for a single frame.
         * If you want to render your DynamicTextures with mipmaps,
         * you must also activate the render config option `mipmapRegeneration`.
         * 
         * In the event that the WebGL context is lost, this DynamicTexture will
         * lose its contents. Once context is restored (signalled by the `restorewebgl`
         * event), you can choose to redraw the contents of the DynamicTexture.
         * You are responsible for the redrawing logic.
         */
        class RenderTexture extends Phaser.GameObjects.Image {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Render Texture. Default 32.
             * @param height The height of the Render Texture. Default 32.
             * @param forceEven Force the given width and height to be rounded to even values. This significantly improves the rendering quality. Set to false if you know you need an odd sized texture. Default true.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, width?: number, height?: number, forceEven?: boolean);

            /**
             * An internal Camera that can be used to move around this Render Texture.
             * 
             * Control it just like you would any Scene Camera. The difference is that it only impacts
             * the placement of Game Objects that you then draw to this texture.
             * 
             * You can scroll, zoom and rotate this Camera.
             * 
             * This property is a reference to `RenderTexture.texture.camera`.
             */
            camera: Phaser.Cameras.Scene2D.BaseCamera;

            /**
             * The render mode of this Render Texture.
             * Set this property to change how the Render Texture is rendered.
             * 
             * - 'render' mode draws the contents of the Render Texture to each frame.
             * - 'redraw' mode calls `render()` and redraws the texture every frame,
             *   but does not render itself. This is useful for updating textures
             *   for reuse by other objects.
             * - 'all' mode calls `render()` then draws the texture to the frame.
             */
            renderMode: 'render' | 'redraw' | 'all';

            /**
             * Whether this RenderTexture is currently executing `renderWebGL`.
             * This is used to prevent infinite loops when drawing containers.
             * You should not set this property directly.
             */
            readonly isCurrentlyRendering: boolean;

            /**
             * Sets the internal size of this Render Texture, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values. You could also call the `resize` method, as that
             * will resize the underlying texture.
             * 
             * If you have enabled this Game Object for input, changing the size will also change the
             * size of the hit area, unless you have defined a custom hit area.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Resizes the Render Texture to the new dimensions given.
             * 
             * In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture.
             * In Canvas it will resize the underlying canvas element.
             * 
             * Both approaches will erase everything currently drawn to the Render Texture.
             * 
             * Calling this will then invoke the `setSize` method, setting the internal size of this Game Object
             * to the values given to this method.
             * 
             * Calling this will then invoke the `setSize` method, setting the internal size of this Game Object
             * to the values given to this method.
             * 
             * If the dimensions given are the same as those already being used, calling this method will do nothing.
             * @param width The new width of the Render Texture.
             * @param height The new height of the Render Texture. If not specified, will be set the same as the `width`. Default width.
             * @param forceEven Force the given width and height to be rounded to even values. This significantly improves the rendering quality. Set to false if you know you need an odd sized texture. Default true.
             * @returns This Render Texture.
             */
            resize(width: number, height?: number, forceEven?: boolean): this;

            /**
             * Stores a copy of this Render Texture in the Texture Manager using the given key.
             * 
             * After doing this, any texture based Game Object, such as a Sprite, can use the contents of this
             * Render Texture by using the texture key:
             * 
             * ```javascript
             * var rt = this.add.renderTexture(0, 0, 128, 128);
             * 
             * // Draw something to the Render Texture
             * 
             * rt.saveTexture('doodle');
             * 
             * this.add.image(400, 300, 'doodle');
             * ```
             * 
             * Updating the contents of this Render Texture will automatically update _any_ Game Object
             * that is using it as a texture. Calling `saveTexture` again will not save another copy
             * of the same texture, it will just rename the key of the existing copy.
             * 
             * By default it will create a single base texture. You can add frames to the texture
             * by using the `Texture.add` method. After doing this, you can then allow Game Objects
             * to use a specific frame from a Render Texture.
             * 
             * If you destroy this Render Texture, any Game Object using it via the Texture Manager will
             * stop rendering. Ensure you remove the texture from the Texture Manager and any Game Objects
             * using it first, before destroying this Render Texture.
             * 
             * Note that the texture is assigned a random key on creation.
             * This key will be replaced with the new key.
             * If the texture was previously removed from the texture manager,
             * it will be added back so it can be reused.
             * @param key The unique key to store the texture as within the global Texture Manager.
             * @returns The Texture that was saved.
             */
            saveTexture(key: string): Phaser.Textures.DynamicTexture;

            /**
             * Set the `renderMode` of this Render Texture.
             * Set this to change how the Render Texture is rendered.
             * 
             * - 'render' mode draws the contents of the Render Texture to each frame.
             * - 'redraw' mode calls `render()` and redraws the texture every frame,
             *   but does not render itself. This is useful for updating textures
             *   for reuse by other objects.
             * - 'all' mode calls `render()` then draws the texture to the frame.
             * @param mode The render mode to set.
             * @param preserve Whether to call `preserve(true)` to preserve the current command buffer. Default false.
             * @returns This Render Texture instance.
             */
            setRenderMode(mode: 'render' | 'redraw' | 'all', preserve?: boolean): this;

            /**
             * Render the buffered drawing commands to this Dynamic Texture.
             * You must do this in order to see anything drawn to it.
             */
            render(): void;

            /**
             * Fills this Render Texture with the given color.
             * 
             * By default it will fill the entire texture, however you can set it to fill a specific
             * rectangular area by using the x, y, width and height arguments.
             * 
             * The color should be given in hex format, i.e. 0xff0000 for red, 0x00ff00 for green, etc.
             * @param rgb The color to fill this Render Texture with, such as 0xff0000 for red.
             * @param alpha The alpha value used by the fill. Default 1.
             * @param x The left coordinate of the fill rectangle. Default 0.
             * @param y The top coordinate of the fill rectangle. Default 0.
             * @param width The width of the fill rectangle. Default this.width.
             * @param height The height of the fill rectangle. Default this.height.
             * @returns This Render Texture instance.
             */
            fill(rgb: number, alpha?: number, x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Clears a portion or everything from this Render Texture by erasing it and resetting it back to
             * a blank, transparent, texture. To clear an area, specify the `x`, `y`, `width` and `height`.
             * @param x The left coordinate of the clear rectangle. Default 0.
             * @param y The top coordinate of the clear rectangle. Default 0.
             * @param width The width of the clear rectangle. Default this.width.
             * @param height The height of the clear rectangle. Default this.height.
             * @returns This Render Texture instance.
             */
            clear(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Takes the given texture key and frame and then stamps it at the given
             * x and y coordinates. You can use the optional 'config' argument to provide
             * lots more options about how the stamp is applied, including the alpha,
             * tint, angle, scale and origin.
             * 
             * By default, the frame will stamp on the x/y coordinates based on its center.
             * 
             * If you wish to stamp from the top-left, set the config `originX` and
             * `originY` properties both to zero.
             * 
             * This method ignores the `camera` property of the Dynamic Texture.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture. Set to `null` to skip this argument if not required.
             * @param x The x position to draw the frame at. Default 0.
             * @param y The y position to draw the frame at. Default 0.
             * @param config The stamp configuration object, allowing you to set the alpha, tint, angle, scale and origin of the stamp.
             * @returns This Render Texture instance.
             */
            stamp(key: string, frame?: string | number, x?: number, y?: number, config?: Phaser.Types.Textures.StampConfig): this;

            /**
             * Draws the given object, or an array of objects, to this Render Texture using a blend mode of ERASE.
             * This has the effect of erasing any filled pixels present in the objects from this texture.
             * 
             * This method uses the `draw` method internally,
             * and the parameters behave the same way.
             * @param entries Any renderable Game Object, or Group, Container, Display List, Render Texture, Texture Frame, or an array of any of these.
             * @param x The x position to draw the Frame at, or the offset applied to the object. Default 0.
             * @param y The y position to draw the Frame at, or the offset applied to the object. Default 0.
             * @returns This Render Texture instance.
             */
            erase(entries: any, x?: number, y?: number): this;

            /**
             * Draws the given object, or an array of objects, to this RenderTexture.
             * 
             * It can accept any of the following:
             * 
             * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.
             * * Tilemap Layers.
             * * A Group. The contents of which will be iterated and drawn in turn.
             * * A Container. The contents of which will be iterated fully, and drawn in turn.
             * * A Scene Display List. Pass in `Scene.children` to draw the whole list.
             * * Another Dynamic Texture, or a Render Texture.
             * * A Texture Frame instance.
             * * A string. This is used to look-up the texture from the Texture Manager.
             * 
             * Note 1: You cannot draw a Render Texture to itself.
             * 
             * Note 2: GameObjects will use the camera, while textures and frames will not.
             * Textures and frames are drawn using the `stamp` method.
             * 
             * If passing in a Group or Container it will only draw children that return `true`
             * when their `willRender()` method is called. I.e. a Container with 10 children,
             * 5 of which have `visible=false` will only draw the 5 visible ones.
             * 
             * If passing in an array of Game Objects it will draw them all, regardless if
             * they pass a `willRender` check or not.
             * 
             * You can pass in a string in which case it will look for a texture in the Texture
             * Manager matching that string, and draw the base frame. If you need to specify
             * exactly which frame to draw then use the method `drawFrame` instead.
             * 
             * You can pass in the `x` and `y` coordinates to draw the objects at. The use of
             * the coordinates differ based on what objects are being drawn. If the object is
             * a Group, Container or Display List, the coordinates are _added_ to the positions
             * of the children. For all other types of object, the coordinates are exact.
             * For textures and frames, the `x` and `y` values are the middle of the texture.
             * 
             * The `alpha` and `tint` values are only used by Texture Frames.
             * Game Objects use their own alpha and tint values when being drawn.
             * @param entries Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these.
             * @param x The x position to draw the Frame at, or the offset applied to the object. Default 0.
             * @param y The y position to draw the Frame at, or the offset applied to the object. Default 0.
             * @param alpha The alpha value. Only used when drawing Texture Frames to this texture. Game Objects use their own alpha. Default 1.
             * @param tint The tint color value. Only used when drawing Texture Frames to this texture. Game Objects use their own tint. WebGL only. Default 0xffffff.
             * @returns This Render Texture instance.
             */
            draw(entries: any, x?: number, y?: number, alpha?: number, tint?: number): this;

            /**
             * Draws the given object to this Render Texture.
             * This allows you to draw the object as it appears in the game world,
             * or with various parameter overrides in the config.
             * @param entry Any renderable GameObject.
             * @param config The configuration object for the capture.
             * @returns This Render Texture instance.
             */
            capture(entry: Phaser.GameObjects.GameObject, config: Phaser.Types.Textures.CaptureConfig): this;

            /**
             * Takes the given Texture Frame and draws it to this Dynamic Texture as a fill pattern,
             * i.e. in a grid-layout based on the frame dimensions.
             * It uses a `TileSprite` internally to draw the frame repeatedly.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * 
             * You can optionally provide a position, width, height, alpha and tint value to apply to
             * the frames before they are drawn. The position controls the top-left where the repeating
             * fill will start from. The width and height control the size of the filled area.
             * 
             * The position can be negative if required, but the dimensions cannot.
             * 
             * This method respects the camera settings of the Dynamic Texture.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture. Set to `null` to skip this argument if not required.
             * @param x The x position to start drawing the frames from (can be negative to offset). Default 0.
             * @param y The y position to start drawing the frames from (can be negative to offset). Default 0.
             * @param width The width of the area to repeat the frame within. Defaults to the width of this Dynamic Texture. Default this.width.
             * @param height The height of the area to repeat the frame within. Defaults to the height of this Dynamic Texture. Default this.height.
             * @param config The configuration object for the TileSprite which repeats the texture, allowing you to set further properties on it.
             * @returns This Render Texture instance.
             */
            repeat(key: string, frame?: string | number, x?: number, y?: number, width?: number, height?: number, config?: Phaser.Types.GameObjects.TileSprite.TileSpriteConfig): this;

            /**
             * Sets the preserve flag for this Dynamic Texture.
             * Ordinarily, after each render, the command buffer is cleared.
             * When this flag is set to `true`, the command buffer is preserved between renders.
             * This makes it possible to repeat the same drawing commands on each render.
             * 
             * Make sure to call `clear()` at the start if you don't want to accumulate
             * drawing detail over the top of itself.
             * @param preserve Whether to preserve the command buffer after rendering.
             * @returns This Render Texture instance.
             */
            preserve(preserve: boolean): this;

            /**
             * Adds a callback to run during the render process.
             * This callback runs as a step in the command buffer.
             * It can be used to set up conditions for the next draw step.
             * 
             * Note that this will only execute after `render()` is called.
             * @param callback A callback function to run during the render process.
             * @returns This Render Texture instance.
             */
            callback(callback: Function): this;

            /**
             * Takes a snapshot of the given area of this Render Texture.
             * 
             * The snapshot is taken immediately, but the results are returned via the given callback.
             * 
             * To capture the whole Render Texture see the `snapshot` method.
             * To capture just a specific pixel, see the `snapshotPixel` method.
             * 
             * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer
             * into an ArrayBufferView. It then parses this, copying the contents to a temporary Canvas and finally
             * creating an Image object from it, which is the image returned to the callback provided.
             * 
             * All in all, this is a computationally expensive and blocking process, which gets more expensive
             * the larger the resolution this Render Texture has, so please be careful how you employ this in your game.
             * @param x The x coordinate to grab from.
             * @param y The y coordinate to grab from.
             * @param width The width of the area to grab.
             * @param height The height of the area to grab.
             * @param callback The Function to invoke after the snapshot image is created.
             * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
             * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
             * @returns This Render Texture instance.
             */
            snapshotArea(x: number, y: number, width: number, height: number, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, type?: string, encoderOptions?: number): this;

            /**
             * Takes a snapshot of the whole of this Render Texture.
             * 
             * The snapshot is taken immediately, but the results are returned via the given callback.
             * 
             * To capture a portion of this Render Texture see the `snapshotArea` method.
             * To capture just a specific pixel, see the `snapshotPixel` method.
             * 
             * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer
             * into an ArrayBufferView. It then parses this, copying the contents to a temporary Canvas and finally
             * creating an Image object from it, which is the image returned to the callback provided.
             * 
             * All in all, this is a computationally expensive and blocking process, which gets more expensive
             * the larger the resolution this Render Texture has, so please be careful how you employ this in your game.
             * @param callback The Function to invoke after the snapshot image is created.
             * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
             * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
             * @returns This Render Texture instance.
             */
            snapshot(callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, type?: string, encoderOptions?: number): this;

            /**
             * Takes a snapshot of the given pixel from this Render Texture.
             * 
             * The snapshot is taken immediately, but the results are returned via the given callback.
             * 
             * To capture the whole Render Texture see the `snapshot` method.
             * To capture a portion of this Render Texture see the `snapshotArea` method.
             * 
             * Unlike the two other snapshot methods, this one will send your callback a `Color` object
             * containing the color data for the requested pixel. It doesn't need to create an internal
             * Canvas or Image object, so is a lot faster to execute, using less memory than the other snapshot methods.
             * @param x The x coordinate of the pixel to get.
             * @param y The y coordinate of the pixel to get.
             * @param callback The Function to invoke after the snapshot pixel data is extracted.
             * @returns This Render Texture instance.
             */
            snapshotPixel(x: number, y: number, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback): this;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the size of this Game Object to be that of the given Frame.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param frame The frame to base the size of this Game Object on.
             * @returns This Game Object instance.
             */
            setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

            /**
             * Sets the display (rendered) size of this Game Object in pixels.
             * 
             * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
             * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
             * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
             * the scale manually, but more convenient when you want to work in pixel values directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * A boolean flag indicating if this Game Object is being cropped or not.
             * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
             * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
             */
            isCropped: boolean;

            /**
             * Applies a crop to a texture based Game Object, such as a Sprite or Image.
             * 
             * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
             * 
             * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
             * changes what is shown when rendered.
             * 
             * The crop size as well as coordinates can not exceed the size of the texture frame.
             * 
             * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
             * 
             * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
             * half of it, you could call `setCrop(0, 0, 400, 600)`.
             * 
             * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
             * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
             * 
             * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
             * 
             * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
             * 
             * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
             * the renderer to skip several internal calculations.
             * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
             * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
             * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
             * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
             * @returns This Game Object instance.
             */
            setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture.
             * @returns This Game Object instance.
             */
            setTexture(key: string, frame?: string | number): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Rope Game Object.
         * 
         * The Rope object is WebGL only and does not have a Canvas counterpart.
         * 
         * A Rope is a special kind of Game Object that has a texture that is stretched along its entire length,
         * mapped across a series of vertices that you define. This makes it ideal for creating effects such as
         * flags waving in the wind, banners, cloth, chains, wavy water surfaces, or any shape that needs a
         * texture bent or deformed along a path.
         * 
         * Unlike a Sprite, it isn't restricted to using just a quad and can have as many vertices as you define
         * when creating it. The vertices can be arranged in a horizontal or vertical strip and have their own
         * color and alpha values as well. You can modify the vertex positions each frame to animate the shape
         * of the Rope in real-time.
         * 
         * The Rope also supports animations via the `anims` property, allowing you to play frame-based
         * animations from a texture atlas across the surface of the Rope.
         * 
         * A Rope's origin is always 0.5 x 0.5 and cannot be changed.
         * 
         * This object does not support trimmed textures from Texture Packer.
         * Trimming may interfere with the vertex arrangement.
         */
        class Rope extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.GameObjects.Components.ScrollFactor {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param texture The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. If not given, `__DEFAULT` is used.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             * @param points An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. See `setPoints` to set this post-creation. Default 2.
             * @param horizontal Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)? Default true.
             * @param colors An optional array containing the color data for this Rope. You should provide one color value per pair of vertices.
             * @param alphas An optional array containing the alpha data for this Rope. You should provide one alpha value per pair of vertices.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, texture?: string, frame?: string | number | null, points?: number | Phaser.Types.Math.Vector2Like[], horizontal?: boolean, colors?: number[], alphas?: number[]);

            /**
             * The Animation State of this Rope.
             */
            anims: Phaser.Animations.AnimationState;

            /**
             * An array containing the points data for this Rope.
             * 
             * Each point should be given as a Vector2Like object (i.e. a Vector2 or object with public x/y properties).
             * 
             * The point coordinates are given in local space, where 0 x 0 is the start of the Rope strip.
             * 
             * You can modify the contents of this array directly in real-time to create interesting effects.
             * If you do so, be sure to call `setDirty` _after_ modifying this array, so that the vertices data is
             * updated before the next render. Alternatively, you can use the `setPoints` method instead.
             * 
             * Should you need to change the _size_ of this array, then you should always use the `setPoints` method.
             */
            points: Phaser.Types.Math.Vector2Like[];

            /**
             * An array containing the vertices data for this Rope.
             * 
             * This data is calculated automatically in the `updateVertices` method, based on the points provided.
             */
            vertices: Float32Array;

            /**
             * An array containing the uv data for this Rope.
             * 
             * This data is calculated automatically in the `setPoints` method, based on the points provided.
             */
            uv: Float32Array;

            /**
             * An array containing the color data for this Rope.
             * 
             * Colors should be given as numeric RGB values, such as 0xff0000.
             * You should provide _two_ color values for every point in the Rope, one for the top and one for the bottom of each quad.
             * 
             * You can modify the contents of this array directly in real-time, however, should you need to change the _size_
             * of the array, then you should use the `setColors` method instead.
             */
            colors: Uint32Array;

            /**
             * An array containing the alpha data for this Rope.
             * 
             * Alphas should be given as float values, such as 0.5.
             * You should provide _two_ alpha values for every point in the Rope, one for the top and one for the bottom of each quad.
             * 
             * You can modify the contents of this array directly in real-time, however, should you need to change the _size_
             * of the array, then you should use the `setAlphas` method instead.
             */
            alphas: Float32Array;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL (default when the texture is __DEFAULT)
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             */
            tintMode: Phaser.TintModes;

            /**
             * If the Rope is marked as `dirty` it will automatically recalculate its vertices
             * the next time it renders. You can also force this by calling `updateVertices`.
             */
            dirty: boolean;

            /**
             * Are the Rope vertices aligned horizontally, in a strip, or vertically, in a column?
             * 
             * This property is set during instantiation and cannot be changed directly.
             * See the `setVertical` and `setHorizontal` methods.
             */
            readonly horizontal: boolean;

            /**
             * You can optionally choose to render the vertices of this Rope to a Graphics instance.
             * 
             * Achieve this by setting the `debugCallback` and the `debugGraphic` properties.
             * 
             * You can do this in a single call via the `Rope.setDebug` method, which will use the
             * built-in debug function. You can also set it to your own callback. The callback
             * will be invoked _once per render_ and sent the following parameters:
             * 
             * `debugCallback(src, meshLength, verts)`
             * 
             * `src` is the Rope instance being debugged.
             * `meshLength` is the number of mesh vertices in total.
             * `verts` is an array of the translated vertex coordinates.
             * 
             * To disable rendering, set this property back to `null`.
             */
            debugCallback: Function;

            /**
             * The Graphics instance that the debug vertices will be drawn to, if `setDebug` has
             * been called.
             */
            debugGraphic: Phaser.GameObjects.Graphics;

            /**
             * Called automatically by Phaser when this Game Object is added to a Scene.
             * Registers this Rope with the Scene's update list so that `preUpdate` is called each frame.
             */
            addedToScene(): void;

            /**
             * Called automatically by Phaser when this Game Object is removed from a Scene.
             * Removes this Rope from the Scene's update list so that `preUpdate` is no longer called each frame.
             */
            removedFromScene(): void;

            /**
             * The Rope update loop.
             * @param time The current timestamp.
             * @param delta The delta time, in ms, elapsed since the last frame.
             */
            protected preUpdate(time: number, delta: number): void;

            /**
             * Start playing the given animation.
             * @param key The string-based key of the animation to play.
             * @param ignoreIfPlaying If an animation is already playing then ignore this call. Default false.
             * @param startFrame Optionally start the animation playing from this frame index. Default 0.
             * @returns This Game Object.
             */
            play(key: string, ignoreIfPlaying?: boolean, startFrame?: number): this;

            /**
             * Flags this Rope as being dirty. A dirty rope will recalculate all of its vertices data
             * the _next_ time it renders. You should set this rope as dirty if you update the points
             * array directly.undefined
             * @returns This Game Object instance.
             */
            setDirty(): this;

            /**
             * Sets the alignment of the points in this Rope to be horizontal, in a strip format.
             * 
             * Calling this method will reset this Rope. The current points, vertices, colors and alpha
             * values will be reset to those values given as parameters.
             * @param points An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used.
             * @param colors Either a single color value, or an array of values.
             * @param alphas Either a single alpha value, or an array of values.
             * @returns This Game Object instance.
             */
            setHorizontal(points?: number | Phaser.Types.Math.Vector2Like[], colors?: number | number[], alphas?: number | number[]): this;

            /**
             * Sets the alignment of the points in this Rope to be vertical, in a column format.
             * 
             * Calling this method will reset this Rope. The current points, vertices, colors and alpha
             * values will be reset to those values given as parameters.
             * @param points An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used.
             * @param colors Either a single color value, or an array of values.
             * @param alphas Either a single alpha value, or an array of values.
             * @returns This Game Object instance.
             */
            setVertical(points?: number | Phaser.Types.Math.Vector2Like[], colors?: number | number[], alphas?: number | number[]): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * See the `setColors` method for details of how to color each of the vertices.
             * @param value The tint mode to use. Default Phaser.TintModes.MULTIPLY.
             * @returns This Game Object instance.
             */
            setTintMode(value?: Phaser.TintModes): this;

            /**
             * Set the alpha values used by the Rope during rendering.
             * 
             * You can provide the values in a number of ways:
             * 
             * 1) One single numeric value: `setAlphas(0.5)` - This will set a single alpha for the whole Rope.
             * 2) Two numeric values: `setAlphas(1, 0.5)` - This will set a 'top' and 'bottom' alpha value across the whole Rope.
             * 3) An array of values: `setAlphas([ 1, 0.5, 0.2 ])`
             * 
             * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it
             * will use each alpha value per rope segment.
             * 
             * If the provided array has a different number of values than `points` then it will use the values in order, from
             * the first Rope segment and on, until it runs out of values. This allows you to control the alpha values at all
             * vertices in the Rope.
             * 
             * Note this method is called `setAlphas` (plural) and not `setAlpha`.
             * @param alphas Either a single alpha value, or an array of values. If nothing is provided alpha is reset to 1.
             * @param bottomAlpha An optional bottom alpha value. See the method description for details.
             * @returns This Game Object instance.
             */
            setAlphas(alphas?: number | number[], bottomAlpha?: number): this;

            /**
             * Set the color values used by the Rope during rendering.
             * 
             * Colors are used to control the level of tint applied across the Rope texture.
             * 
             * You can provide the values in a number of ways:
             * 
             * * One single numeric value: `setColors(0xff0000)` - This will set a single color tint for the whole Rope.
             * * An array of values: `setColors([ 0xff0000, 0x00ff00, 0x0000ff ])`
             * 
             * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it
             * will use each color per rope segment.
             * 
             * If the provided array has a different number of values than `points` then it will use the values in order, from
             * the first Rope segment and on, until it runs out of values. This allows you to control the color values at all
             * vertices in the Rope.
             * @param colors Either a single color value, or an array of values. If nothing is provided color is reset to 0xffffff.
             * @returns This Game Object instance.
             */
            setColors(colors?: number | number[]): this;

            /**
             * Sets the points used by this Rope.
             * 
             * The points should be provided as an array of Vector2, or vector2-like objects (i.e. those with public x/y properties).
             * 
             * Each point corresponds to one segment of the Rope. The more points in the array, the more segments the rope has.
             * 
             * Point coordinates are given in local-space, not world-space, and are directly related to the size of the texture
             * this Rope object is using.
             * 
             * For example, a Rope using a 512 px wide texture, split into 4 segments (128px each) would use the following points:
             * 
             * ```javascript
             * rope.setPoints([
             *   { x: 0, y: 0 },
             *   { x: 128, y: 0 },
             *   { x: 256, y: 0 },
             *   { x: 384, y: 0 }
             * ]);
             * ```
             * 
             * Or, you can provide an integer to do the same thing:
             * 
             * ```javascript
             * rope.setPoints(4);
             * ```
             * 
             * Which will divide the Rope into 4 equally sized segments based on the frame width.
             * 
             * Note that calling this method with a different number of points than the Rope has currently will
             * _reset_ the color and alpha values, unless you provide them as arguments to this method.
             * @param points An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. Default 2.
             * @param colors Either a single color value, or an array of values.
             * @param alphas Either a single alpha value, or an array of values.
             * @returns This Game Object instance.
             */
            setPoints(points?: number | Phaser.Types.Math.Vector2Like[], colors?: number | number[], alphas?: number | number[]): this;

            /**
             * Updates all of the UVs based on the Rope.points and `flipX` and `flipY` settings.undefined
             * @returns This Game Object instance.
             */
            updateUVs(): this;

            /**
             * Resizes all of the internal arrays: `vertices`, `uv`, `colors` and `alphas` to the new
             * given Rope segment total.
             * @param newSize The amount of segments to split the Rope in to.
             * @returns This Game Object instance.
             */
            resizeArrays(newSize: number): this;

            /**
             * Updates the vertices based on the Rope points.
             * 
             * This method is called automatically during rendering if `Rope.dirty` is `true`, which is set
             * by the `setPoints` and `setDirty` methods. You should flag the Rope as being dirty if you modify
             * the Rope points directly.undefined
             * @returns This Game Object instance.
             */
            updateVertices(): this;

            /**
             * This method enables rendering of the Rope vertices to the given Graphics instance.
             * 
             * If you enable this feature, you **must** call `Graphics.clear()` in your Scene `update`,
             * otherwise the Graphics instance you provide to debug will fill-up with draw calls,
             * eventually crashing the browser. This is not done automatically to allow you to debug
             * draw multiple Rope objects to a single Graphics instance.
             * 
             * The Rope class has a built-in debug rendering callback `Rope.renderDebugVerts`, however
             * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter.
             * 
             * The callback is invoked _once per render_ and sent the following parameters:
             * 
             * `callback(src, meshLength, verts)`
             * 
             * `src` is the Rope instance being debugged.
             * `meshLength` is the number of mesh vertices in total.
             * `verts` is an array of the translated vertex coordinates.
             * 
             * If using your own callback you do not have to provide a Graphics instance to this method.
             * 
             * To disable debug rendering, to either your own callback or the built-in one, call this method
             * with no arguments.
             * @param graphic The Graphic instance to render to if using the built-in callback.
             * @param callback The callback to invoke during debug render. Leave as undefined to use the built-in callback.
             * @returns This Game Object instance.
             */
            setDebug(graphic?: Phaser.GameObjects.Graphics, callback?: Function): this;

            /**
             * The built-in Rope vertices debug rendering method.
             * 
             * See `Rope.setDebug` for more details.
             * @param src The Rope object being rendered.
             * @param meshLength The number of vertices in the mesh.
             * @param verts An array of translated vertex coordinates.
             */
            renderDebugVerts(src: Phaser.GameObjects.Rope, meshLength: number, verts: number[]): void;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inversed on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the size of this Game Object to be that of the given Frame.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param frame The frame to base the size of this Game Object on.
             * @returns This Game Object instance.
             */
            setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display (rendered) size of this Game Object in pixels.
             * 
             * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
             * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
             * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
             * the scale manually, but more convenient when you want to work in pixel values directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * 
             * Calling this method will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.
             * @param frame The name or index of the frame within the Texture.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call change the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setTexture(key: string | Phaser.Textures.Texture, frame?: string | number, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

        }

        /**
         * A Shader Game Object.
         * 
         * This Game Object allows you to easily add a quad with its own shader
         * into the display list, and manipulate it as you would any other Game Object,
         * including scaling, rotating, positioning and adding to Containers.
         * The Shader can be made interactive and used for input events.
         * It can also be used in filters to create visually stunning effects.
         * 
         * It works by creating a custom RenderNode which runs a custom shader program
         * to draw a quad. The shader program can be loaded from the Shader Cache,
         * or provided in-line as strings.
         * 
         * Please see the Phaser Examples GitHub repo for several examples
         * of loading and creating shaders dynamically.
         * 
         * Due to the way in which they work, you cannot directly change the alpha
         * of a Shader. It should be handled via uniforms in the shader code itself.
         * 
         * By default, a Shader has a uniform called `uProjectionMatrix`
         * which is set automatically.
         * You can control additional uniforms using the `setupUniforms` method
         * in the Shader configuration object, which runs every time the shader renders.
         * 
         * Shaders are stand-alone renders: they finish any current render batch
         * and run once by themselves. As this costs a draw call, you should use them sparingly.
         * If you need to have a fully batched custom shader, then please look at using
         * a custom RenderNode instead. However, for background or special masking effects,
         * they are extremely effective.
         * 
         * Note: be careful when using texture coordinates in shader code.
         * The built-in variable `gl_FragCoord` and the default uniform `outTexCoord`
         * both use WebGL coordinates, which are `0,0` in the bottom-left.
         * Additionally, `gl_FragCoord` says it's in "window relative" coordinates.
         * But this is actually relative to the framebuffer size.
         */
        class Shader extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param config The configuration object this Shader will use. It can also be a key that corresponds to a shader in the shader cache, which will be used as `fragmentKey` in a new config object.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the Game Object. Default 128.
             * @param height The height of the Game Object. Default 128.
             * @param textures The textures that the shader uses, if any. If you intend to define the textures later, use `'__DEFAULT'` as a placeholder, to avoid initialization errors.
             */
            constructor(scene: Phaser.Scene, config: string | Phaser.Types.GameObjects.Shader.ShaderQuadConfig, x?: number, y?: number, width?: number, height?: number, textures?: string[] | Phaser.Textures.Texture[]);

            /**
             * The textures that the shader uses.
             * These will be assigned to texture units 0 to N when the shader is
             * rendered, where N is `textures.length - 1`.
             */
            textures: Phaser.Textures.Texture[];

            /**
             * The underlying RenderNode object that the shader uses to render with.
             */
            renderNode: Phaser.Renderer.WebGL.RenderNodes.ShaderQuad;

            /**
             * The drawing context containing the framebuffer and texture that the shader is rendered to.
             * This is only set if the shader is rendering to a texture.
             */
            drawingContext: Phaser.Renderer.WebGL.DrawingContext | null;

            /**
             * A reference to the WebGLTextureWrapper this Shader is rendering to.
             * This property is only set if you have called `Shader.setRenderToTexture`.
             */
            glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | null;

            /**
             * A flag that indicates if this Shader has been set to render to a texture instead of the display list.
             * 
             * This property is `true` if you have called `Shader.setRenderToTexture`, otherwise it's `false`.
             * 
             * A Shader that is rendering to a texture _does not_ appear on the display list.
             */
            readonly renderToTexture: boolean;

            /**
             * A reference to the Phaser.Textures.Texture that has been stored in the Texture Manager for this Shader.
             * 
             * This property is only set if you have called `Shader.setRenderToTexture` with a key, otherwise it is `null`.
             */
            texture: Phaser.Textures.Texture;

            /**
             * The top-left texture coordinate of the shader.
             * This is set to 0,1 by default. It uses WebGL texture coordinates.
             */
            textureCoordinateTopLeft: Phaser.Math.Vector2;

            /**
             * The top-right texture coordinate of the shader.
             * This is set to 1,1 by default. It uses WebGL texture coordinates.
             */
            textureCoordinateTopRight: Phaser.Math.Vector2;

            /**
             * The bottom-left texture coordinate of the shader.
             * This is set to 0,0 by default. It uses WebGL texture coordinates.
             */
            textureCoordinateBottomLeft: Phaser.Math.Vector2;

            /**
             * The bottom-right texture coordinate of the shader.
             * This is set to 1,0 by default. It uses WebGL texture coordinates.
             */
            textureCoordinateBottomRight: Phaser.Math.Vector2;

            /**
             * Returns the current value of a uniform from the render node.
             * This value is actually copied to all shaders that use it.
             * Modifications to non-primitive values such as arrays and objects
             * will modify the original.
             * 
             * It's generally better to use the `setupUniforms` function in the
             * shader configuration object to set uniform values on changing uniforms.
             * This method is provided in the spirit of reading back the values.
             * @param name The name of the uniform to get.
             * @returns The value of the uniform.
             */
            getUniform(name: string): any;

            /**
             * Set the value of a uniform in the shader.
             * This value is actually copied to all shaders that use it.
             * 
             * It's generally better to use the `setupUniforms` function in the
             * shader configuration object to set uniform values on changing uniforms.
             * Use this method to set uniforms just once.
             * @param name The name of the uniform to set.
             * @param value The value to set the uniform to.
             * @returns undefined
             */
            setUniform(name: string, value: any): this;

            /**
             * Set the textures that the shader uses.
             * 
             * Some shaders don't use any textures. Some may use one or more.
             * The textures are assigned to texture units 0 to N when the shader is rendered,
             * where N is `textures.length - 1`.
             * You must set the uniforms in your shader to match these texture units.
             * 
             * Calling this method will replace the existing textures array with the new one.
             * @param textures The textures that the shader uses.
             */
            setTextures(textures?: string[] | Phaser.Textures.Texture[]): void;

            /**
             * Changes this Shader so instead of rendering to the display list
             * it renders to a WebGL Framebuffer and Texture instead.
             * This allows you to use the output of this shader as a texture.
             * 
             * After calling this method the following properties are populated:
             * - `Shader.drawingContext`
             * - `Shader.glTexture`
             * 
             * Additionally, you can provide a key to this method.
             * Doing so will create a Phaser Texture from this Shader,
             * store it in `Shader.texture`,
             * and save it into the Texture Manager, allowing you to then use it for
             * any texture-based Game Object, such as a Sprite or Image:
             * 
             * ```javascript
             * var shader = this.add.shader('myShader', x, y, width, height);
             * 
             * shader.setRenderToTexture('doodle');
             * 
             * this.add.image(400, 300, 'doodle');
             * ```
             * 
             * Note that it stores an active reference to this Shader. That means as this shader updates,
             * so does the texture and any object using it to render with. Also, if you destroy this
             * shader, be sure to clear any objects that may have been using it as a texture too.
             * 
             * By default it will create a single base texture. You can add frames to the texture
             * by using the `Texture.add` method. After doing this, you can then allow Game Objects
             * to use a specific frame from a Render Texture.
             * 
             * If you want to update a texture only sporadically, don't use this method.
             * Instead, use a DynamicTexture:
             * 
             * ```javascript
             * var shader = this.add.shader('myShader', x, y, width, height);
             * 
             * var dynamic = this.textures.addDynamicTexture('myTexture', shader.width, shader.height);
             * 
             * // To update the texture:
             * dynamic.clear().draw(shader).render();
             * ```
             * @param key The unique key to store the texture as within the global Texture Manager.
             * @returns This Shader instance.
             */
            setRenderToTexture(key?: string): this;

            /**
             * Render the shader immediately.
             * This is useful for a Shader that is not part of the display list,
             * but you want to use with `renderToTexture`.undefined
             * @returns This Shader instance.
             */
            renderImmediate(): this;

            /**
             * The function which sets uniforms for the shader.
             * This is called automatically during rendering.
             * It is set from the `config` object passed in the constructor.
             * You should use this function to set any uniform values you need for your shader to run.
             * 
             * You can set this function directly after object creation,
             * but it's recommended to use the `config` object
             * to keep your logic encapsulated.
             * 
             * The function is invoked with two arguments: `setUniform` and `drawingContext`.
             * `setUniform` is a function that takes two arguments: a string (the name of the uniform) and a value.
             * Ensure that the value matches the expected type in the shader.
             * You don't need to be too precise, as the system will convert
             * e.g. Array and Float32Array types as needed.
             * To set an array in a shader, append `[0]` to the uniform name.
             * `drawingContext` is a reference to the current drawing context,
             * which may be useful if you need to query the camera or similar.
             * 
             * Note that `uProjectionMatrix` is set for you automatically.
             * @param setUniform The function which sets uniforms. `(name: string, value: any) => void`.
             * @param drawingContext A reference to the current drawing context.
             */
            setupUniforms(setUniform: Function, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

            /**
             * Set the texture coordinates of the shader.
             * These values are used to provide texture mapping to the shader,
             * and are commonly used to drive generative output.
             * 
             * By default, the shader uses the whole texture, the range 0-1.
             * The coordinates are in WebGL texture space, which is 0,0 in the bottom-left.
             * This method allows you to specify a region of the texture to use,
             * or even go outside the 0-1 bounds.
             * This can be useful if you want to use a single frame from a texture,
             * repeat the shader's texture, use a larger numeric range,
             * or distort the shader.
             * 
             * Note that a quad is made of two triangles, divided by the diagonal
             * from the top-left to the bottom-right. This means that some permutations
             * of coordinates may affect just one or the other triangle.
             * This can cause abrupt warping along the diagonal.
             * Keep an eye on your output. Rectangles and parallelograms are safe bets.
             * So are rotation and scaling transforms. Moving a single point is risky.
             * 
             * Call this method with no arguments to reset the shader to use the whole texture.
             * @param topLeftX The top-left x coordinate of the texture. Default 0.
             * @param topLeftY The top-left y coordinate of the texture. Default 1.
             * @param topRightX The top-right x coordinate of the texture. Default 1.
             * @param topRightY The top-right y coordinate of the texture. Default 1.
             * @param bottomLeftX The bottom-left x coordinate of the texture. Default 0.
             * @param bottomLeftY The bottom-left y coordinate of the texture. Default 0.
             * @param bottomRightX The bottom-right x coordinate of the texture. Default 1.
             * @param bottomRightY The bottom-right y coordinate of the texture. Default 0.
             * @returns This Shader instance
             */
            setTextureCoordinates(topLeftX?: number, topLeftY?: number, topRightX?: number, topRightY?: number, bottomLeftX?: number, bottomLeftY?: number, bottomRightX?: number, bottomRightY?: number): this;

            /**
             * Set the texture coordinates of the shader from a frame.
             * This is a convenience method that sets the texture coordinates
             * to match a frame from a texture.
             * @param frame The frame to set the texture coordinates from. If a string is given, it will be used to look up the frame in the texture.
             * @param texture The texture that the frame is from. This is only used if `frame` is a string. If a string is given, it will be used to look up the texture in the Texture Manager. If not given, the first member of `Shader.textures` is used. If `Shader.textures` is empty, an error will occur.
             */
            setTextureCoordinatesFromFrame(frame: Phaser.Textures.Frame | string, texture?: Phaser.Textures.Texture | string): void;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Shape Game Object is a base class for the various built-in shape types, such as the Arc, Star, Polygon,
         * Rectangle, and Triangle. It provides a common interface for managing fill color, stroke color, line width,
         * and the precomputed path data used when rendering.
         * 
         * You cannot add a Shape directly to your Scene. Instead, use one of the built-in subclasses, or extend this
         * class to create your own custom Shape types with their own geometry logic.
         * 
         * Shape objects share the same render batch as the Graphics Game Object when rendering in WebGL.
         * They do not support gradients, path smoothing thresholds, or other advanced Graphics features.
         * In return, they store precomputed internal geometry data which allows them to render more efficiently
         * than dynamically-constructed Graphics objects.
         */
        class Shape extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param type The internal type of the Shape.
             * @param data The data of the source shape geometry, if any.
             */
            constructor(scene: Phaser.Scene, type?: string, data?: any);

            /**
             * The source Shape data. Typically a geometry object.
             * You should not manipulate this directly.
             */
            readonly geom: any;

            /**
             * Holds the polygon path data for filled rendering.
             */
            readonly pathData: number[];

            /**
             * Holds the earcut polygon path index data for filled rendering.
             */
            readonly pathIndexes: number[];

            /**
             * The fill color used by this Shape, as a hex value (e.g., 0xff0000 for red).
             * Only used when `isFilled` is `true`. Set via `setFillStyle`.
             */
            fillColor: number;

            /**
             * The alpha applied to the fill of this Shape, in the range 0 (fully transparent) to 1 (fully opaque).
             * Only used when `isFilled` is `true`. Set via `setFillStyle`.
             */
            fillAlpha: number;

            /**
             * The stroke color used by this Shape, as a hex value (e.g., 0x00ff00 for green).
             * Only used when `isStroked` is `true`. Set via `setStrokeStyle`.
             */
            strokeColor: number;

            /**
             * The alpha applied to the stroke of this Shape, in the range 0 (fully transparent) to 1 (fully opaque).
             * Only used when `isStroked` is `true`. Set via `setStrokeStyle`.
             */
            strokeAlpha: number;

            /**
             * The width of the stroke line for this Shape, in pixels.
             * Only used when `isStroked` is `true`. Set via `setStrokeStyle`.
             */
            lineWidth: number;

            /**
             * Controls if this Shape is filled or not.
             * Note that some Shapes do not support being filled (such as Line shapes)
             */
            isFilled: boolean;

            /**
             * Controls if this Shape is stroked or not.
             * Note that some Shapes do not support being stroked (such as Iso Box shapes)
             */
            isStroked: boolean;

            /**
             * Controls if this Shape path is closed during rendering when stroked.
             * Note that some Shapes are always closed when stroked (such as Ellipse shapes)
             */
            closePath: boolean;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * Sets the fill color and alpha for this Shape.
             * 
             * If you wish for the Shape to not be filled then call this method with no arguments, or just set `isFilled` to `false`.
             * 
             * Note that some Shapes do not support fill colors, such as the Line shape.
             * 
             * This call can be chained.
             * @param color The color used to fill this shape. If not provided the Shape will not be filled.
             * @param alpha The alpha value used when filling this shape, if a fill color is given. Default 1.
             * @returns This Game Object instance.
             */
            setFillStyle(color?: number, alpha?: number): this;

            /**
             * Sets the stroke color and alpha for this Shape.
             * 
             * If you wish for the Shape to not be stroked then call this method with no arguments, or just set `isStroked` to `false`.
             * 
             * Note that some Shapes do not support being stroked, such as the Iso Box shape.
             * 
             * This call can be chained.
             * @param lineWidth The width of line to stroke with. If not provided or undefined the Shape will not be stroked.
             * @param color The color used to stroke this shape. If not provided the Shape will not be stroked.
             * @param alpha The alpha value used when stroking this shape, if a stroke color is given. Default 1.
             * @returns This Game Object instance.
             */
            setStrokeStyle(lineWidth?: number, color?: number, alpha?: number): this;

            /**
             * Sets if this Shape path is closed during rendering when stroked.
             * Note that some Shapes are always closed when stroked (such as Ellipse shapes)
             * 
             * This call can be chained.
             * @param value Set to `true` if the Shape should be closed when stroked, otherwise `false`.
             * @returns This Game Object instance.
             */
            setClosePath(value: boolean): this;

            /**
             * Sets the displayed pixel size of this Shape by adjusting its `scaleX` and `scaleY` properties
             * relative to its native width and height. This is equivalent to calling `setScale` but lets you
             * specify the desired rendered dimensions in pixels rather than as a scale multiplier.
             * 
             * This call can be chained.
             * @param width The display width of this Shape, in pixels.
             * @param height The display height of this Shape, in pixels.
             * @returns This Shape instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports both fill and stroke colors.
         * 
         * When it renders it displays an arc shape. You can control the start and end angles of the arc,
         * as well as if the angles are winding clockwise or anti-clockwise. With the default settings
         * it renders as a complete circle. By changing the angles you can create other arc shapes,
         * such as half-circles.
         * 
         * Arcs also have an `iterations` property and corresponding `setIterations` method. This allows
         * you to control how smooth the shape renders in WebGL, by controlling the number of iterations
         * that take place during construction.
         */
        class Arc extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param radius The radius of the arc. Default 128.
             * @param startAngle The start angle of the arc, in degrees. Default 0.
             * @param endAngle The end angle of the arc, in degrees. Default 360.
             * @param anticlockwise The winding order of the start and end angles. Default false.
             * @param fillColor The color the arc will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, radius?: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean, fillColor?: number, fillAlpha?: number);

            /**
             * The number of iterations used when drawing the arc.
             * Increase this value for smoother arcs, at the cost of more polygons being rendered.
             * Modify this value by small amounts, such as 0.01.
             */
            iterations: number;

            /**
             * The radius of the arc, in pixels. Changing this value also updates the size of the
             * Game Object and triggers a recalculation of its geometry data.
             */
            radius: number;

            /**
             * The start angle of the arc, in degrees.
             */
            startAngle: number;

            /**
             * The end angle of the arc, in degrees.
             */
            endAngle: number;

            /**
             * The winding order of the start and end angles. If `true` the arc is drawn anti-clockwise
             * (counter-clockwise), otherwise it is drawn clockwise. This affects which direction the
             * arc sweeps between the start and end angles.
             */
            anticlockwise: boolean;

            /**
             * Sets the radius of the arc.
             * This call can be chained.
             * @param value The value to set the radius to.
             * @returns This Game Object instance.
             */
            setRadius(value: number): this;

            /**
             * Sets the number of iterations used when drawing the arc.
             * Increase this value for smoother arcs, at the cost of more polygons being rendered.
             * Modify this value by small amounts, such as 0.01.
             * This call can be chained.
             * @param value The value to set the iterations to.
             * @returns This Game Object instance.
             */
            setIterations(value: number): this;

            /**
             * Sets the starting angle of the arc, in degrees. Optionally also updates the winding order.
             * This call can be chained.
             * @param value The value to set the starting angle to.
             * @param anticlockwise If `true` the arc will be drawn anti-clockwise. If `false` it will be drawn clockwise. If not given, the current `anticlockwise` property value is used.
             * @returns This Game Object instance.
             */
            setStartAngle(value: number, anticlockwise?: boolean): this;

            /**
             * Sets the ending angle of the arc, in degrees. Optionally also updates the winding order.
             * This call can be chained.
             * @param value The value to set the ending angle to.
             * @param anticlockwise If `true` the arc will be drawn anti-clockwise. If `false` it will be drawn clockwise. If not given, the current `anticlockwise` property value is used.
             * @returns This Game Object instance.
             */
            setEndAngle(value: number, anticlockwise?: boolean): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports both fill and stroke colors.
         * 
         * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to
         * the Curve Shape in the constructor.
         * 
         * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method.
         * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations
         * that take place during construction. Increase and decrease the default value for smoother, or more
         * jagged, shapes.
         */
        class Curve extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param curve The Curve object to use to create the Shape.
             * @param fillColor The color the curve will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, curve?: Phaser.Curves.Curve, fillColor?: number, fillAlpha?: number);

            /**
             * The smoothness of the curve. The number of points used when rendering it.
             * Increase this value for smoother curves, at the cost of more polygons being rendered.
             */
            smoothness: number;

            /**
             * Sets the smoothness of the curve. The number of points used when rendering it.
             * Increase this value for smoother curves, at the cost of more polygons being rendered.
             * This call can be chained.
             * @param value The value to set the smoothness to.
             * @returns This Game Object instance.
             */
            setSmoothness(value: number): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports both fill and stroke colors.
         * 
         * When it renders it displays an ellipse shape. You can control the width and height of the ellipse.
         * If the width and height match it will render as a circle. If the width is less than the height,
         * it will look more like an egg shape.
         * 
         * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method.
         * This allows you to control how smooth the shape renders in WebGL, by controlling the number of points
         * used to approximate the curve. Increase the default value for smoother shapes, or decrease it for
         * more jagged, lower-polygon results.
         */
        class Ellipse extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the ellipse. An ellipse with equal width and height renders as a circle. Default 128.
             * @param height The height of the ellipse. An ellipse with equal width and height renders as a circle. Default 128.
             * @param fillColor The color the ellipse will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number);

            /**
             * The smoothness of the ellipse. The number of points used when rendering it.
             * Increase this value for a smoother ellipse, at the cost of more polygons being rendered.
             */
            smoothness: number;

            /**
             * Sets the size of the ellipse by changing the underlying geometry data, rather than scaling the object.
             * This call can be chained.
             * @param width The width of the ellipse.
             * @param height The height of the ellipse.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the smoothness of the ellipse, controlling the number of points used when rendering it.
             * Increase this value for a smoother ellipse, at the cost of more polygons being rendered.
             * This call can be chained.
             * @param value The value to set the smoothness to.
             * @returns This Game Object instance.
             */
            setSmoothness(value: number): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * A Grid Shape allows you to display a grid in your game, where you can control the size of the
         * grid as well as the width and height of the grid cells. You can set a fill color for each grid
         * cell as well as an alternate fill color. When the alternate fill color is set then the grid
         * cells will alternate the fill colors as they render, creating a chess-board effect. You can
         * also optionally have a stroke fill color. If set, this draws lines between the grid cells
         * in the given color. If you specify a stroke color with an alpha of zero, then it will draw
         * the cells spaced out, but without the lines between them.
         */
        class Grid extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param width The width of the grid. Default 128.
             * @param height The height of the grid. Default 128.
             * @param cellWidth The width of one cell in the grid. Default 32.
             * @param cellHeight The height of one cell in the grid. Default 32.
             * @param fillColor The color the grid cells will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             * @param strokeFillColor The color of the lines between the grid cells. See the `setStrokeStyle` method.
             * @param strokeFillAlpha The alpha of the lines between the grid cells.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, width?: number, height?: number, cellWidth?: number, cellHeight?: number, fillColor?: number, fillAlpha?: number, strokeFillColor?: number, strokeFillAlpha?: number);

            /**
             * The width of each grid cell.
             * Must be a positive value.
             */
            cellWidth: number;

            /**
             * The height of each grid cell.
             * Must be a positive value.
             */
            cellHeight: number;

            /**
             * Controls whether the grid renders alternating cells using the `altFillColor` and `altFillAlpha` values.
             * Set this via the `setAltFillStyle` method.
             */
            showAltCells: boolean;

            /**
             * The color the alternating grid cells will be filled with, i.e. 0xff0000 for red.
             */
            altFillColor: number;

            /**
             * The alpha the alternating grid cells will be filled with.
             * You can also set the alpha of the overall Shape using its `alpha` property.
             */
            altFillAlpha: number;

            /**
             * The padding around each cell. The effective gutter between cells is
             * twice this value.
             */
            cellPadding: number;

            /**
             * Whether to stroke on the outside edges of the Grid object.
             */
            strokeOutside: boolean;

            /**
             * Whether to stroke on the outside edges of the Grid object
             * when the cell is incomplete, e.g. the grid size does not
             * evenly fit the cell size.
             * 
             * This only has an effect if `strokeOutside` is `true`.
             * It will affect the right and bottom edges of the grid.
             */
            strokeOutsideIncomplete: boolean;

            /**
             * Sets the fill color and alpha level that the alternating grid cells will use.
             * 
             * If this method is called with no values then alternating grid cells will not be rendered in a different color.
             * 
             * Also see the `setStrokeStyle` and `setFillStyle` methods.
             * 
             * This call can be chained.
             * @param fillColor The color the alternating grid cells will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the alternating grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. Default 1.
             * @returns This Game Object instance.
             */
            setAltFillStyle(fillColor?: number, fillAlpha?: number): this;

            /**
             * Sets the cell padding for the grid.
             * The cell padding is the space around each cell, between the cells.
             * The effective gutter between cells is twice this value.
             * 
             * If this method is called with no value then the cell padding is set to zero.
             * 
             * This call can be chained.
             * @param value The cell padding value.
             * @returns This Game Object instance.
             */
            setCellPadding(value?: number): this;

            /**
             * Controls whether a stroke is drawn around the outer perimeter of the entire Grid object,
             * in addition to the lines drawn between cells. Optionally, you can also control whether the
             * outer edge is stroked on partial cells, i.e. where the grid dimensions do not divide evenly
             * by the cell dimensions, leaving an incomplete cell on the right or bottom edge.
             * 
             * This call can be chained.
             * @param strokeOutside Whether to stroke the outside edges of the Grid object.
             * @param strokeOutsideIncomplete Whether to stroke the outside edges of the Grid object when the cell is incomplete.
             */
            setStrokeOutside(strokeOutside: boolean, strokeOutsideIncomplete?: boolean): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports only fill colors and cannot be stroked.
         * 
         * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set
         * the color of the top, left and right faces of the rectangle respectively. You can also choose
         * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.
         * 
         * You cannot view an IsoBox from underneath, however you can change the 'angle' by setting
         * the `projection` property.
         */
        class IsoBox extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param size The width of the iso box in pixels. The left and right faces will be exactly half this value. Default 48.
             * @param height The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value. Default 32.
             * @param fillTop The fill color of the top face of the iso box. Default 0xeeeeee.
             * @param fillLeft The fill color of the left face of the iso box. Default 0x999999.
             * @param fillRight The fill color of the right face of the iso box. Default 0xcccccc.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, size?: number, height?: number, fillTop?: number, fillLeft?: number, fillRight?: number);

            /**
             * The projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.
             */
            projection: number;

            /**
             * The color used to fill in the top of the iso box.
             */
            fillTop: number;

            /**
             * The color used to fill in the left-facing side of the iso box.
             */
            fillLeft: number;

            /**
             * The color used to fill in the right-facing side of the iso box.
             */
            fillRight: number;

            /**
             * Controls whether the top face of the iso box will be rendered.
             */
            showTop: boolean;

            /**
             * Controls whether the left face of the iso box will be rendered.
             */
            showLeft: boolean;

            /**
             * Controls whether the right face of the iso box will be rendered.
             */
            showRight: boolean;

            /**
             * Sets the projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.
             * This call can be chained.
             * @param value The value to set the projection to.
             * @returns This Game Object instance.
             */
            setProjection(value: number): this;

            /**
             * Sets which faces of the iso box will be rendered.
             * This call can be chained.
             * @param showTop Show the top-face of the iso box. Default true.
             * @param showLeft Show the left-face of the iso box. Default true.
             * @param showRight Show the right-face of the iso box. Default true.
             * @returns This Game Object instance.
             */
            setFaces(showTop?: boolean, showLeft?: boolean, showRight?: boolean): this;

            /**
             * Sets the fill colors for each face of the iso box.
             * This call can be chained.
             * @param fillTop The color used to fill the top of the iso box.
             * @param fillLeft The color used to fill in the left-facing side of the iso box.
             * @param fillRight The color used to fill in the right-facing side of the iso box.
             * @returns This Game Object instance.
             */
            setFillStyle(fillTop?: number, fillLeft?: number, fillRight?: number): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports only fill colors and cannot be stroked.
         * 
         * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different
         * fill color. You can set the color of the top, left and right faces of the triangle respectively
         * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.
         * 
         * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting
         * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside
         * down or not.
         */
        class IsoTriangle extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param size The width of the iso triangle in pixels. The left and right faces will be exactly half this value. Default 48.
             * @param height The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value. Default 32.
             * @param reversed Is the iso triangle upside down? Default false.
             * @param fillTop The fill color of the top face of the iso triangle. Default 0xeeeeee.
             * @param fillLeft The fill color of the left face of the iso triangle. Default 0x999999.
             * @param fillRight The fill color of the right face of the iso triangle. Default 0xcccccc.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, size?: number, height?: number, reversed?: boolean, fillTop?: number, fillLeft?: number, fillRight?: number);

            /**
             * The projection level of the iso triangle. Change this to change the 'angle' at which you are looking at the pyramid.
             */
            projection: number;

            /**
             * The color used to fill in the top of the iso triangle. This is only used if the triangle is reversed.
             */
            fillTop: number;

            /**
             * The color used to fill in the left-facing side of the iso triangle.
             */
            fillLeft: number;

            /**
             * The color used to fill in the right-facing side of the iso triangle.
             */
            fillRight: number;

            /**
             * Controls whether the top face of the iso triangle will be rendered.
             */
            showTop: boolean;

            /**
             * Controls whether the left face of the iso triangle will be rendered.
             */
            showLeft: boolean;

            /**
             * Controls whether the right face of the iso triangle will be rendered.
             */
            showRight: boolean;

            /**
             * Indicates whether the iso triangle is rendered upside down.
             */
            isReversed: boolean;

            /**
             * Sets the projection level of the iso triangle. Change this to change the 'angle' at which you are looking at the pyramid.
             * This call can be chained.
             * @param value The value to set the projection to.
             * @returns This Game Object instance.
             */
            setProjection(value: number): this;

            /**
             * Sets if the iso triangle will be rendered upside down or not.
             * This call can be chained.
             * @param reversed Whether to render the iso triangle upside down.
             * @returns This Game Object instance.
             */
            setReversed(reversed: boolean): this;

            /**
             * Sets which faces of the iso triangle will be rendered.
             * This call can be chained.
             * @param showTop Show the top-face of the iso triangle (only if `reversed` is true) Default true.
             * @param showLeft Show the left-face of the iso triangle. Default true.
             * @param showRight Show the right-face of the iso triangle. Default true.
             * @returns This Game Object instance.
             */
            setFaces(showTop?: boolean, showLeft?: boolean, showRight?: boolean): this;

            /**
             * Sets the fill colors for each face of the iso triangle.
             * This call can be chained.
             * @param fillTop The color used to fill the top of the iso triangle.
             * @param fillLeft The color used to fill in the left-facing side of the iso triangle.
             * @param fillRight The color used to fill in the right-facing side of the iso triangle.
             * @returns This Game Object instance.
             */
            setFillStyle(fillTop?: number, fillLeft?: number, fillRight?: number): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports only stroke colors and cannot be filled.
         * 
         * A Line Shape allows you to draw a line between two points in your game. You can control the
         * stroke color and thickness of the line. In WebGL only, you can also specify a different
         * thickness for the start and end of the line, allowing you to render lines that taper off.
         * 
         * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.
         * 
         * Be aware that as with all Game Objects the default origin is 0.5. If you need to draw a Line
         * between two points and want the x1/y1 values to match the x/y values, then set the origin to 0.
         */
        class Line extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param x1 The horizontal position of the start of the line. Default 0.
             * @param y1 The vertical position of the start of the line. Default 0.
             * @param x2 The horizontal position of the end of the line. Default 128.
             * @param y2 The vertical position of the end of the line. Default 0.
             * @param strokeColor The color the line will be drawn in, i.e. 0xff0000 for red.
             * @param strokeAlpha The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, strokeColor?: number, strokeAlpha?: number);

            /**
             * The width (or thickness) of the line.
             * See the setLineWidth method for extra details on changing this on WebGL.
             */
            lineWidth: number;

            /**
             * Sets the width of the line.
             * 
             * When using the WebGL renderer you can have different start and end widths.
             * When using the Canvas renderer only the `startWidth` value is used. The `endWidth` is ignored.
             * 
             * This call can be chained.
             * @param startWidth The start width of the line.
             * @param endWidth The end width of the line. Only used in WebGL.
             * @returns This Game Object instance.
             */
            setLineWidth(startWidth: number, endWidth?: number): this;

            /**
             * Sets the start and end coordinates of this Line.
             * @param x1 The horizontal position of the start of the line. Default 0.
             * @param y1 The vertical position of the start of the line. Default 0.
             * @param x2 The horizontal position of the end of the line. Default 0.
             * @param y2 The vertical position of the end of the line. Default 0.
             * @returns This Line object.
             */
            setTo(x1?: number, y1?: number, x2?: number, y2?: number): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports both fill and stroke colors.
         * 
         * The Polygon Shape is created by providing a list of points, which are then used to create an
         * internal Polygon geometry object. The points can be set from a variety of formats:
         * 
         * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`
         * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]`
         * - An array of objects with public x/y properties: `[obj1, obj2, ...]`
         * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
         * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`
         * 
         * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending
         * on the coordinates of the points provided, the final shape may be rendered offset from its origin.
         * 
         * Note: The method `getBounds` will return incorrect bounds if any of the points in the Polygon are negative.
         * If this is the case, please use the function `Phaser.Geom.Polygon.GetAABB(polygon.geom)` instead and then
         * adjust the returned Rectangle position accordingly.
         */
        class Polygon extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param points The points that make up the polygon.
             * @param fillColor The color the polygon will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, points?: any, fillColor?: number, fillAlpha?: number);

            /**
             * Smooths the polygon over the number of iterations specified.
             * The base polygon data will be updated and replaced with the smoothed values.
             * This call can be chained.
             * @param iterations The number of times to apply the polygon smoothing. Default 1.
             * @returns This Game Object instance.
             */
            smooth(iterations?: number): this;

            /**
             * Sets this Polygon to the given points.
             * 
             * The points can be set from a variety of formats:
             * 
             * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`
             * - An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]`
             * - An array of objects with public x/y properties: `[obj1, obj2, ...]`
             * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
             * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`
             * 
             * Calling this method will reset the size (width, height) and display origin of this Shape.
             * 
             * It also runs both GetAABB and EarCut on the given points, so please be careful not to do this
             * at a high frequency, or with too many points.
             * @param points Points defining the perimeter of this polygon. Please check function description above for the different supported formats.
             * @returns This Game Object instance.
             */
            setTo(points?: string | number[] | Phaser.Types.Math.Vector2Like[]): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports both fill and stroke colors.
         * 
         * You can change the size of the rectangle by changing the `width` and `height` properties.
         */
        class Rectangle extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param width The width of the rectangle. Default 128.
             * @param height The height of the rectangle. Default 128.
             * @param fillColor The color the rectangle will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, width?: number, height?: number, fillColor?: number, fillAlpha?: number);

            /**
             * The radius of the rectangle if this is set to use rounded corners.
             * 
             * Do not modify this property. Instead, call the method `setRounded` to set the
             * radius of the rounded corners.
             */
            readonly radius: number;

            /**
             * Does this Rectangle have rounded corners?
             * 
             * Do not modify this property. Instead, call the method `setRounded` to set the
             * radius state of this rectangle.
             */
            readonly isRounded: boolean;

            /**
             * Sets this rectangle to have rounded corners by specifying the radius of the corners.
             * 
             * The radius of the rounded corners is limited by the smallest dimension of the rectangle.
             * 
             * To disable rounded corners, set the `radius` parameter to 0.
             * @param radius The radius of all four rounded corners. Default 16.
             * @returns This Game Object instance.
             */
            setRounded(radius?: number): this;

            /**
             * Sets the size of this Rectangle. This updates the underlying geometry, path data, display origin, and the default input hit area.
             * 
             * If you have assigned a custom input hit area for this Rectangle, changing the Rectangle size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports both fill and stroke colors.
         * 
         * As the name implies, the Star shape will display a star in your game. You can control several
         * aspects of it including the number of points that constitute the star. The default is 5. If
         * you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky
         * star shape.
         * 
         * You can also control the inner and outer radius, which is how 'long' each point of the star is.
         * Modify these values to create more interesting shapes.
         */
        class Star extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param points The number of points on the star. Default 5.
             * @param innerRadius The inner radius of the star, in pixels. Default 32.
             * @param outerRadius The outer radius of the star, in pixels. Default 64.
             * @param fillColor The color the star will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, points?: number, innerRadius?: number, outerRadius?: number, fillColor?: number, fillAlpha?: number);

            /**
             * Sets the number of points that make up the Star shape.
             * This call can be chained.
             * @param value The number of points the Star will have.
             * @returns This Game Object instance.
             */
            setPoints(value: number): this;

            /**
             * Sets the inner radius of the Star shape.
             * This call can be chained.
             * @param value The inner radius of the star, in pixels.
             * @returns This Game Object instance.
             */
            setInnerRadius(value: number): this;

            /**
             * Sets the outer radius of the Star shape.
             * This call can be chained.
             * @param value The outer radius of the star, in pixels.
             * @returns This Game Object instance.
             */
            setOuterRadius(value: number): this;

            /**
             * The number of points that make up the Star shape.
             */
            points: number;

            /**
             * The inner radius of the Star shape, in pixels.
             */
            innerRadius: number;

            /**
             * The outer radius of the Star shape, in pixels.
             */
            outerRadius: number;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can
         * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
         * it for input or physics. It provides a quick and easy way for you to render this shape in your
         * game without using a texture, while still taking advantage of being fully batched in WebGL.
         * 
         * This shape supports both fill and stroke colors.
         * 
         * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the
         * position of each point of these lines. The triangle is always closed and cannot have an open
         * face. If you require that, consider using a Polygon instead.
         */
        class Triangle extends Phaser.GameObjects.Shape {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world. Default 0.
             * @param y The vertical position of this Game Object in the world. Default 0.
             * @param x1 The horizontal position of the first point in the triangle. Default 0.
             * @param y1 The vertical position of the first point in the triangle. Default 128.
             * @param x2 The horizontal position of the second point in the triangle. Default 64.
             * @param y2 The vertical position of the second point in the triangle. Default 0.
             * @param x3 The horizontal position of the third point in the triangle. Default 128.
             * @param y3 The vertical position of the third point in the triangle. Default 128.
             * @param fillColor The color the triangle will be filled with, i.e. 0xff0000 for red.
             * @param fillAlpha The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.
             */
            constructor(scene: Phaser.Scene, x?: number, y?: number, x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number, fillColor?: number, fillAlpha?: number);

            /**
             * Sets the positions of the three vertices of this Triangle shape and updates its internal path data for rendering.
             * @param x1 The horizontal position of the first point in the triangle. Default 0.
             * @param y1 The vertical position of the first point in the triangle. Default 0.
             * @param x2 The horizontal position of the second point in the triangle. Default 0.
             * @param y2 The vertical position of the second point in the triangle. Default 0.
             * @param x3 The horizontal position of the third point in the triangle. Default 0.
             * @param y3 The vertical position of the third point in the triangle. Default 0.
             * @returns This Game Object instance.
             */
            setTo(x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Sprite Game Object.
         * 
         * A Sprite Game Object is used for the display of both static and animated images in your game.
         * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled
         * and animated.
         * 
         * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.
         * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation
         * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.
         */
        class Sprite extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.TextureCrop, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number);

            /**
             * The Animation State component of this Sprite.
             * 
             * This component provides features to apply animations to this Sprite.
             * It is responsible for playing, loading, queuing animations for later playback,
             * mixing between animations and setting the current animation frame to this Sprite.
             */
            anims: Phaser.Animations.AnimationState;

            /**
             * Called automatically by Phaser when this Sprite is added to a Scene.
             * 
             * Registers this Sprite with the Scene's update list so that its `preUpdate` method
             * is called each game step, allowing animations to advance each frame.
             */
            addedToScene(): void;

            /**
             * Called automatically by Phaser when this Sprite is removed from a Scene.
             * 
             * Unregisters this Sprite from the Scene's update list so that its `preUpdate` method
             * is no longer called each game step.
             */
            removedFromScene(): void;

            /**
             * Update this Sprite's animations.
             * @param time The current timestamp.
             * @param delta The delta time, in ms, elapsed since the last frame.
             */
            protected preUpdate(time: number, delta: number): void;

            /**
             * Start playing the given animation on this Sprite.
             * 
             * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite.
             * 
             * The benefit of a global animation is that multiple Sprites can all play the same animation, without
             * having to duplicate the data. You can just create it once and then play it on any Sprite.
             * 
             * The following code shows how to create a global repeating animation. The animation will be created
             * from all of the frames within the sprite sheet that was loaded with the key 'muybridge':
             * 
             * ```javascript
             * var config = {
             *     key: 'run',
             *     frames: 'muybridge',
             *     frameRate: 15,
             *     repeat: -1
             * };
             * 
             * //  This code should be run from within a Scene:
             * this.anims.create(config);
             * ```
             * 
             * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone,
             * you can call the `Animation.create` method instead. It accepts the exact same parameters as when
             * creating a global animation, however the resulting data is kept locally in this Sprite.
             * 
             * With the animation created, either globally or locally, you can now play it on this Sprite:
             * 
             * ```javascript
             * this.add.sprite(x, y).play('run');
             * ```
             * 
             * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config
             * object instead:
             * 
             * ```javascript
             * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 });
             * ```
             * 
             * When playing an animation on a Sprite it will first check to see if it can find a matching key
             * locally within the Sprite. If it can, it will play the local animation. If not, it will then
             * search the global Animation Manager and look for it there.
             * 
             * If you need a Sprite to be able to play both local and global animations, make sure they don't
             * have conflicting keys.
             * 
             * See the documentation for the `PlayAnimationConfig` config object for more details about this.
             * 
             * Also, see the documentation in the Animation Manager for further details on creating animations.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
             * @param ignoreIfPlaying If an animation is already playing then ignore this call. Default false.
             * @returns This Game Object.
             */
            play(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, ignoreIfPlaying?: boolean): this;

            /**
             * Start playing the given animation on this Sprite, in reverse.
             * 
             * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite.
             * 
             * The benefit of a global animation is that multiple Sprites can all play the same animation, without
             * having to duplicate the data. You can just create it once and then play it on any Sprite.
             * 
             * The following code shows how to create a global repeating animation. The animation will be created
             * from all of the frames within the sprite sheet that was loaded with the key 'muybridge':
             * 
             * ```javascript
             * var config = {
             *     key: 'run',
             *     frames: 'muybridge',
             *     frameRate: 15,
             *     repeat: -1
             * };
             * 
             * //  This code should be run from within a Scene:
             * this.anims.create(config);
             * ```
             * 
             * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone,
             * you can call the `Animation.create` method instead. It accepts the exact same parameters as when
             * creating a global animation, however the resulting data is kept locally in this Sprite.
             * 
             * With the animation created, either globally or locally, you can now play it on this Sprite:
             * 
             * ```javascript
             * this.add.sprite(x, y).playReverse('run');
             * ```
             * 
             * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config
             * object instead:
             * 
             * ```javascript
             * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 });
             * ```
             * 
             * When playing an animation on a Sprite it will first check to see if it can find a matching key
             * locally within the Sprite. If it can, it will play the local animation. If not, it will then
             * search the global Animation Manager and look for it there.
             * 
             * If you need a Sprite to be able to play both local and global animations, make sure they don't
             * have conflicting keys.
             * 
             * See the documentation for the `PlayAnimationConfig` config object for more details about this.
             * 
             * Also, see the documentation in the Animation Manager for further details on creating animations.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
             * @param ignoreIfPlaying If an animation is already playing then ignore this call. Default false.
             * @returns This Game Object.
             */
            playReverse(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, ignoreIfPlaying?: boolean): this;

            /**
             * Waits for the specified delay, in milliseconds, then starts playback of the given animation.
             * 
             * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here.
             * 
             * If an animation is already running and a new animation is given to this method, it will wait for
             * the given delay before starting the new animation.
             * 
             * If no animation is currently running, the given one begins after the delay.
             * 
             * When playing an animation on a Sprite it will first check to see if it can find a matching key
             * locally within the Sprite. If it can, it will play the local animation. If not, it will then
             * search the global Animation Manager and look for it there.
             * 
             * Prior to Phaser 3.50 this method was called 'delayedPlay'.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
             * @param delay The delay, in milliseconds, to wait before starting the animation playing.
             * @returns This Game Object.
             */
            playAfterDelay(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, delay: number): this;

            /**
             * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback
             * of the given animation.
             * 
             * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an
             * idle animation to a walking animation, by making them blend smoothly into each other.
             * 
             * If no animation is currently running, the given one will start immediately.
             * 
             * When playing an animation on a Sprite it will first check to see if it can find a matching key
             * locally within the Sprite. If it can, it will play the local animation. If not, it will then
             * search the global Animation Manager and look for it there.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
             * @param repeatCount How many times should the animation repeat before the next one starts? Default 1.
             * @returns This Game Object.
             */
            playAfterRepeat(key: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig, repeatCount?: number): this;

            /**
             * Sets an animation, or an array of animations, to be played immediately after the current one completes or stops.
             * 
             * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc,
             * or have the `stop` method called directly on it.
             * 
             * An animation set to repeat forever will never enter a completed state.
             * 
             * You can chain a new animation at any point, including before the current one starts playing, during it,
             * or when it ends (via its `animationcomplete` event).
             * 
             * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained
             * animations without impacting the animation they're playing.
             * 
             * Call this method with no arguments to reset all currently chained animations.
             * 
             * When playing an animation on a Sprite it will first check to see if it can find a matching key
             * locally within the Sprite. If it can, it will play the local animation. If not, it will then
             * search the global Animation Manager and look for it there.
             * @param key The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them.
             * @returns This Game Object.
             */
            chain(key?: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig | string[] | Phaser.Animations.Animation[] | Phaser.Types.Animations.PlayAnimationConfig[]): this;

            /**
             * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` events.
             * 
             * If no animation is playing, no event will be dispatched.
             * 
             * If there is another animation queued (via the `chain` method) then it will start playing immediately.undefined
             * @returns This Game Object.
             */
            stop(): this;

            /**
             * Stops the current animation from playing after the specified time delay, given in milliseconds.
             * 
             * It then dispatches the `ANIMATION_STOP` event.
             * 
             * If no animation is running, no events will be dispatched.
             * 
             * If there is another animation in the queue (set via the `chain` method) then it will start playing,
             * when the current one stops.
             * @param delay The number of milliseconds to wait before stopping this animation.
             * @returns This Game Object.
             */
            stopAfterDelay(delay: number): this;

            /**
             * Stops the current animation from playing after the given number of repeats.
             * 
             * It then dispatches the `ANIMATION_STOP` event.
             * 
             * If no animation is running, no events will be dispatched.
             * 
             * If there is another animation in the queue (set via the `chain` method) then it will start playing,
             * when the current one stops.
             * @param repeatCount How many times should the animation repeat before stopping? Default 1.
             * @returns This Game Object.
             */
            stopAfterRepeat(repeatCount?: number): this;

            /**
             * Stops the current animation from playing when it next sets the given frame.
             * If this frame doesn't exist within the animation it will not stop it from playing.
             * 
             * It then dispatches the `ANIMATION_STOP` event.
             * 
             * If no animation is running, no events will be dispatched.
             * 
             * If there is another animation in the queue (set via the `chain` method) then it will start playing,
             * when the current one stops.
             * @param frame The frame to check before stopping this animation.
             * @returns This Game Object.
             */
            stopOnFrame(frame: Phaser.Animations.AnimationFrame): this;

            /**
             * Build a JSON representation of this Sprite.undefined
             * @returns A JSON representation of the Game Object.
             */
            toJSON(): Phaser.Types.GameObjects.JSONGameObject;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the size of this Game Object to be that of the given Frame.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param frame The frame to base the size of this Game Object on.
             * @returns This Game Object instance.
             */
            setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display (rendered) size of this Game Object in pixels.
             * 
             * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
             * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
             * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
             * the scale manually, but more convenient when you want to work in pixel values directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * A boolean flag indicating if this Game Object is being cropped or not.
             * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
             * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
             */
            isCropped: boolean;

            /**
             * Applies a crop to a texture based Game Object, such as a Sprite or Image.
             * 
             * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
             * 
             * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
             * changes what is shown when rendered.
             * 
             * The crop size as well as coordinates can not exceed the size of the texture frame.
             * 
             * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
             * 
             * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
             * half of it, you could call `setCrop(0, 0, 400, 600)`.
             * 
             * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
             * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
             * 
             * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
             * 
             * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
             * 
             * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
             * the renderer to skip several internal calculations.
             * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
             * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
             * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
             * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
             * @returns This Game Object instance.
             */
            setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture.
             * @returns This Game Object instance.
             */
            setTexture(key: string, frame?: string | number): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A SpriteGPULayer GameObject. This is a WebGL only GameObject.
         * It is optimized for rendering very large numbers of quads
         * following simple tween animations.
         * It is suited to complex backgrounds with animation.
         * 
         * A SpriteGPULayer is a composite object that contains a collection of
         * Member objects. It stores the rendering data for these
         * objects in a GPU buffer, and renders them in a single draw call.
         * Because it only updates the GPU buffer when necessary,
         * it is up to 100 times faster than rendering the objects individually.
         * Avoid changing the contents of the SpriteGPULayer frequently, as this
         * requires the whole buffer to be updated.
         * 
         * The layer can generally perform well with a million small quads.
         * The exact performance will depend on the device and the size of the quads.
         * If the quads are large, the layer will be fill-rate limited.
         * Avoid drawing more than a few million pixels per frame.
         * 
         * When populating the SpriteGPULayer, use `addMember` to add a new member
         * to the top of the layer. You should populate the layer all at once,
         * and leave it unchanged, rather than frequently adding and removing members,
         * because it is expensive to update the buffer.
         * 
         * Rather than create a new `SpriteGPULayer.Member` object for each `addMember` call,
         * you can reuse the same object. This is more efficient,
         * because creating millions of objects has a major performance cost
         * and may cause garbage collection issues.
         * 
         * Notes on modifying the SpriteGPULayer:
         * 
         * The following operations are expensive. They require some or all of the
         * buffer to be updated:
         * 
         * - `addData`
         * - `addMember`
         * - `editMember`
         * - `patchMember`
         * - `resize`
         * - `removeMembers`
         * 
         * Members are added at the end of the buffer. Removed members are spliced out
         * of the buffer, causing the whole buffer to be updated.
         * The index of later members will change if you remove an earlier member.
         * If you need to maintain a structure, such as a grid of tiles,
         * it's best to "remove" a member by setting its scaleX, scaleY, and alpha to 0.
         * It is still rendered, but it does not fill any pixels.
         * 
         * Changes to a small segment of the buffer are less expensive.
         * The buffer is split into several segments, and each segment can be updated
         * independently. Editing and patching members will only update the segments
         * that contain the members being edited.
         * Updating occurs at render time, so edits all happen at once.
         * This can reduce the amount of data that needs to be updated,
         * but it is still more expensive than not updating the buffer at all.
         * If you're updating a large number of segments, it may be more efficient
         * to call `setAllSegmentsNeedUpdate` and update the whole buffer at once
         * rather than make several segment updates in a row.
         * 
         * The animations in the initial member data are used to compile the shader
         * and `frameDataTexture`. If you add new animations after the initial
         * compilation, the shader and texture will be rebuilt, which is expensive.
         * 
         * Notes on textures:
         * 
         * This layer gains much of its speed from inflexibility. It can only use one
         * texture, and that texture must be a single image.
         * It cannot use multi-atlas textures.
         * 
         * Further, if the texture is not a power of two in size,
         * some texture seaming may occur if you line up sprites exactly.
         * This is because the GPU precision is limited by binary logic,
         * and texture coordinates will only be perfectly accurate for power of two textures.
         * This can be avoided by adding/extruding a pixel of padding around each frame
         * in the texture, or by using a power of two texture.
         * 
         * Which should you use?
         * 
         * - If you are using pixel art mode or round pixels,
         *   you should aim to use a power of two texture.
         * - If you are using smooth mode, you can use a non-power of two texture,
         *   but you should add padding around each frame to avoid seaming.
         * - If you are using a single image, or none of the frames in the texture
         *   need to tile, it doesn't matter.
         */
        class SpriteGPULayer extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.ElapseTimer, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.TextureCrop, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this SpriteGPULayer belongs.
             * @param texture The texture that will be used to render the SpriteGPULayer. This must be sourced from a single image; a multi atlas will not work.
             * @param size The maximum number of quads that this SpriteGPULayer will hold. This can be increased later if necessary.
             */
            constructor(scene: Phaser.Scene, texture: Phaser.Textures.Texture, size: number);

            /**
             * The number of quad members in the SpriteGPULayer.
             */
            memberCount: number;

            /**
             * The maximum number of quad members that can be in the SpriteGPULayer.
             * This value is read-only. Change buffer size with `resize`.
             */
            readonly size: number;

            /**
             * The state of `bufferUpdateSegments` when it's full.
             * This is a constant value and should not be altered.
             * If you do, all hell will break loose.
             */
            readonly MAX_BUFFER_UPDATE_SEGMENTS_FULL: number;

            /**
             * Which segments of the buffer require updates.
             * This is a bitfield with segments equal to `_segments`.
             */
            bufferUpdateSegments: number;

            /**
             * The size of each segment of the buffer that requires updates.
             */
            bufferUpdateSegmentSize: number;

            /**
             * The gravity used by member animations in 'Gravity' mode.
             * This is the acceleration in pixels per second squared.
             * The default is 1024 pixels per second squared.
             * 
             * Any animation can be set to `ease: 'Gravity'` to use this value.
             * Instead of `amplitude`, the animation takes
             * `velocity` (a number of pixels) and
             * `gravityFactor` (-1 to 1) parameters.
             * Note that a `gravityFactor` of 0 is assumed to be a mistake,
             * and will be converted to 1.
             */
            gravity: number;

            /**
             * Strings for valid easing functions that can be assigned to
             * the `ease` property of an SpriteGPULayerMemberAnimation.
             * This is the reverse mapping of `this.EASE_CODES`.
             */
            readonly EASE: object;

            /**
             * Codes for valid easing functions that can be assigned to
             * the `ease` property of an SpriteGPULayerMemberAnimation.
             * This is the reverse mapping of `this.EASE`.
             */
            readonly EASE_CODES: object;

            /**
             * A texture containing the frame data for the SpriteGPULayer.
             * This is used by the vertex shader.
             * 
             * The texture is composed of pixel strides, where each stride
             * is interpreted as 6 16-bit unsigned integers,
             * representing the x, y, width, height, and origin x and y of a frame.
             * The texture will be up to 4096 pixels wide and as tall as necessary.
             * 
             * There are two sets of data in the texture: frames and animations.
             * Frames are taken from the `texture`.
             * Animations are defined by calling `setAnimations`,
             * and consist of runs of frames suited to shader animation.
             * Although the texture will be regenerated by `setAnimations`,
             * the frames are stored first, so their indices won't change.
             * 
             * If you change the `texture` of this layer, you will need to
             * regenerate this by calling `generateFrameDataTexture`.
             */
            frameDataTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * A map of frame names to indices in the frame data texture.
             * This is used to convert frame names to indices for the vertex shader.
             */
            frameDataIndices: object;

            /**
             * A map of indices to frame names in the frame data texture.
             * This is used to convert frame indices back to names for debugging.
             */
            frameDataIndicesInv: object;

            /**
             * An ordered list of animations in the frame data texture.
             */
            animationData: object[];

            /**
             * A map of animation names to animation parameters in
             * the frame data texture.
             * This is used to convert animation names to indices and durations
             * for the vertex shader.
             */
            animationDataNames: object;

            /**
             * A map of frame indices to animation parameters in
             * the frame data texture.
             * These are the starting frame indices used by the vertex shader.
             * They can be used to map back to names in `animationDataIndices`.
             */
            animationDataIndices: object;

            /**
             * The SubmitterSpriteGPULayer RenderNode for this SpriteGPULayer.
             * 
             * This handles rendering the SpriteGPULayer to the GPU.
             * It is created automatically when the SpriteGPULayer is initialized.
             * Most RenderNodes are singletons stored in the RenderNodeManager,
             * but because this one holds very specific data,
             * it is stored in the SpriteGPULayer itself.
             */
            submitterNode: Phaser.Renderer.WebGL.RenderNodes.SubmitterSpriteGPULayer;

            /**
             * The next member buffer, used to store member data
             * before it is added to the GPU buffer.
             */
            nextMember: ArrayBuffer;

            /**
             * A Float32Array view of the next member buffer.
             */
            nextMemberF32: Float32Array;

            /**
             * A Uint32Array view of the next member buffer.
             * This is used to write 32-bit integer data to the buffer.
             * It is used for color data.
             */
            nextMemberU32: Uint32Array;

            /**
             * Called when this SpriteGPULayer is added to a Scene.
             * Registers it with the Scene's update list so it receives `preUpdate` calls each frame.
             */
            addedToScene(): void;

            /**
             * Called when this SpriteGPULayer is removed from a Scene.
             * Deregisters it from the Scene's update list so it no longer receives `preUpdate` calls.
             */
            removedFromScene(): void;

            /**
             * The update step for this SpriteGPULayer, called each frame by the Scene.
             * Advances the internal elapsed timer used for member animations.
             * @param time The current timestamp, as generated by the Request Animation Frame or SetTimeout.
             * @param delta The delta time, in milliseconds, elapsed since the last frame.
             */
            preUpdate(time: number, delta: number): void;

            /**
             * Get the number of bytes used to define a member.
             * If you are directly editing the buffer, you will need this value
             * as a 'stride' to move through the buffer.undefined
             * @returns The number of bytes used for each member.
             */
            getDataByteSize(): number;

            /**
             * Return a list of features to enable in the shader program.
             * This is used when the shader program is compiled.undefined
             * @returns An array of features to enable in the shader program.
             */
            getShaderFeatures(): string[];

            /**
             * Set the animations available to the SpriteGPULayer.
             * This will call `generateFrameDataTexture` to regenerate
             * `frameDataTexture`.
             * 
             * Each animation can be either an Animation object, or an object
             * containing a name, duration, and an array of frame names/numbers.
             * If an Animation is used, it will be converted to the object form,
             * discarding any custom individual frame durations
             * and using the animation's duration as default.
             * 
             * This is not a Phaser Animation. It is intended to cycle automatically
             * on the GPU without supervision or interaction. It will not emit events,
             * allow you to pause the animation, set number of repeats, etc.
             * @param animations An array of animations to set.
             * @returns This SpriteGPULayer object.
             */
            setAnimations(animations: Phaser.Animations.Animation[] | Phaser.Types.GameObjects.SpriteGPULayer.SetAnimation[]): this;

            /**
             * Generate `frameDataTexture` for the SpriteGPULayer.
             * This is used by the vertex shader to access frame data.
             */
            generateFrameDataTexture(): void;

            /**
             * Resizes the SpriteGPULayer buffer to a new size.
             * Optionally, clears the buffer.
             * 
             * This is an expensive operation, as it requires the whole buffer to be updated.
             * It can take many frames to complete.
             * @param count The new number of members in the SpriteGPULayer.
             * @param clear Whether to clear the buffer. Default false.
             * @returns This SpriteGPULayer object.
             */
            resize(count: number, clear?: boolean): this;

            /**
             * Sets a segment of the buffer to require an update.
             * @param index The index at which an update occurred, which requires the segment to be updated.
             */
            setSegmentNeedsUpdate(index: number): void;

            /**
             * Sets all segments of the buffer to require an update.
             */
            setAllSegmentsNeedUpdate(): void;

            /**
             * Clears all segments of the buffer that require an update.
             */
            clearAllSegmentsNeedUpdate(): void;

            /**
             * Adds data to the SpriteGPULayer buffer.
             * It is inserted at the end of the buffer.
             * 
             * This is mostly used internally by the SpriteGPULayer.
             * It takes raw data as a buffer, which is very efficient,
             * but `addMember` is easier to use.
             * 
             * Note that, if you add a member with an animation,
             * the animation must either already be enabled,
             * or you must enable it with `setAnimationEnabled`,
             * e.g. `layer.setAnimationEnabled('Linear', true)` or
             * `layer.setAnimationEnabled(layer.EASE_CODES[layer.EASE.Linear], true)`.
             * 
             * This is a buffer modification, and is expensive.
             * @param member The raw data to add to the buffer.
             * @returns This SpriteGPULayer object.
             */
            addData(member: Float32Array): this;

            /**
             * Adds a member to the SpriteGPULayer.
             * This is the easiest way to add a member to the SpriteGPULayer.
             * 
             * This is a buffer modification, and is expensive.
             * @param member The member to add to the SpriteGPULayer.
             * @returns This SpriteGPULayer object.
             */
            addMember(member?: Partial<Phaser.Types.GameObjects.SpriteGPULayer.Member>): this;

            /**
             * Edits a member of the SpriteGPULayer.
             * This will update the member's data in the GPU buffer.
             * Only the buffer segment containing the target member will be marked for update,
             * making this less expensive than a full buffer update.
             * @param index The index of the member to edit.
             * @param member The new member data.
             * @returns This SpriteGPULayer object.
             */
            editMember(index: number, member: Partial<Phaser.Types.GameObjects.SpriteGPULayer.Member>): this;

            /**
             * Update a member of the SpriteGPULayer with raw data.
             * This will update the member's data in the GPU buffer.
             * Only the buffer segment containing the target member will be marked for update,
             * making this less expensive than a full buffer update.
             * 
             * You can supply a mask to control which properties are updated.
             * This can be useful for updating only a subset of properties.
             * Try using `getMemberData` to copy an existing member's data,
             * then modify the data you want to change.
             * 
             * The data must be passed in as an Uint32Array.
             * This will preserve data that other TypedArrays would not.
             * As it uses an underlying ArrayBuffer, you can work on the data
             * with any TypedArray view before submitting it.
             * @param index The index of the member to patch.
             * @param member The new member data.
             * @param mask The mask to apply to the member data. A value of 1 will update the member data, a value of 0 will keep the existing member data.
             */
            patchMember(index: number, member: Uint32Array, mask?: number[]): void;

            /**
             * Returns a member of the SpriteGPULayer.
             * 
             * This returns an object copied from the buffer.
             * Editing it will not change anything in the SpriteGPULayer.
             * The object will be functionally identical to the data used to
             * create the buffer, but some values may be different.
             * 
             * - Properties that support animation, but have no amplitude or duration or have easing 'None' (0), will be presented as numbers.
             * - Animation easing values will be presented as numbers (the values
             *   in `this.EASE`).
             * - Animation delay values will be normalized to the duration,
             *   e.g. a delay of 150 with a duration of 100 will return 50.
             * - Some rounding may occur due to floating point precision.
             * @param index The index of the member to get.
             * @returns The member data, or null if the index is out of bounds.
             */
            getMember(index: number): Phaser.Types.GameObjects.SpriteGPULayer.Member | null;

            /**
             * Returns the raw data of a member of the SpriteGPULayer.
             * This can be useful as the base of efficient editing operations,
             * including calls to `addData` and `patchMember`,
             * so no data has to be converted.
             * 
             * This returns an Uint32Array copied from the buffer.
             * Editing it will not change anything in the SpriteGPULayer.
             * The array will be functionally identical to the data used to
             * create the buffer.
             * 
             * By default, the data is copied into `this.nextMember`.
             * You can use the views `this.nextMemberF32` and `this.nextMemberU32`
             * to access the data in different formats.
             * If you provide an `out` parameter, the data will be copied to that array,
             * and you must construct your own views.
             * 
             * The primary data view is a 42-element array of 32-bit floats.
             * Some values are grouped to form animations, of the form:
             * 
             * - 0: base value
             * - 1: amplitude
             * - 2: duration (if negative, the animation will yoyo)
             * - 3: delay (the integer part is the easing, the decimal part is the delay divided by 2 * duration; if negative, the animation will not loop)
             * 
             * The overall structure is thus:
             * 
             * - 0-3: x (animation)
             * - 4-7: y (animation)
             * - 8-11: rotation (animation)
             * - 12-15: scaleX (animation)
             * - 16-19: scaleY (animation)
             * - 20-23: alpha (animation)
             * - 24-27: frame index (animation)
             * - 28-31: tintBlend (animation)
             * - 32-35: no data
             * - 36: originX
             * - 37: originY
             * - 38: tintMode
             * - 39: creationTime
             * - 40: scrollFactorX
             * - 41: scrollFactorY
             * 
             * Elements 32-35 are only visible in the Uint32Array view.
             * They store 32-bit RGBA values for the four corners of the tint:
             * 
             * - 32: bottom-left
             * - 33: top-left
             * - 34: bottom-right
             * - 35: top-right
             * 
             * If the ease for an animation is 'Gravity', the amplitude is replaced
             * with a two-part value: the integer part is the `velocity`,
             * and the fractional part is the remapped `gravityFactor`.
             * To get the true `gravityFactor`, use `gravityFactor * 2 - 1` to map from [0,1] to [-1,1].
             * An output `gravityFactor` of 0 actually means 1.
             * @param index The index of the member to get.
             * @param out An optional array to copy the data to. If not provided, `this.nextMember` will be populated, and `nextMemberU32` will be returned.
             * @returns The member data, or null if the index is out of bounds.
             */
            getMemberData(index: number, out?: Uint32Array): Uint32Array | null;

            /**
             * Removes a member or a number of members from the SpriteGPULayer.
             * This will update the GPU buffer.
             * This is an expensive operation, as it requires the whole buffer to be updated.
             * 
             * The buffer is not resized.
             * @param index The index of the member to remove.
             * @param count The number of members to remove, default 1. Default 1.
             * @returns This SpriteGPULayer object.
             */
            removeMembers(index: number, count?: number): this;

            /**
             * Inserts members into the SpriteGPULayer.
             * This will update the GPU buffer.
             * This is an expensive operation, as it requires the whole buffer to be
             * updated after the insertion point.
             * @param index The index at which to insert members.
             * @param members The members to insert.
             * @returns This SpriteGPULayer object.
             */
            insertMembers(index: number, members: Phaser.Types.GameObjects.SpriteGPULayer.Member | Phaser.Types.GameObjects.SpriteGPULayer.Member[]): this;

            /**
             * Inserts raw data into the SpriteGPULayer.
             * This will update the GPU buffer.
             * This is an expensive operation, as it requires the whole buffer to be
             * updated after the insertion point.
             * 
             * The data must be passed in as a Uint32Array.
             * This will preserve data that other TypedArrays would not.
             * As it uses an underlying ArrayBuffer, you can work on the data
             * with any TypedArray view before submitting it.
             * 
             * The buffer can contain 1 or more members.
             * Ensure that the buffer is the correct size for the number of members.
             * See `getMemberData` for the structure of the data.
             * 
             * Note that, if you add a member with an animation,
             * the animation must either already be enabled,
             * or you must enable it with `setAnimationEnabled`,
             * e.g. `layer.setAnimationEnabled('Linear', true)` or
             * `layer.setAnimationEnabled(layer.EASE_CODES[layer.EASE.Linear], true)`.
             * @param index The index at which to insert members.
             * @param data The members to insert.
             * @returns This SpriteGPULayer object.
             */
            insertMembersData(index: number, data: Uint32Array): this;

            /**
             * Set the enabled state of an animation.
             * This will enable or disable the animation in the shader program.
             * This method is called automatically when animations are added with
             * `addMember`, so you should not need to call it manually.
             * 
             * Every enabled animation has a cost in the shader program.
             * In particular, low-end devices may be unable to compile a large number
             * of animations, so be careful when enabling many animations.
             * 
             * Note that animations are not disabled automatically,
             * even if they are not used by any members.
             * There are probably too many members for this to be efficient.
             * @param name The name of the animation to enable or disable.
             * @param enabled Whether to enable or disable the animation.
             * @returns This SpriteGPULayer object
             */
            setAnimationEnabled(name: string, enabled: boolean): this;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The time elapsed since timer initialization, in milliseconds.
             */
            timeElapsed: number;

            /**
             * The time after which `timeElapsed` will reset, in milliseconds.
             * By default, this is 1 hour.
             * If you use the timer for animations, you can set this to a period
             * that matches the animation durations.
             * 
             * This is necessary for the timer to avoid floating-point precision issues
             * in shaders.
             * A float32 can represent a few hours of milliseconds accurately,
             * but the precision decreases as the value increases.
             */
            timeElapsedResetPeriod: number;

            /**
             * Whether the elapse timer is paused.
             */
            timePaused: boolean;

            /**
             * Set the reset period for the elapse timer for this game object.
             * @param period The time after which `timeElapsed` will reset, in milliseconds.
             * @returns This game object.
             */
            setTimerResetPeriod(period: number): this;

            /**
             * Pauses or resumes the elapse timer for this game object.
             * @param paused Pause state (`true` to pause, `false` to unpause). If not specified, the timer will unpause.
             * @returns This game object.
             */
            setTimerPaused(paused?: boolean): this;

            /**
             * Reset the elapse timer for this game object.
             * @param ms The time to reset the timer to, in milliseconds. Default 0.
             * @returns This game object.
             */
            resetTimer(ms?: number): this;

            /**
             * Update the elapse timer for this game object.
             * This should be called automatically by the preUpdate method.
             * 
             * Override this method to create more advanced time management,
             * or set it to a NOOP function to disable the timer update.
             * If you want to control animations with a tween or input system,
             * disabling the timer update could be useful.
             * @param time The current time in milliseconds.
             * @param delta The time since the last update, in milliseconds.
             * @returns This game object.
             */
            updateTimer(time: number, delta: number): this;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * A boolean flag indicating if this Game Object is being cropped or not.
             * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
             * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
             */
            isCropped: boolean;

            /**
             * Applies a crop to a texture based Game Object, such as a Sprite or Image.
             * 
             * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
             * 
             * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
             * changes what is shown when rendered.
             * 
             * The crop size as well as coordinates can not exceed the size of the texture frame.
             * 
             * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
             * 
             * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
             * half of it, you could call `setCrop(0, 0, 400, 600)`.
             * 
             * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
             * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
             * 
             * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
             * 
             * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
             * 
             * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
             * the renderer to skip several internal calculations.
             * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
             * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
             * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
             * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
             * @returns This Game Object instance.
             */
            setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture.
             * @returns This Game Object instance.
             */
            setTexture(key: string, frame?: string | number): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Stamp Game Object.
         * 
         * A Stamp is a lightweight Game Object which ignores camera scroll and transform,
         * so it is always rendered at a fixed position on-screen regardless of where the
         * camera is looking. This makes it ideal for HUDs, score counters, overlays, and
         * other screen-space elements that should not move with the game world.
         * 
         * Its primary role is as an internal helper for DynamicTexture rendering, where it
         * is used to draw (stamp) textures onto a DynamicTexture surface without the overhead
         * of a full scene Game Object lifecycle. It is otherwise functionally similar to
         * an Image Game Object.
         */
        class Stamp extends Phaser.GameObjects.Image implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.TextureCrop, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
             * @param frame An optional frame from the Texture this Game Object is rendering with.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number);

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the size of this Game Object to be that of the given Frame.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param frame The frame to base the size of this Game Object on.
             * @returns This Game Object instance.
             */
            setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display (rendered) size of this Game Object in pixels.
             * 
             * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
             * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
             * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
             * the scale manually, but more convenient when you want to work in pixel values directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * A boolean flag indicating if this Game Object is being cropped or not.
             * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
             * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
             */
            isCropped: boolean;

            /**
             * Applies a crop to a texture based Game Object, such as a Sprite or Image.
             * 
             * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
             * 
             * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
             * changes what is shown when rendered.
             * 
             * The crop size as well as coordinates can not exceed the size of the texture frame.
             * 
             * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
             * 
             * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
             * half of it, you could call `setCrop(0, 0, 400, 600)`.
             * 
             * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
             * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
             * 
             * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
             * 
             * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
             * 
             * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
             * the renderer to skip several internal calculations.
             * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
             * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
             * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
             * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
             * @returns This Game Object instance.
             */
            setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture.
             * @returns This Game Object instance.
             */
            setTexture(key: string, frame?: string | number): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * Calculates and returns the rendered dimensions of a Text object, including the width of each line, the maximum line width, the total height (accounting for line spacing), and the number of drawn lines (respecting `maxLines`).
         * @param text The Text object to calculate the size from.
         * @param size The Text metrics to use when calculating the size.
         * @param lines The lines of text to calculate the size from.
         * @returns An object containing dimensions of the Text object.
         */
        function GetTextSize(text: Phaser.GameObjects.Text, size: Phaser.Types.GameObjects.Text.TextMetrics, lines: string[]): Phaser.Types.GameObjects.Text.GetTextSizeObject;

        /**
         * Calculates the ascent, descent, and fontSize metrics for a given TextStyle by rendering text to a temporary offscreen canvas and measuring the pixel boundaries. It uses the `actualBoundingBoxAscent`/`actualBoundingBoxDescent` API where available, falling back to a pixel-scanning approach for older browsers.
         * @param textStyle The TextStyle object to measure.
         * @returns An object containing the ascent, descent and fontSize of the TextStyle.
         */
        function MeasureText(textStyle: Phaser.GameObjects.TextStyle): Phaser.Types.GameObjects.Text.TextMetrics;

        /**
         * A Text Game Object.
         * 
         * Text objects work by creating their own internal hidden Canvas and then renders text to it using
         * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered
         * to your game during the render pass.
         * 
         * Because it uses the Canvas API you can take advantage of all the features this offers, such as
         * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts
         * loaded externally, such as Google or TypeKit Web fonts.
         * 
         * **Important:** The font name must be quoted if it contains certain combinations of digits or
         * special characters, either when creating the Text object, or when setting the font via `setFont`
         * or `setFontFamily`, e.g.:
         * 
         * ```javascript
         * this.add.text(0, 0, 'Hello World', { fontFamily: 'Georgia, "Goudy Bookletter 1911", Times, serif' });
         * ```
         * 
         * ```javascript
         * this.add.text(0, 0, 'Hello World', { font: '"Press Start 2P"' });
         * ```
         * 
         * You can only display fonts that are currently loaded and available to the browser: therefore fonts must
         * be pre-loaded. Phaser does not do this for you, so you will require the use of a 3rd party font loader,
         * or have the fonts readily available in the CSS on the page in which your Phaser game resides.
         * 
         * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts
         * across mobile browsers.
         * 
         * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being
         * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the
         * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of
         * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text
         * instead, as it benefits from batching and avoids expensive Canvas API calls.
         */
        class Text extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Crop, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param text The text this Text object will display.
             * @param style The text style configuration object.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, text: string | string[], style: Phaser.Types.GameObjects.Text.TextStyle);

            /**
             * The renderer in use by this Text object.
             */
            renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer;

            /**
             * The canvas element that the text is rendered to.
             */
            canvas: HTMLCanvasElement;

            /**
             * The context of the canvas element that the text is rendered to.
             */
            context: CanvasRenderingContext2D;

            /**
             * The Text Style object.
             * 
             * Manages the style of this Text object.
             */
            style: Phaser.GameObjects.TextStyle;

            /**
             * Whether to automatically round line positions.
             */
            autoRound: boolean;

            /**
             * The Regular Expression that is used to split the text up into lines, in
             * multi-line text. By default this is `/(?:\r\n|\r|\n)/`.
             * You can change this RegExp to be anything else that you may need.
             */
            splitRegExp: object;

            /**
             * Specify a padding value which is added to the line width and height when calculating the Text size.
             * Allows you to add extra spacing if the browser is unable to accurately determine the true font dimensions.
             */
            padding: Phaser.Types.GameObjects.Text.TextPadding;

            /**
             * The width of this Text object.
             */
            width: number;

            /**
             * The height of this Text object.
             */
            height: number;

            /**
             * The line spacing value.
             * This value is added to the font height to calculate the overall line height.
             * Only has an effect if this Text object contains multiple lines of text.
             * 
             * If you update this property directly, instead of using the `setLineSpacing` method, then
             * be sure to call `updateText` after, or you won't see the change reflected in the Text object.
             */
            lineSpacing: number;

            /**
             * Adds / Removes spacing between characters.
             * Can be a negative or positive number.
             * 
             * If you update this property directly, instead of using the `setLetterSpacing` method, then
             * be sure to call `updateText` after, or you won't see the change reflected in the Text object.
             */
            letterSpacing: number;

            /**
             * Initialize right to left text.
             */
            initRTL(): void;

            /**
             * Applies word wrapping to the given text and returns the result. If a custom word wrap
             * callback has been set, it will be invoked. Otherwise, the advanced or basic word wrap
             * algorithm will be used, depending on the style configuration. If no word wrap settings
             * are active, the original text is returned unchanged.
             * @param text The text to perform word wrap detection against.
             * @returns The text after wrapping has been applied.
             */
            runWordWrap(text: string): string;

            /**
             * Advanced wrapping algorithm that will wrap words as the line grows longer than its horizontal
             * bounds. Consecutive spaces will be collapsed and replaced with a single space. Lines will be
             * trimmed of white space before processing. Throws an error if wordWrapWidth is less than a
             * single character.
             * @param text The text to perform word wrap detection against.
             * @param context The Canvas Rendering Context.
             * @param wordWrapWidth The word wrap width.
             * @returns The wrapped text.
             */
            advancedWordWrap(text: string, context: CanvasRenderingContext2D, wordWrapWidth: number): string;

            /**
             * Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal
             * bounds. Spaces are not collapsed and whitespace is not trimmed.
             * @param text The text to perform word wrap detection against.
             * @param context The Canvas Rendering Context.
             * @param wordWrapWidth The word wrap width.
             * @returns The wrapped text.
             */
            basicWordWrap(text: string, context: CanvasRenderingContext2D, wordWrapWidth: number): string;

            /**
             * Runs the given text through this Text objects word wrapping and returns the results as an
             * array, where each element of the array corresponds to a wrapped line of text.
             * @param text The text for which the wrapping will be calculated. If unspecified, the Text objects current text will be used.
             * @returns An array of strings with the pieces of wrapped text.
             */
            getWrappedText(text?: string): string[];

            /**
             * Set the text to display.
             * 
             * An array of strings will be joined with `\n` line breaks.
             * @param value The string, or array of strings, to be set as the content of this Text object.
             * @returns This Text object.
             */
            setText(value: string | string[]): this;

            /**
             * Appends the given text to the content already being displayed by this Text object.
             * 
             * An array of strings will be joined with `\n` line breaks.
             * @param value The string, or array of strings, to be appended to the existing content of this Text object.
             * @param addCR Insert a carriage-return before the string value. Default true.
             * @returns This Text object.
             */
            appendText(value: string | string[], addCR?: boolean): this;

            /**
             * Set the text style.
             * @param style The style settings to set.
             * @returns This Text object.
             */
            setStyle(style: object): this;

            /**
             * Set the font.
             * 
             * If a string is given, the font family is set.
             * 
             * If an object is given, the `fontFamily`, `fontSize` and `fontStyle`
             * properties of that object are set.
             * 
             * **Important:** The font name must be quoted if it contains certain combinations of digits or
             * special characters:
             * 
             * ```javascript
             * Text.setFont('"Press Start 2P"');
             * ```
             * 
             * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all
             * quoted properly, too:
             * 
             * ```javascript
             * Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif');
             * ```
             * @param font The font family or font settings to set.
             * @returns This Text object.
             */
            setFont(font: string): this;

            /**
             * Set the font family.
             * 
             * **Important:** The font name must be quoted if it contains certain combinations of digits or
             * special characters:
             * 
             * ```javascript
             * Text.setFontFamily('"Press Start 2P"');
             * ```
             * 
             * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all
             * quoted properly, too:
             * 
             * ```javascript
             * Text.setFontFamily('Georgia, "Goudy Bookletter 1911", Times, serif');
             * ```
             * @param family The font family.
             * @returns This Text object.
             */
            setFontFamily(family: string): this;

            /**
             * Set the font size. Can be a string with a valid CSS unit, i.e. `16px`, or a number.
             * @param size The font size.
             * @returns This Text object.
             */
            setFontSize(size: string | number): this;

            /**
             * Set the font style.
             * @param style The font style.
             * @returns This Text object.
             */
            setFontStyle(style: string): this;

            /**
             * Set a fixed width and height for the text.
             * 
             * Pass in `0` for either of these parameters to disable fixed width or height respectively.
             * @param width The fixed width to set. `0` disables fixed width.
             * @param height The fixed height to set. `0` disables fixed height.
             * @returns This Text object.
             */
            setFixedSize(width: number, height: number): this;

            /**
             * Set the background color.
             * @param color The background color.
             * @returns This Text object.
             */
            setBackgroundColor(color: string): this;

            /**
             * Set the fill style to be used by the Text object.
             * 
             * This can be any valid CanvasRenderingContext2D fillStyle value, such as
             * a color (in hex, rgb, rgba, hsl or named values), a gradient or a pattern.
             * 
             * See the [MDN fillStyle docs](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle) for more details.
             * @param color The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value.
             * @returns This Text object.
             */
            setFill(color: string | CanvasGradient | CanvasPattern): this;

            /**
             * Set the text fill color.
             * @param color The text fill color.
             * @returns This Text object.
             */
            setColor(color: string | CanvasGradient | CanvasPattern): this;

            /**
             * Set the stroke settings.
             * @param color The stroke color.
             * @param thickness The stroke thickness.
             * @returns This Text object.
             */
            setStroke(color: string | CanvasGradient | CanvasPattern, thickness: number): this;

            /**
             * Set the shadow settings.
             * @param x The horizontal shadow offset. Default 0.
             * @param y The vertical shadow offset. Default 0.
             * @param color The shadow color. Default '#000'.
             * @param blur The shadow blur radius. Default 0.
             * @param shadowStroke Whether to stroke the shadow. Default false.
             * @param shadowFill Whether to fill the shadow. Default true.
             * @returns This Text object.
             */
            setShadow(x?: number, y?: number, color?: string, blur?: number, shadowStroke?: boolean, shadowFill?: boolean): this;

            /**
             * Set the shadow offset.
             * @param x The horizontal shadow offset.
             * @param y The vertical shadow offset.
             * @returns This Text object.
             */
            setShadowOffset(x: number, y: number): this;

            /**
             * Set the shadow color.
             * @param color The shadow color.
             * @returns This Text object.
             */
            setShadowColor(color: string): this;

            /**
             * Set the shadow blur radius.
             * @param blur The shadow blur radius.
             * @returns This Text object.
             */
            setShadowBlur(blur: number): this;

            /**
             * Enable or disable shadow stroke.
             * @param enabled Whether shadow stroke is enabled or not.
             * @returns This Text object.
             */
            setShadowStroke(enabled: boolean): this;

            /**
             * Enable or disable shadow fill.
             * @param enabled Whether shadow fill is enabled or not.
             * @returns This Text object.
             */
            setShadowFill(enabled: boolean): this;

            /**
             * Set the width (in pixels) to use for wrapping lines. Pass in null to remove wrapping by width.
             * @param width The maximum width of a line in pixels. Set to null to remove wrapping.
             * @param useAdvancedWrap Whether or not to use the advanced wrapping
             * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,
             * spaces and whitespace are left as is. Default false.
             * @returns This Text object.
             */
            setWordWrapWidth(width: number | null, useAdvancedWrap?: boolean): this;

            /**
             * Set a custom callback for wrapping lines. Pass in null to remove wrapping by callback.
             * @param callback A custom function that will be responsible for wrapping the
             * text. It will receive two arguments: text (the string to wrap), textObject (this Text
             * instance). It should return the wrapped lines either as an array of lines or as a string with
             * newline characters in place to indicate where breaks should happen.
             * @param scope The scope that will be applied when the callback is invoked. Default null.
             * @returns This Text object.
             */
            setWordWrapCallback(callback: TextStyleWordWrapCallback, scope?: object): this;

            /**
             * Set the alignment of the text in this Text object.
             * 
             * The argument can be one of: `left`, `right`, `center` or `justify`.
             * 
             * Alignment only works if the Text object has more than one line of text.
             * @param align The text alignment for multi-line text. Default 'left'.
             * @returns This Text object.
             */
            setAlign(align?: string): this;

            /**
             * Set the resolution of the Texture used by this Text object.
             * 
             * Setting resolution above 1 is useful only if you're scaling up this Text object (or an ancestor) or zooming a Camera on it.
             * Otherwise, any extra detail in the Texture would just be lost during rendering.
             * 
             * Please use with caution, as the more high-resolution Text you have, the more memory it uses.
             * @param value The resolution for this Text object to use, relative to 1.
             * @returns This Text object.
             */
            setResolution(value: number): this;

            /**
             * Sets the line spacing value.
             * 
             * This value is _added_ to the height of the font when calculating the overall line height.
             * This only has an effect if this Text object consists of multiple lines of text.
             * @param value The amount to add to the font height to achieve the overall line height.
             * @returns This Text object.
             */
            setLineSpacing(value: number): this;

            /**
             * Sets the letter spacing value.
             * 
             * This will add, or remove spacing between each character of this Text Game Object. The value can be
             * either positive or negative. Positive values increase the space between each character, whilst negative
             * values decrease it. Note that some fonts are spaced naturally closer together than others.
             * 
             * Please understand that enabling this feature will cause Phaser to render each character in this Text object
             * one by one, rather than use a draw for the whole string. This makes it extremely expensive when used with
             * either long strings, or lots of strings in total. You will be better off creating bitmap font text if you
             * need to display large quantities of characters with fine control over the letter spacing.
             * @param value The amount to add to the letter width. Set to zero to disable.
             * @returns This Text object.
             */
            setLetterSpacing(value: number): this;

            /**
             * Sets the padding applied around the text content when calculating the canvas size.
             * 
             * The first argument can be either a number or a padding configuration object. When a number
             * is given, it is applied to all four sides unless the other arguments override them. When an
             * object is given, you can specify `left`, `right`, `top`, and `bottom` individually, or use
             * `x` to set both left and right simultaneously, and `y` to set both top and bottom.
             * @param left The left padding value, or a padding config object.
             * @param top The top padding value.
             * @param right The right padding value.
             * @param bottom The bottom padding value.
             * @returns This Text object.
             */
            setPadding(left: number | Phaser.Types.GameObjects.Text.TextPadding, top?: number, right?: number, bottom?: number): this;

            /**
             * Set the maximum number of lines to draw.
             * @param max The maximum number of lines to draw. Default 0.
             * @returns This Text object.
             */
            setMaxLines(max?: number): this;

            /**
             * Render text from right-to-left or left-to-right.
             * @param rtl Set to `true` to render from right-to-left. Default true.
             * @returns This Text object.
             */
            setRTL(rtl?: boolean): this;

            /**
             * Recalculates and re-renders the text content onto the internal canvas. This is called
             * automatically whenever the text string or any style property changes. It handles word
             * wrapping, text sizing, multi-line layout, alignment, shadows, stroke, and letter spacing.
             * If the renderer is WebGL, the updated canvas is re-uploaded to the GPU as a new texture.
             * You should call this manually only if you have updated `lineSpacing` or `letterSpacing`
             * directly without using their corresponding setter methods.undefined
             * @returns This Text object.
             */
            updateText(): this;

            /**
             * Get the current text metrics.undefined
             * @returns The text metrics.
             */
            getTextMetrics(): Phaser.Types.GameObjects.Text.TextMetrics;

            /**
             * The text string being rendered by this Text Game Object.
             */
            text: string;

            /**
             * Build a JSON representation of the Text object.undefined
             * @returns A JSON representation of the Text object.
             */
            toJSON(): Phaser.Types.GameObjects.JSONGameObject;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * A boolean flag indicating if this Game Object is being cropped or not.
             * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
             * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
             */
            isCropped: boolean;

            /**
             * Applies a crop to a texture based Game Object, such as a Sprite or Image.
             * 
             * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
             * 
             * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
             * changes what is shown when rendered.
             * 
             * The crop size as well as coordinates cannot exceed the size of the texture frame.
             * 
             * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
             * 
             * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
             * half of it, you could call `setCrop(0, 0, 400, 600)`.
             * 
             * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
             * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
             * 
             * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
             * 
             * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
             * 
             * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
             * the renderer to skip several internal calculations.
             * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
             * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
             * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
             * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
             * @returns This Game Object instance.
             */
            setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A TextStyle class manages all of the style settings for a Text object.
         * 
         * Text Game Objects create a TextStyle instance automatically, which is
         * accessed via the `Text.style` property. You do not normally need to
         * instantiate one yourself.
         */
        class TextStyle {
            /**
             * 
             * @param text The Text object that this TextStyle is styling.
             * @param style The style settings to set.
             */
            constructor(text: Phaser.GameObjects.Text, style: Phaser.Types.GameObjects.Text.TextStyle);

            /**
             * The Text object that this TextStyle is styling.
             */
            parent: Phaser.GameObjects.Text;

            /**
             * The font family.
             */
            fontFamily: string;

            /**
             * The font size.
             */
            fontSize: string | number;

            /**
             * The font style.
             */
            fontStyle: string;

            /**
             * The background color.
             */
            backgroundColor: string;

            /**
             * The text fill color.
             */
            color: string | CanvasGradient | CanvasPattern;

            /**
             * The text stroke color.
             */
            stroke: string | CanvasGradient | CanvasPattern;

            /**
             * The text stroke thickness.
             */
            strokeThickness: number;

            /**
             * The horizontal shadow offset.
             */
            shadowOffsetX: number;

            /**
             * The vertical shadow offset.
             */
            shadowOffsetY: number;

            /**
             * The shadow color.
             */
            shadowColor: string;

            /**
             * The shadow blur radius.
             */
            shadowBlur: number;

            /**
             * Whether shadow stroke is enabled or not.
             */
            shadowStroke: boolean;

            /**
             * Whether shadow fill is enabled or not.
             */
            shadowFill: boolean;

            /**
             * The text alignment.
             */
            align: string;

            /**
             * The maximum number of lines to draw.
             */
            maxLines: number;

            /**
             * The fixed width of the text.
             * 
             * `0` means no fixed width.
             */
            fixedWidth: number;

            /**
             * The fixed height of the text.
             * 
             * `0` means no fixed height.
             */
            fixedHeight: number;

            /**
             * The resolution the text is rendered to its internal canvas at.
             * The default is 0, which means it will use the resolution set in the Game Config.
             */
            resolution: number;

            /**
             * Whether the text should render right to left.
             */
            rtl: boolean;

            /**
             * The test string to use when measuring the font.
             */
            testString: string;

            /**
             * The amount of horizontal padding added to the width of the text when calculating the font metrics.
             */
            baselineX: number;

            /**
             * The amount of vertical padding added to the height of the text when calculating the font metrics.
             */
            baselineY: number;

            /**
             * The maximum width of a line of text in pixels. Null means no line wrapping. Setting this
             * property directly will not re-run the word wrapping algorithm. To change the width and
             * re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}.
             */
            wordWrapWidth: number | null;

            /**
             * A custom function that will be responsible for wrapping the text. It will receive two
             * arguments: text (the string to wrap), textObject (this Text instance). It should return
             * the wrapped lines either as an array of lines or as a string with newline characters in
             * place to indicate where breaks should happen. Setting this directly will not re-run the
             * word wrapping algorithm. To change the callback and re-wrap, use
             * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}.
             */
            wordWrapCallback: TextStyleWordWrapCallback | null;

            /**
             * The scope that will be applied when the wordWrapCallback is invoked. Setting this directly will not re-run the
             * word wrapping algorithm. To change the callback and re-wrap, use
             * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}.
             */
            wordWrapCallbackScope: object | null;

            /**
             * Whether or not to use the advanced wrapping algorithm. If true, spaces are collapsed and
             * whitespace is trimmed from lines. If false, spaces and whitespace are left as is. Setting
             * this property directly will not re-run the word wrapping algorithm. To change the
             * advanced setting and re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}.
             */
            wordWrapUseAdvanced: boolean;

            /**
             * Set the text style.
             * @param style The style settings to set.
             * @param updateText Whether to update the text immediately. Default true.
             * @param setDefaults Use the default values if not set, or the local values. Default false.
             * @returns The parent Text object.
             */
            setStyle(style: Phaser.Types.GameObjects.Text.TextStyle, updateText?: boolean, setDefaults?: boolean): Phaser.GameObjects.Text;

            /**
             * Synchronize the font settings to the given Canvas Rendering Context.
             * @param canvas The Canvas Element.
             * @param context The Canvas Rendering Context.
             */
            syncFont(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void;

            /**
             * Synchronize the text style settings to the given Canvas Rendering Context.
             * @param canvas The Canvas Element.
             * @param context The Canvas Rendering Context.
             */
            syncStyle(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void;

            /**
             * Synchronize the shadow settings to the given Canvas Rendering Context.
             * @param context The Canvas Rendering Context.
             * @param enabled Whether shadows are enabled or not.
             */
            syncShadow(context: CanvasRenderingContext2D, enabled: boolean): void;

            /**
             * Update the style settings for the parent Text object.
             * @param recalculateMetrics Whether to recalculate font and text metrics.
             * @returns The parent Text object.
             */
            update(recalculateMetrics: boolean): Phaser.GameObjects.Text;

            /**
             * Set the font.
             * 
             * If a string is given, the font family is set.
             * 
             * If an object is given, the `fontFamily`, `fontSize` and `fontStyle`
             * properties of that object are set.
             * @param font The font family or font settings to set.
             * @param updateText Whether to update the text immediately. Default true.
             * @returns The parent Text object.
             */
            setFont(font: string | object, updateText?: boolean): Phaser.GameObjects.Text;

            /**
             * Set the font family. This should be a valid CSS font-family value, such as `'Arial'`, `'verdana'`, or `'Courier'`. Font names with spaces should be wrapped in single quotes, e.g. `'Comic Sans MS'`.
             * @param family The font family.
             * @returns The parent Text object.
             */
            setFontFamily(family: string): Phaser.GameObjects.Text;

            /**
             * Set the font style, such as `'bold'`, `'italic'`, or `'bold italic'`. Use an empty string to clear the style.
             * @param style The font style.
             * @returns The parent Text object.
             */
            setFontStyle(style: string): Phaser.GameObjects.Text;

            /**
             * Set the font size. Can be a string with a valid CSS unit, i.e. `16px`, or a number.
             * @param size The font size.
             * @returns The parent Text object.
             */
            setFontSize(size: number | string): Phaser.GameObjects.Text;

            /**
             * Set the test string to use when measuring the font.
             * @param string The test string to use when measuring the font.
             * @returns The parent Text object.
             */
            setTestString(string: string): Phaser.GameObjects.Text;

            /**
             * Set a fixed width and height for the text.
             * 
             * Pass in `0` for either of these parameters to disable fixed width or height respectively.
             * @param width The fixed width to set.
             * @param height The fixed height to set.
             * @returns The parent Text object.
             */
            setFixedSize(width: number, height: number): Phaser.GameObjects.Text;

            /**
             * Set the background color displayed behind the text. This should be a CSS color string, such as `'#ff0000'` or `'rgba(0,0,0,0.5)'`. Set to `null` to disable.
             * @param color The background color.
             * @returns The parent Text object.
             */
            setBackgroundColor(color: string): Phaser.GameObjects.Text;

            /**
             * Set the text fill color. This can be any valid CSS color string such as a hex value `'#ff0000'`, an rgba string, or a named color. It can also be a CanvasGradient or CanvasPattern for more complex fill styles.
             * @param color The text fill color.
             * @returns The parent Text object.
             */
            setFill(color: string | CanvasGradient | CanvasPattern): Phaser.GameObjects.Text;

            /**
             * Set the text fill color. This can be any valid CSS color string, CanvasGradient, or CanvasPattern.
             * @param color The text fill color.
             * @returns The parent Text object.
             */
            setColor(color: string | CanvasGradient | CanvasPattern): Phaser.GameObjects.Text;

            /**
             * Set the resolution used by the Text object.
             * 
             * It allows for much clearer text on High DPI devices, at the cost of memory because
             * it uses larger internal Canvas textures for the Text.
             * 
             * Please use with caution, as the more high res Text you have, the more memory it uses up.
             * @param value The resolution for this Text object to use.
             * @returns The parent Text object.
             */
            setResolution(value: number): Phaser.GameObjects.Text;

            /**
             * Set the stroke settings.
             * @param color The stroke color.
             * @param thickness The stroke thickness.
             * @returns The parent Text object.
             */
            setStroke(color: string | CanvasGradient | CanvasPattern, thickness: number): Phaser.GameObjects.Text;

            /**
             * Set the shadow settings.
             * 
             * Calling this method always re-renders the parent Text object,
             * so only call it when you actually change the shadow settings.
             * @param x The horizontal shadow offset. Default 0.
             * @param y The vertical shadow offset. Default 0.
             * @param color The shadow color. Default '#000'.
             * @param blur The shadow blur radius. Default 0.
             * @param shadowStroke Whether to stroke the shadow. Default false.
             * @param shadowFill Whether to fill the shadow. Default true.
             * @returns The parent Text object.
             */
            setShadow(x?: number, y?: number, color?: string, blur?: number, shadowStroke?: boolean, shadowFill?: boolean): Phaser.GameObjects.Text;

            /**
             * Set the shadow offset.
             * @param x The horizontal shadow offset. Default 0.
             * @param y The vertical shadow offset. Default 0.
             * @returns The parent Text object.
             */
            setShadowOffset(x?: number, y?: number): Phaser.GameObjects.Text;

            /**
             * Set the shadow color.
             * @param color The shadow color. Default '#000'.
             * @returns The parent Text object.
             */
            setShadowColor(color?: string): Phaser.GameObjects.Text;

            /**
             * Set the shadow blur radius.
             * @param blur The shadow blur radius. Default 0.
             * @returns The parent Text object.
             */
            setShadowBlur(blur?: number): Phaser.GameObjects.Text;

            /**
             * Enable or disable shadow stroke.
             * @param enabled Whether shadow stroke is enabled or not.
             * @returns The parent Text object.
             */
            setShadowStroke(enabled: boolean): Phaser.GameObjects.Text;

            /**
             * Enable or disable shadow fill.
             * @param enabled Whether shadow fill is enabled or not.
             * @returns The parent Text object.
             */
            setShadowFill(enabled: boolean): Phaser.GameObjects.Text;

            /**
             * Set the width (in pixels) to use for wrapping lines.
             * 
             * Pass in null to remove wrapping by width.
             * @param width The maximum width of a line in pixels. Set to null to remove wrapping.
             * @param useAdvancedWrap Whether or not to use the advanced wrapping
             * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,
             * spaces and whitespace are left as is. Default false.
             * @returns The parent Text object.
             */
            setWordWrapWidth(width: number | null, useAdvancedWrap?: boolean): Phaser.GameObjects.Text;

            /**
             * Set a custom callback for wrapping lines.
             * 
             * Pass in null to remove wrapping by callback.
             * @param callback A custom function that will be responsible for wrapping the
             * text. It will receive two arguments: text (the string to wrap), textObject (this Text
             * instance). It should return the wrapped lines either as an array of lines or as a string with
             * newline characters in place to indicate where breaks should happen.
             * @param scope The scope that will be applied when the callback is invoked. Default null.
             * @returns The parent Text object.
             */
            setWordWrapCallback(callback: TextStyleWordWrapCallback, scope?: object): Phaser.GameObjects.Text;

            /**
             * Set the alignment of the text in this Text object.
             * 
             * The argument can be one of: `left`, `right`, `center` or `justify`.
             * 
             * Alignment only works if the Text object has more than one line of text.
             * @param align The text alignment for multi-line text. Default 'left'.
             * @returns The parent Text object.
             */
            setAlign(align?: string): Phaser.GameObjects.Text;

            /**
             * Set the maximum number of lines to draw.
             * @param max The maximum number of lines to draw. Default 0.
             * @returns The parent Text object.
             */
            setMaxLines(max?: number): Phaser.GameObjects.Text;

            /**
             * Get the current text metrics.undefined
             * @returns The text metrics.
             */
            getTextMetrics(): Phaser.Types.GameObjects.Text.TextMetrics;

            /**
             * Build a JSON representation of this Text Style.undefined
             * @returns A JSON representation of this Text Style.
             */
            toJSON(): object;

            /**
             * Destroy this Text Style.
             */
            destroy(): void;

        }

        /**
         * A TileSprite is a Sprite that has a repeating texture.
         * 
         * The texture can be scrolled and scaled independently of the TileSprite itself. Textures will automatically wrap and
         * are designed so that you can create game backdrops using seamless textures as a source.
         * 
         * You shouldn't ever create a TileSprite any larger than your actual canvas size. If you want to create a large repeating background
         * that scrolls across the whole map of your game, then you create a TileSprite that fits the canvas size and then use the `tilePosition`
         * property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will
         * consume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to
         * adjust the scale of the texture - don't resize the sprite itself or make it larger than it needs.
         * 
         * Prior to Phaser 4, TileSprite did not support rotation.
         * In WebGL, it required the texture to be a power of two in size,
         * and did not support compressed textures or DynamicTextures.
         * It could introduce aliasing artifacts for textures that were not
         * a power of two in size.
         * These restrictions have been lifted in v4.
         */
        class TileSprite extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param width The width of the Game Object. If zero it will use the size of the texture frame.
             * @param height The height of the Game Object. If zero it will use the size of the texture frame.
             * @param textureKey The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. Cannot be a DynamicTexture.
             * @param frameKey An optional frame from the Texture this Game Object is rendering with.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, width: number, height: number, textureKey: string, frameKey?: string | number);

            /**
             * Whether the Tile Sprite has changed in some way, requiring a re-render of its tile texture.
             * 
             * Such changes include the texture frame and scroll position of the Tile Sprite.
             * 
             * This is irrelevant in WebGL mode.
             */
            dirty: boolean;

            /**
             * The renderer in use by this Tile Sprite.
             */
            renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer;

            /**
             * The Canvas element that the TileSprite renders its fill pattern in to.
             * Only used in Canvas mode.
             */
            canvas: HTMLCanvasElement | null;

            /**
             * The Context of the Canvas element that the TileSprite renders its fill pattern in to.
             * Only used in Canvas mode.
             */
            context: CanvasRenderingContext2D | null;

            /**
             * The Canvas that the TileSprite's texture is rendered to.
             * This is used to create a WebGL texture from.
             */
            fillCanvas: HTMLCanvasElement;

            /**
             * The Canvas Context used to render the TileSprite's texture.
             */
            fillContext: CanvasRenderingContext2D;

            /**
             * The texture that the Tile Sprite is rendered to, which is then rendered to a Scene.
             * In WebGL this is a WebGLTextureWrapper. In Canvas it's a Canvas Fill Pattern.
             */
            fillPattern: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | CanvasPattern | null;

            /**
             * The Animation State component of this TileSprite.
             * 
             * This component provides features to apply animations to this TileSprite.
             * It is responsible for playing, loading, queuing animations for later playback,
             * mixing between animations and setting the current animation frame to this TileSprite.
             */
            anims: Phaser.Animations.AnimationState;

            /**
             * Adds this TileSprite to the Scene's update list, so that its `preUpdate` method
             * is called each game step to advance its animations. Called automatically when
             * this Game Object is added to a Scene.
             */
            addedToScene(): void;

            /**
             * Removes this TileSprite from the Scene's update list, stopping its `preUpdate`
             * method from being called. Called automatically when this Game Object is removed
             * from a Scene.
             */
            removedFromScene(): void;

            /**
             * Update this TileSprite's animations.
             * @param time The current timestamp.
             * @param delta The delta time, in ms, elapsed since the last frame.
             */
            protected preUpdate(time: number, delta: number): void;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * The Frame has to belong to the current Texture being used.
             * 
             * It can be either a string or an index.
             * @param frame The name or index of the frame within the Texture.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number): this;

            /**
             * No-op method for compatibility with Animation.undefined
             * @returns This Tile Sprite instance.
             */
            setSizeToFrame(): this;

            /**
             * Sets the horizontal and vertical scroll position of the tiling texture, updating
             * {@link Phaser.GameObjects.TileSprite#tilePositionX} and {@link Phaser.GameObjects.TileSprite#tilePositionY}.
             * Either value may be omitted to leave it unchanged.
             * @param x The x position of this sprite's tiling texture.
             * @param y The y position of this sprite's tiling texture.
             * @returns This Tile Sprite instance.
             */
            setTilePosition(x?: number, y?: number): this;

            /**
             * Sets the rotation of the tiling texture, in radians, updating
             * {@link Phaser.GameObjects.TileSprite#tileRotation}.
             * The texture rotates around its own origin, independently of the TileSprite's world rotation.
             * @param radians The rotation of the tiling texture, in radians. Default 0.
             */
            setTileRotation(radians?: number): void;

            /**
             * Sets the horizontal and vertical scale of the tiling texture, updating
             * {@link Phaser.GameObjects.TileSprite#tileScaleX} and {@link Phaser.GameObjects.TileSprite#tileScaleY}.
             * The scale is independent of the TileSprite's own scale. If only `x` is provided,
             * both axes are set to the same value.
             * @param x The horizontal scale of the tiling texture. If not given it will use the current `tileScaleX` value.
             * @param y The vertical scale of the tiling texture. If not given it will use the `x` value. Default x.
             * @returns This Tile Sprite instance.
             */
            setTileScale(x?: number, y?: number): this;

            /**
             * Sets the size of this TileSprite's output region.
             * 
             * This does not change the scale.
             * 
             * If you have enabled this Game Object for input, changing the size will also change the
             * size of the hit area, unless you have defined a custom hit area.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Internal destroy handler, called as part of the destroy process.
             */
            protected preDestroy(): void;

            /**
             * The horizontal scroll position of the Tile Sprite.
             */
            tilePositionX: number;

            /**
             * The vertical scroll position of the Tile Sprite.
             */
            tilePositionY: number;

            /**
             * The rotation of the Tile Sprite texture, in radians.
             */
            tileRotation: number;

            /**
             * The horizontal scale of the Tile Sprite texture.
             */
            tileScaleX: number;

            /**
             * The vertical scale of the Tile Sprite texture.
             */
            tileScaleY: number;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * 
             * Calling this method will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.
             * @param frame The name or index of the frame within the Texture.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call change the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setTexture(key: string | Phaser.Textures.Texture, frame?: string | number, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Video Game Object.
         * 
         * This Game Object is capable of handling playback of a video file, video stream or media stream.
         * 
         * You can optionally 'preload' the video into the Phaser Video Cache:
         * 
         * ```javascript
         * preload () {
         *   this.load.video('ripley', 'assets/aliens.mp4');
         * }
         * 
         * create () {
         *   this.add.video(400, 300, 'ripley');
         * }
         * ```
         * 
         * You don't have to 'preload' the video. You can also play it directly from a URL:
         * 
         * ```javascript
         * create () {
         *   this.add.video(400, 300).loadURL('assets/aliens.mp4');
         * }
         * ```
         * 
         * To all intents and purposes, a video is a standard Game Object, just like a Sprite. And as such, you can do
         * all the usual things to it, such as scaling, rotating, cropping, tinting, making interactive, giving a
         * physics body, etc.
         * 
         * Transparent videos are also possible via the WebM file format. Providing the video file has was encoded with
         * an alpha channel, and providing the browser supports WebM playback (not all of them do), then it will render
         * in-game with full transparency.
         * 
         * Transparent videos are supported by the HEVC (H.265) codec,
         * but only on some devices and browsers, and sometimes the alpha channel is ignored,
         * which can be a problem if you're aiming for a consistent experience.
         * We advise against relying on HEVC.
         * 
         * Playback is handled entirely via the Request Video Frame API, which is supported by most modern browsers.
         * A polyfill is provided for older browsers.
         * 
         * ### Autoplaying Videos
         * 
         * Videos can only autoplay if the browser has been unlocked with an interaction, or satisfies the MEI settings.
         * The policies that control autoplaying are vast and vary between browser. You can, and should, read more about
         * it here: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide
         * 
         * If your video doesn't contain any audio, then set the `noAudio` parameter to `true` when the video is _loaded_,
         * and it will often allow the video to play immediately:
         * 
         * ```javascript
         * preload () {
         *   this.load.video('pixar', 'nemo.mp4', true);
         * }
         * ```
         * 
         * The 3rd parameter in the load call tells Phaser that the video doesn't contain any audio tracks. Video without
         * audio can autoplay without requiring a user interaction. Video with audio cannot do this unless it satisfies
         * the browsers MEI settings. See the MDN Autoplay Guide for further details.
         * 
         * Or:
         * 
         * ```javascript
         * create () {
         *   this.add.video(400, 300).loadURL('assets/aliens.mp4', true);
         * }
         * ```
         * 
         * You can set the `noAudio` parameter to `true` even if the video does contain audio. It will still allow the video
         * to play immediately, but the audio will not start.
         * 
         * More details about video playback and the supported media formats can be found on MDN:
         * 
         * https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement
         * https://developer.mozilla.org/en-US/docs/Web/Media/Formats
         */
        class Video extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.TextureCrop, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param key Optional key of the Video this Game Object will play, as stored in the Video Cache.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, key?: string);

            /**
             * A reference to the HTML Video Element this Video Game Object is playing.
             * 
             * Will be `undefined` until a video is loaded for playback.
             */
            video: HTMLVideoElement | null;

            /**
             * The Phaser Texture this Game Object is using to render the video to.
             * 
             * Will be `undefined` until a video is loaded for playback.
             */
            videoTexture: Phaser.Textures.Texture | null;

            /**
             * A reference to the TextureSource backing the `videoTexture` Texture object.
             * 
             * Will be `undefined` until a video is loaded for playback.
             */
            videoTextureSource: Phaser.Textures.TextureSource | null;

            /**
             * A Phaser `CanvasTexture` instance that holds the most recent snapshot taken from the video.
             * 
             * This will only be set if the `snapshot` or `snapshotArea` methods have been called.
             * 
             * Until those methods are called, this property will be `undefined`.
             */
            snapshotTexture: Phaser.Textures.CanvasTexture | null;

            /**
             * If you have saved this video to a texture via the `saveTexture` method, this controls if the video
             * is rendered with `flipY` in WebGL or not.
             * If you find your video is appearing upside down within a shader or
             * custom renderer, flip this property.
             */
            glFlipY: boolean;

            /**
             * An internal flag holding the current state of the video lock, should document interaction be required
             * before playback can begin.
             */
            readonly touchLocked: boolean;

            /**
             * Should the video auto play when document interaction is required and happens?
             */
            playWhenUnlocked: boolean;

            /**
             * Has the video created its texture and populated it with the first frame of video?
             */
            frameReady: boolean;

            /**
             * This read-only property returns `true` if the video is currently stalled, i.e. it has stopped
             * playing due to a lack of data, or too much data, but hasn't yet reached the end of the video.
             * 
             * This is set if the Video DOM element emits any of the following events:
             * 
             * `stalled`
             * `suspend`
             * `waiting`
             * 
             * And is cleared if the Video DOM element emits the `playing` event, or handles
             * a requestVideoFrame call.
             * 
             * Listen for the Phaser Event `VIDEO_STALLED` to be notified and inspect the event
             * to see which DOM event caused it.
             * 
             * Note that being stalled isn't always a negative thing. A video can be stalled if it
             * has downloaded enough data in to its buffer to not need to download any more until
             * the current batch of frames have rendered.
             */
            readonly isStalled: boolean;

            /**
             * Records the number of times the video has failed to play,
             * typically because the user hasn't interacted with the page yet.
             */
            failedPlayAttempts: number;

            /**
             * If the browser supports the Request Video Frame API then this
             * property will hold the metadata that is returned from
             * the callback each time it is invoked.
             * 
             * See https://wicg.github.io/video-rvfc/#video-frame-metadata-callback
             * for a complete list of all properties that will be in this object.
             * Likely of most interest is the `mediaTime` property:
             * 
             * The media presentation timestamp (PTS) in seconds of the frame presented
             * (e.g. its timestamp on the video.currentTime timeline). MAY have a zero
             * value for live-streams or WebRTC applications.
             * 
             * If the browser doesn't support the API then this property will be undefined.
             */
            metadata: VideoFrameCallbackMetadata;

            /**
             * The current retry elapsed time.
             */
            retry: number;

            /**
             * If a video fails to play due to a lack of user interaction, this is the
             * amount of time, in ms, that the video will wait before trying again to
             * play. The default is 500ms.
             */
            retryInterval: number;

            /**
             * An object containing in and out markers for sequence playback.
             */
            markers: any;

            /**
             * The key of the current video as stored in the Video cache.
             * 
             * If the video did not come from the cache this will be an empty string.
             */
            readonly cacheKey: string;

            /**
             * Is the video currently seeking?
             * 
             * This is set to `true` when the `seeking` event is fired,
             * and set to `false` when the `seeked` event is fired.
             */
            readonly isSeeking: boolean;

            /**
             * Adds this Video to the Scene's update list, ensuring it receives
             * `preUpdate` calls each game step. This is called automatically by
             * the Scene when this Game Object is added to it.
             */
            addedToScene(): void;

            /**
             * Removes this Video from the Scene's update list, stopping it from
             * receiving `preUpdate` calls. This is called automatically by the
             * Scene when this Game Object is removed from it.
             */
            removedFromScene(): void;

            /**
             * Loads a Video from the Video Cache, ready for playback with the `Video.play` method.
             * 
             * If a video is already playing, this method allows you to change the source of the current video element.
             * It works by first stopping the current video and then starts playback of the new source through the existing video element.
             * 
             * The reason you may wish to do this is because videos that require interaction to unlock, remain in an unlocked
             * state, even if you change the source of the video. By changing the source to a new video you avoid having to
             * go through the unlock process again.
             * @param key The key of the Video this Game Object will play, as stored in the Video Cache.
             * @returns This Video Game Object for method chaining.
             */
            load(key: string): this;

            /**
             * This method allows you to change the source of the current video element. It works by first stopping the
             * current video, if playing. Then deleting the video texture, if one has been created. Finally, it makes a
             * new video texture and starts playback of the new source through the existing video element.
             * 
             * The reason you may wish to do this is because videos that require interaction to unlock, remain in an unlocked
             * state, even if you change the source of the video. By changing the source to a new video you avoid having to
             * go through the unlock process again.
             * @param key The key of the Video this Game Object will swap to playing, as stored in the Video Cache.
             * @param autoplay Should the video start playing immediately, once the swap is complete? Default true.
             * @param loop Should the video loop automatically when it reaches the end? Please note that not all browsers support _seamless_ video looping for all encoding formats. Default false.
             * @param markerIn Optional in marker time, in seconds, for playback of a sequence of the video.
             * @param markerOut Optional out marker time, in seconds, for playback of a sequence of the video.
             * @returns This Video Game Object for method chaining.
             */
            changeSource(key: string, autoplay?: boolean, loop?: boolean, markerIn?: number, markerOut?: number): this;

            /**
             * Returns the key of the currently played video, as stored in the Video Cache.
             * 
             * If the video did not come from the cache this will return an empty string.undefined
             * @returns The key of the video being played from the Video Cache, if any.
             */
            getVideoKey(): string;

            /**
             * Loads a Video from the given URL, ready for playback with the `Video.play` method.
             * 
             * If a video is already playing, this method allows you to change the source of the current video element.
             * It works by first stopping the current video and then starts playback of the new source through the existing video element.
             * 
             * The reason you may wish to do this is because videos that require interaction to unlock, remain in an unlocked
             * state, even if you change the source of the video. By changing the source to a new video you avoid having to
             * go through the unlock process again.
             * @param urls The absolute or relative URL to load the video files from.
             * @param noAudio Does the video have an audio track? If not you can enable auto-playing on it. Default false.
             * @param crossOrigin The value to use for the `crossOrigin` property in the video load request.  Either undefined, `anonymous` or `use-credentials`. If no value is given, `crossorigin` will not be set in the request.
             * @returns This Video Game Object for method chaining.
             */
            loadURL(urls?: string | string[] | Phaser.Types.Loader.FileTypes.VideoFileURLConfig | Phaser.Types.Loader.FileTypes.VideoFileURLConfig[], noAudio?: boolean, crossOrigin?: string): this;

            /**
             * Loads a Video from the given MediaStream object, ready for playback with the `Video.play` method.
             * @param stream The MediaStream object.
             * @param noAudio Does the video have an audio track? If not you can enable auto-playing on it. Default false.
             * @param crossOrigin The value to use for the `crossOrigin` property in the video load request.  Either undefined, `anonymous` or `use-credentials`. If no value is given, `crossorigin` will not be set in the request.
             * @returns This Video Game Object for method chaining.
             */
            loadMediaStream(stream: MediaStream, noAudio?: boolean, crossOrigin?: string): this;

            /**
             * Internal method that loads a Video from the given URL, ready for playback with the
             * `Video.play` method.
             * 
             * Normally you don't call this method directly, but instead use the `Video.loadURL` method,
             * or the `Video.load` method if you have preloaded the video.
             * 
             * Calling this method will skip checking if the browser supports the given format in
             * the URL, where-as the other two methods enforce these checks.
             * @param url The absolute or relative URL to load the video file from. Set to `null` if passing in a MediaStream object.
             * @param noAudio Does the video have an audio track? If not you can enable auto-playing on it.
             * @param crossOrigin The value to use for the `crossOrigin` property in the video load request.  Either undefined, `anonymous` or `use-credentials`. If no value is given, `crossorigin` will not be set in the request.
             * @param stream A MediaStream object if this is playing a stream instead of a file.
             * @returns This Video Game Object for method chaining.
             */
            loadHandler(url?: string, noAudio?: boolean, crossOrigin?: string, stream?: string): this;

            /**
             * This method handles the Request Video Frame callback.
             * 
             * It is called by the browser when a new video frame is ready to be displayed.
             * 
             * It's also responsible for the creation of the video texture, if it doesn't
             * already exist. If it does, it updates the texture as required.
             * 
             * For more details about the Request Video Frame callback, see:
             * https://web.dev/requestvideoframecallback-rvfc
             * @param now The current time in milliseconds.
             * @param metadata Useful metadata about the video frame that was most recently presented for composition. See https://wicg.github.io/video-rvfc/#video-frame-metadata-callback
             */
            requestVideoFrame(now: DOMHighResTimeStamp, metadata: VideoFrameCallbackMetadata): void;

            /**
             * Starts this video playing.
             * 
             * If the video is already playing, or has been queued to play with `changeSource` then this method just returns.
             * 
             * Videos can only autoplay if the browser has been unlocked. This happens if you have interacted with the browser, i.e.
             * by clicking on it or pressing a key, or due to server settings. The policies that control autoplaying are vast and
             * vary between browser. You can read more here: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide
             * 
             * If your video doesn't contain any audio, then set the `noAudio` parameter to `true` when the video is loaded,
             * and it will often allow the video to play immediately:
             * 
             * ```javascript
             * preload () {
             *   this.load.video('pixar', 'nemo.mp4', true);
             * }
             * ```
             * 
             * The 3rd parameter in the load call tells Phaser that the video doesn't contain any audio tracks. Video without
             * audio can autoplay without requiring a user interaction. Video with audio cannot do this unless it satisfies
             * the browsers MEI settings. See the MDN Autoplay Guide for details.
             * 
             * If you need audio in your videos, then you'll have to consider the fact that the video cannot start playing until the
             * user has interacted with the browser, into your game flow.
             * @param loop Should the video loop automatically when it reaches the end? Please note that not all browsers support _seamless_ video looping for all encoding formats. Default false.
             * @param markerIn Optional in marker time, in seconds, for playback of a sequence of the video.
             * @param markerOut Optional out marker time, in seconds, for playback of a sequence of the video.
             * @returns This Video Game Object for method chaining.
             */
            play(loop?: boolean, markerIn?: number, markerOut?: number): this;

            /**
             * Attempts to get the first frame of the video by running the `requestVideoFrame` callback once,
             * then stopping. This is useful if you need to grab the first frame of the video to display behind
             * a 'play' button, without actually calling the 'play' method.
             * 
             * If the video is already playing, or has been queued to play with `changeSource` then this method just returns.undefined
             * @returns This Video Game Object for method chaining.
             */
            getFirstFrame(): this;

            /**
             * Adds the loading specific event handlers to the video element.
             */
            addLoadEventHandlers(): void;

            /**
             * Removes the loading specific event handlers from the video element.
             */
            removeLoadEventHandlers(): void;

            /**
             * Adds the playback specific event handlers to the video element.
             */
            addEventHandlers(): void;

            /**
             * Removes the playback specific event handlers from the video element.
             */
            removeEventHandlers(): void;

            /**
             * Creates the video.play promise and adds the success and error handlers to it.
             * 
             * Not all browsers support the video.play promise, so this method will fall back to
             * the old-school way of handling the video.play call.
             * 
             * See https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play#browser_compatibility for details.
             * @param catchError Should the error be caught and the video marked as failed to play? Default true.
             */
            createPlayPromise(catchError?: boolean): void;

            /**
             * Adds a sequence marker to this video.
             * 
             * Markers allow you to split a video up into sequences, delineated by a start and end time, given in seconds.
             * 
             * You can then play back specific markers via the `playMarker` method.
             * 
             * Note that marker timing is _not_ frame-perfect. You should construct your videos in such a way that you allow for
             * plenty of extra padding before and after each sequence to allow for discrepancies in browser seek and currentTime accuracy.
             * 
             * See https://github.com/w3c/media-and-entertainment/issues/4 for more details about this issue.
             * @param key A unique name to give this marker.
             * @param markerIn The time, in seconds, representing the start of this marker.
             * @param markerOut The time, in seconds, representing the end of this marker.
             * @returns This Video Game Object for method chaining.
             */
            addMarker(key: string, markerIn: number, markerOut: number): this;

            /**
             * Plays a pre-defined sequence in this video.
             * 
             * Markers allow you to split a video up into sequences, delineated by a start and end time, given in seconds and
             * specified via the `addMarker` method.
             * 
             * Note that marker timing is _not_ frame-perfect. You should construct your videos in such a way that you allow for
             * plenty of extra padding before and after each sequence to allow for discrepancies in browser seek and currentTime accuracy.
             * 
             * See https://github.com/w3c/media-and-entertainment/issues/4 for more details about this issue.
             * @param key The name of the marker sequence to play.
             * @param loop Should the video loop automatically when it reaches the end? Please note that not all browsers support _seamless_ video looping for all encoding formats. Default false.
             * @returns This Video Game Object for method chaining.
             */
            playMarker(key: string, loop?: boolean): this;

            /**
             * Removes a previously set marker from this video.
             * 
             * If the marker is currently playing it will _not_ stop playback.
             * @param key The name of the marker to remove.
             * @returns This Video Game Object for method chaining.
             */
            removeMarker(key: string): this;

            /**
             * Takes a snapshot of the current frame of the video and renders it to a CanvasTexture object,
             * which is then returned. You can optionally resize the grab by passing a width and height.
             * 
             * This method returns a reference to the `Video.snapshotTexture` object. Calling this method
             * multiple times will overwrite the previous snapshot with the most recent one.
             * @param width The width of the resulting CanvasTexture.
             * @param height The height of the resulting CanvasTexture.
             * @returns The CanvasTexture the snapshot was drawn to.
             */
            snapshot(width?: number, height?: number): Phaser.Textures.CanvasTexture;

            /**
             * Takes a snapshot of the specified area of the current frame of the video and renders it to a CanvasTexture object,
             * which is then returned. You can optionally resize the grab by passing a different `destWidth` and `destHeight`.
             * 
             * This method returns a reference to the `Video.snapshotTexture` object. Calling this method
             * multiple times will overwrite the previous snapshot with the most recent one.
             * @param x The horizontal location of the top-left of the area to grab from. Default 0.
             * @param y The vertical location of the top-left of the area to grab from. Default 0.
             * @param srcWidth The width of area to grab from the video. If not given it will grab the full video dimensions.
             * @param srcHeight The height of area to grab from the video. If not given it will grab the full video dimensions.
             * @param destWidth The destination width of the grab, allowing you to resize it.
             * @param destHeight The destination height of the grab, allowing you to resize it.
             * @returns The CanvasTexture the snapshot was drawn to.
             */
            snapshotArea(x?: number, y?: number, srcWidth?: number, srcHeight?: number, destWidth?: number, destHeight?: number): Phaser.Textures.CanvasTexture;

            /**
             * Stores a copy of this Videos `snapshotTexture` in the Texture Manager using the given key.
             * 
             * This texture is created when the `snapshot` or `snapshotArea` methods are called.
             * 
             * After doing this, any texture based Game Object, such as a Sprite, can use the contents of the
             * snapshot by using the texture key:
             * 
             * ```javascript
             * var vid = this.add.video(0, 0, 'intro');
             * 
             * vid.snapshot();
             * 
             * vid.saveSnapshotTexture('doodle');
             * 
             * this.add.image(400, 300, 'doodle');
             * ```
             * 
             * Updating the contents of the `snapshotTexture`, for example by calling `snapshot` again,
             * will automatically update _any_ Game Object that is using it as a texture.
             * Calling `saveSnapshotTexture` again will not save another copy of the same texture,
             * it will just rename the existing one.
             * 
             * By default it will create a single base texture. You can add frames to the texture
             * by using the `Texture.add` method. After doing this, you can then allow Game Objects
             * to use a specific frame.
             * @param key The unique key to store the texture as within the global Texture Manager.
             * @returns The Texture that was saved.
             */
            saveSnapshotTexture(key: string): Phaser.Textures.CanvasTexture;

            /**
             * This internal method is called automatically if the playback Promise resolves successfully.
             */
            playSuccess(): void;

            /**
             * This internal method is called automatically if the playback Promise fails to resolve.
             * @param error The Promise DOM Exception error.
             */
            playError(error: DOMException): void;

            /**
             * Called when the video emits a `playing` event.
             * 
             * This is the legacy handler for browsers that don't support Promise based playback.
             */
            legacyPlayHandler(): void;

            /**
             * Called when the video emits a `playing` event.
             */
            playingHandler(): void;

            /**
             * This internal method is called automatically if the video fails to load.
             * @param event The error Event.
             */
            loadErrorHandler(event: Event): void;

            /**
             * This internal method is called automatically when the video metadata is available.
             * @param event The loadedmetadata Event.
             */
            metadataHandler(event: Event): void;

            /**
             * Sets the size of this Game Object to be that of the given Frame.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param frame The frame to base the size of this Game Object on.
             * @returns This Game Object instance.
             */
            setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

            /**
             * This internal method is called automatically if the video stalls, for whatever reason.
             * @param event The stall Event.
             */
            stalledHandler(event: Event): void;

            /**
             * Called when the video completes playback, i.e. reaches an `ended` state.
             * 
             * This will never happen if the video is coming from a live stream, where the duration is `Infinity`.
             */
            completeHandler(): void;

            /**
             * Seeks to a given point in the video. The value is given as a float between 0 and 1,
             * where 0 represents the start of the video and 1 represents the end.
             * 
             * Seeking only works if the video has a duration, so will not work for live streams.
             * 
             * When seeking begins, this video will emit a `seeking` event. When the video completes
             * seeking (i.e. reaches its designated timestamp) it will emit a `seeked` event.
             * 
             * If you wish to seek based on time instead, use the `Video.setCurrentTime` method.
             * 
             * Unfortunately, the DOM video element does not guarantee frame-accurate seeking.
             * This has been an ongoing subject of discussion: https://github.com/w3c/media-and-entertainment/issues/4
             * @param value The point in the video to seek to. A value between 0 and 1.
             * @returns This Video Game Object for method chaining.
             */
            seekTo(value: number): this;

            /**
             * A double-precision floating-point value indicating the current playback time in seconds.
             * 
             * If the media has not started to play and has not been seeked, this value is the media's initial playback time.
             * 
             * For a more accurate value, use the `Video.metadata.mediaTime` property instead.undefined
             * @returns A double-precision floating-point value indicating the current playback time in seconds.
             */
            getCurrentTime(): number;

            /**
             * Seeks to a given playback time in the video. The value is given in _seconds_ or as a string.
             * 
             * Seeking only works if the video has a duration, so will not work for live streams.
             * 
             * When seeking begins, this video will emit a `seeking` event. When the video completes
             * seeking (i.e. reaches its designated timestamp) it will emit a `seeked` event.
             * 
             * You can provide a string prefixed with either a `+` or a `-`, such as `+2.5` or `-2.5`.
             * In this case it will seek to +/- the value given, relative to the _current time_.
             * 
             * If you wish to seek based on a duration percentage instead, use the `Video.seekTo` method.
             * @param value The playback time to seek to in seconds. Can be expressed as a string, such as `+2` to seek 2 seconds ahead from the current time.
             * @returns This Video Game Object for method chaining.
             */
            setCurrentTime(value: string | number): this;

            /**
             * Returns the current progress of the video as a float.
             * 
             * Progress is defined as a value between 0 (the start) and 1 (the end).
             * 
             * Progress can only be returned if the video has a duration. Some videos,
             * such as those coming from a live stream, do not have a duration. In this
             * case the method will return -1.undefined
             * @returns The current progress of playback. If the video has no duration, will always return -1.
             */
            getProgress(): number;

            /**
             * A double-precision floating-point value which indicates the duration (total length) of the media in seconds,
             * on the media's timeline. If no media is present on the element, or the media is not valid, the returned value is NaN.
             * 
             * If the media has no known end (such as for live streams of unknown duration, web radio, media incoming from WebRTC,
             * and so forth), this value is +Infinity.
             * 
             * If no video has been loaded, this method will return 0.undefined
             * @returns A double-precision floating-point value indicating the duration of the media in seconds.
             */
            getDuration(): number;

            /**
             * Sets the muted state of the currently playing video, if one is loaded.
             * @param value The mute value. `true` if the video should be muted, otherwise `false`. Default true.
             * @returns This Video Game Object for method chaining.
             */
            setMute(value?: boolean): this;

            /**
             * Returns a boolean indicating if this Video is currently muted.undefined
             * @returns A boolean indicating if this Video is currently muted, or not.
             */
            isMuted(): boolean;

            /**
             * Sets the paused state of the currently loaded video.
             * 
             * If the video is playing, calling this method with `true` will pause playback.
             * If the video is paused, calling this method with `false` will resume playback.
             * 
             * If no video is loaded, this method does nothing.
             * 
             * If the video has not yet been played, `Video.play` will be called with no parameters.
             * 
             * If the video has ended, this method will do nothing.
             * @param value The paused value. `true` if the video should be paused, `false` to resume it. Default true.
             * @returns This Video Game Object for method chaining.
             */
            setPaused(value?: boolean): this;

            /**
             * Pauses the current Video, if one is playing.
             * 
             * If no video is loaded, this method does nothing.
             * 
             * Call `Video.resume` to resume playback.undefined
             * @returns This Video Game Object for method chaining.
             */
            pause(): this;

            /**
             * Resumes the current Video, if one was previously playing and has been paused.
             * 
             * If no video is loaded, this method does nothing.
             * 
             * Call `Video.pause` to pause playback.undefined
             * @returns This Video Game Object for method chaining.
             */
            resume(): this;

            /**
             * Returns a double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).undefined
             * @returns A double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).
             */
            getVolume(): number;

            /**
             * Sets the volume of the currently playing video.
             * 
             * The value given is a double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).
             * @param value A double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest). Default 1.
             * @returns This Video Game Object for method chaining.
             */
            setVolume(value?: number): this;

            /**
             * Returns a double that indicates the rate at which the media is being played back.undefined
             * @returns A double that indicates the rate at which the media is being played back.
             */
            getPlaybackRate(): number;

            /**
             * Sets the playback rate of the current video.
             * 
             * The value given is a double that indicates the rate at which the media is being played back.
             * @param rate A double that indicates the rate at which the media is being played back.
             * @returns This Video Game Object for method chaining.
             */
            setPlaybackRate(rate?: number): this;

            /**
             * Returns a boolean which indicates whether the media element should start over when it reaches the end.undefined
             * @returns A boolean which indicates whether the media element will start over when it reaches the end.
             */
            getLoop(): boolean;

            /**
             * Sets the loop state of the current video.
             * 
             * The value given is a boolean which indicates whether the media element will start over when it reaches the end.
             * 
             * Not all videos can loop, for example live streams.
             * 
             * Please note that not all browsers support _seamless_ video looping for all encoding formats.
             * @param value A boolean which indicates whether the media element will start over when it reaches the end. Default true.
             * @returns This Video Game Object for method chaining.
             */
            setLoop(value?: boolean): this;

            /**
             * Returns a boolean which indicates whether the video is currently playing.undefined
             * @returns A boolean which indicates whether the video is playing, or not.
             */
            isPlaying(): boolean;

            /**
             * Returns a boolean which indicates whether the video is currently paused.undefined
             * @returns A boolean which indicates whether the video is paused, or not.
             */
            isPaused(): boolean;

            /**
             * Stores this Video in the Texture Manager using the given key as a dynamic texture,
             * which any texture-based Game Object, such as a Sprite, can use as its source:
             * 
             * ```javascript
             * const vid = this.add.video(0, 0, 'intro');
             * 
             * vid.play();
             * 
             * vid.saveTexture('doodle');
             * 
             * this.add.image(400, 300, 'doodle');
             * ```
             * 
             * If the video is not yet playing then you need to listen for the `TEXTURE_READY` event before
             * you can use this texture on a Game Object:
             * 
             * ```javascript
             * const vid = this.add.video(0, 0, 'intro');
             * 
             * vid.play();
             * 
             * vid.once('textureready', (video, texture, key) => {
             * 
             *     this.add.image(400, 300, key);
             * 
             * });
             * 
             * vid.saveTexture('doodle');
             * ```
             * 
             * The saved texture is automatically updated as the video plays. If you pause this video,
             * or change its source, then the saved texture updates instantly.
             * 
             * Calling `saveTexture` again will not save another copy of the same texture, it will just rename the existing one.
             * 
             * By default it will create a single base texture. You can add frames to the texture
             * by using the `Texture.add` method. After doing this, you can then allow Game Objects
             * to use a specific frame.
             * 
             * If you intend to save the texture so you can use it as the input for a Shader, you may need to toggle the
             * `flipY` parameter if you find the video renders upside down in your shader.
             * @param key The unique key to store the texture as within the global Texture Manager.
             * @param flipY Should the WebGL Texture set `UNPACK_MULTIPLY_FLIP_Y` during upload? Default true.
             * @returns Returns `true` if the texture is available immediately, otherwise returns `false` and you should listen for the `TEXTURE_READY` event.
             */
            saveTexture(key: string, flipY?: boolean): boolean;

            /**
             * Stops the video playing and clears all internal event listeners.
             * 
             * If you only wish to pause playback of the video, and resume it a later time, use the `Video.pause` method instead.
             * 
             * If the video hasn't finished downloading, calling this method will not abort the download. To do that you need to
             * call `destroy` instead.
             * @param emitStopEvent Should the `VIDEO_STOP` event be emitted? Default true.
             * @returns This Video Game Object for method chaining.
             */
            stop(emitStopEvent?: boolean): this;

            /**
             * Removes the Video element from the DOM by calling parentNode.removeChild on itself.
             * 
             * Also removes the autoplay and src attributes and nulls the `Video.video` reference.
             * 
             * If you loaded an external video via `Video.loadURL` then you should call this function
             * to clear up once you are done with the instance, but don't want to destroy this
             * Video Game Object.
             * 
             * This method is called automatically by `Video.destroy`.
             */
            removeVideoElement(): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The Texture this Game Object is using to render with.
             */
            texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

            /**
             * The Texture Frame this Game Object is using to render with.
             */
            frame: Phaser.Textures.Frame;

            /**
             * A boolean flag indicating if this Game Object is being cropped or not.
             * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
             * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
             */
            isCropped: boolean;

            /**
             * Applies a crop to a texture based Game Object, such as a Sprite or Image.
             * 
             * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
             * 
             * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
             * changes what is shown when rendered.
             * 
             * The crop size as well as coordinates can not exceed the size of the texture frame.
             * 
             * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
             * 
             * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
             * half of it, you could call `setCrop(0, 0, 400, 600)`.
             * 
             * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
             * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
             * 
             * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
             * 
             * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
             * 
             * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
             * the renderer to skip several internal calculations.
             * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
             * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
             * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
             * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
             * @returns This Game Object instance.
             */
            setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

            /**
             * Sets the texture and frame this Game Object will use to render with.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture.
             * @returns This Game Object instance.
             */
            setTexture(key: string, frame?: string | number): this;

            /**
             * Sets the frame this Game Object will use to render with.
             * 
             * If you pass a string or index then the Frame has to belong to the current Texture being used
             * by this Game Object.
             * 
             * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
             * 
             * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
             * 
             * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
             * @param frame The name or index of the frame within the Texture, or a Frame instance.
             * @param updateSize Should this call adjust the size of the Game Object? Default true.
             * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
             * @returns This Game Object instance.
             */
            setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

            /**
             * The tint value being applied to the top-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopLeft: number;

            /**
             * The tint value being applied to the top-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintTopRight: number;

            /**
             * The tint value being applied to the bottom-left vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomLeft: number;

            /**
             * The tint value being applied to the bottom-right vertex of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
             */
            tintBottomRight: number;

            /**
             * The tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Note that in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             */
            tintMode: Phaser.TintModes;

            /**
             * Clears all tint values associated with this Game Object.
             * 
             * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
             * which results in no visible change to the texture.undefined
             * @returns This Game Object instance.
             */
            clearTint(): this;

            /**
             * Sets the tint color on this Game Object.
             * 
             * The tint works by taking the pixel color values from the Game Objects texture, and then
             * combining it with the color value of the tint. You can provide either one color value,
             * in which case the whole Game Object will be tinted in that color. Or you can provide a color
             * per corner. The colors are blended together across the extent of the Game Object.
             * 
             * To modify the tint color once set, either call this method again with new values or use the
             * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
             * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
             * 
             * To remove a tint call `clearTint`.
             * 
             * The tint color is combined according to the tint mode.
             * By default, this is `MULTIPLY`.
             * 
             * Note that, in Phaser 3, this would also swap the tint mode if it was set
             * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
             * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
             * @param topRight The tint being applied to the top-right of the Game Object.
             * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
             * @param bottomRight The tint being applied to the bottom-right of the Game Object.
             * @returns This Game Object instance.
             */
            setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Note that, in Phaser 3, tint mode and color were set at the same time.
             * In Phaser 4 they are separate settings.
             * @param mode The tint mode to use.
             * @returns This Game Object instance.
             */
            setTintMode(mode: number | Phaser.TintModes): this;

            /**
             * Deprecated method which does nothing.
             * In Phaser 3, this would set the tint color, and set the tint mode to fill.
             * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
             */
            setTintFill(): void;

            /**
             * The tint value being applied to the whole of the Game Object.
             * Returns the value of `tintTopLeft` when read. When written, the same
             * color value is applied to all four corner tint properties (`tintTopLeft`,
             * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
             */
            tint: number;

            /**
             * Does this Game Object have a tint applied?
             * 
             * Returns `true` if any of the four corner tint values differ from 0xffffff,
             * or if the `tintMode` property is set to anything other than `MULTIPLY`.
             * Returns `false` when all four tint values are 0xffffff and the tint mode
             * is `MULTIPLY`, which is the default untinted state.
             */
            readonly isTinted: boolean;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Zone is a non-rendering rectangular Game Object that has a position and size but no texture.
         * It never displays visually, but it does live on the display list and can be moved, scaled,
         * and rotated like any other Game Object.
         * 
         * Its primary use is for creating Drop Zones and Input Hit Areas. It provides helper methods for
         * both circular and rectangular drop zones, and can also accept custom geometry shapes. Zones are
         * also useful for object overlap checks, or as a base class for your own non-displaying Game Objects.
         * 
         * The default origin is 0.5, placing it at the center of the Zone, consistent with other Game Objects.
         */
        class Zone extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param x The horizontal position of this Game Object in the world.
             * @param y The vertical position of this Game Object in the world.
             * @param width The width of the Game Object. Default 1.
             * @param height The height of the Game Object. Default 1.
             */
            constructor(scene: Phaser.Scene, x: number, y: number, width?: number, height?: number);

            /**
             * The native (un-scaled) width of this Game Object.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             */
            height: number;

            /**
             * The Blend Mode of the Game Object.
             * Although a Zone never renders, it still has a blend mode to allow it to fit seamlessly into
             * display lists without causing a batch flush.
             */
            blendMode: number;

            /**
             * The displayed width of this Game Object.
             * This value takes into account the scale factor.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * This value takes into account the scale factor.
             */
            displayHeight: number;

            /**
             * Sets the native (un-scaled) width and height of this Zone. Also updates the display origin
             * and, by default, resizes any non-custom input hit area associated with this Zone.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @param resizeInput If this Zone has a Rectangle for a hit area this argument will resize the hit area as well. Default true.
             * @returns This Game Object.
             */
            setSize(width: number, height: number, resizeInput?: boolean): this;

            /**
             * Sets the display size of this Game Object.
             * Calling this will adjust the scale.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * Sets this Zone to be a Circular Drop Zone.
             * The circle is centered on this Zone's `x` and `y` coordinates.
             * @param radius The radius of the Circle that will form the Drop Zone.
             * @returns This Game Object.
             */
            setCircleDropZone(radius: number): this;

            /**
             * Sets this Zone to be a Rectangle Drop Zone.
             * The rectangle is centered on this Zone's `x` and `y` coordinates.
             * @param width The width of the rectangle drop zone.
             * @param height The height of the rectangle drop zone.
             * @returns This Game Object.
             */
            setRectangleDropZone(width: number, height: number): this;

            /**
             * Enables this Zone as an interactive Drop Zone by calling `setInteractive` with the given
             * hit area shape and callback. You can pass any Phaser geometry shape, or a custom shape with
             * a matching hit-test callback. If no arguments are provided, a Rectangle matching the size of
             * this Zone will be used automatically. Has no effect if this Zone is already interactive.
             * @param hitArea A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape. If not given it will try to create a Rectangle based on the size of this zone.
             * @param hitAreaCallback A function that will return `true` if the given x/y coords it is sent are within the shape. If you provide a shape you must also provide a callback.
             * @returns This Game Object.
             */
            setDropZone(hitArea?: object, hitAreaCallback?: Phaser.Types.Input.HitAreaCallback): this;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * The horizontal origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the left of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originX: number;

            /**
             * The vertical origin of this Game Object.
             * The origin maps the relationship between the size and position of the Game Object.
             * The default value is 0.5, meaning all Game Objects are positioned based on their center.
             * Setting the value to 0 means the position now relates to the top of the Game Object.
             * Set this value with `setOrigin()`.
             */
            originY: number;

            /**
             * The horizontal display origin of this Game Object, expressed in pixels.
             * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
             * Setting this property updates `originX` accordingly.
             */
            displayOriginX: number;

            /**
             * The vertical display origin of this Game Object, expressed in pixels.
             * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
             * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
             * Setting this property updates `originY` accordingly.
             */
            displayOriginY: number;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

    }

    namespace Geom {
        /**
         * A Circle geometry object defined by a center position and radius.
         * 
         * This is a geometry object, containing numerical values and related methods to inspect and modify them.
         * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.
         * To render a Circle you should look at the capabilities of the Graphics class.
         * 
         * Circle objects are commonly used for hit-testing, overlap checks, masking, and defining circular
         * regions of interest within a Scene. They can be used directly with Phaser's geometry intersection
         * methods, such as `Phaser.Geom.Intersects.CircleToCircle` or `Phaser.Geom.Intersects.CircleToRectangle`,
         * making them useful for simple spatial queries without requiring a physics body.
         */
        class Circle {
            /**
             * 
             * @param x The x position of the center of the circle. Default 0.
             * @param y The y position of the center of the circle. Default 0.
             * @param radius The radius of the circle. Default 0.
             */
            constructor(x?: number, y?: number, radius?: number);

            /**
             * Calculates the area of the circle.
             * @param circle The Circle to get the area of.
             * @returns The area of the Circle.
             */
            static Area(circle: Phaser.Geom.Circle): number;

            /**
             * The geometry constant type of this object: `GEOM_CONST.CIRCLE`.
             * Used for fast type comparisons.
             */
            readonly type: number;

            /**
             * The x position of the center of the circle.
             */
            x: number;

            /**
             * The y position of the center of the circle.
             */
            y: number;

            /**
             * Check to see if the Circle contains the given x / y coordinates.
             * @param x The x coordinate to check within the circle.
             * @param y The y coordinate to check within the circle.
             * @returns True if the coordinates are within the circle, otherwise false.
             */
            contains(x: number, y: number): boolean;

            /**
             * Returns a Point object containing the coordinates of a point on the circumference of the Circle
             * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point
             * at 180 degrees around the circle.
             * @param position A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle.
             * @param out A Vector2 to store the return values in. If not given a Vector2 object will be created.
             * @returns A Vector2 containing the coordinates of the point around the circle.
             */
            getPoint<O extends Phaser.Math.Vector2>(position: number, out?: O): O;

            /**
             * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle,
             * based on the given quantity or stepRate values.
             * @param quantity The amount of points to return. If a falsy value the quantity will be derived from the `stepRate` instead.
             * @param stepRate Sets the quantity by getting the circumference of the circle and dividing it by the stepRate.
             * @param output An array to insert the Vector2s in to. If not provided a new array will be created.
             * @returns An array of Vector2 objects pertaining to the points around the circumference of the circle.
             */
            getPoints<O extends Phaser.Math.Vector2[]>(quantity: number, stepRate?: number, output?: O): O;

            /**
             * Returns a uniformly distributed random point from anywhere within the Circle.
             * @param vec A Vector2 object to set the random `x` and `y` values in.
             * @returns A Vector2 object with the random values set in the `x` and `y` properties.
             */
            getRandomPoint<O extends Phaser.Math.Vector2>(vec?: Phaser.Math.Vector2): O;

            /**
             * Sets the x, y and radius of this circle.
             * @param x The x position of the center of the circle. Default 0.
             * @param y The y position of the center of the circle. Default 0.
             * @param radius The radius of the circle. Default 0.
             * @returns This Circle object.
             */
            setTo(x?: number, y?: number, radius?: number): this;

            /**
             * Sets this Circle to be empty with a radius of zero.
             * Does not change its position.undefined
             * @returns This Circle object.
             */
            setEmpty(): this;

            /**
             * Sets the position of this Circle. If the `y` argument is omitted, both the x and y
             * positions will be set to the value of `x`.
             * @param x The x position of the center of the circle. Default 0.
             * @param y The y position of the center of the circle. Default 0.
             * @returns This Circle object.
             */
            setPosition(x?: number, y?: number): this;

            /**
             * Checks to see if the Circle is empty: has a radius of zero.undefined
             * @returns True if the Circle is empty, otherwise false.
             */
            isEmpty(): boolean;

            /**
             * The radius of the Circle. Setting this value also updates the diameter accordingly.
             */
            radius: number;

            /**
             * The diameter of the Circle, which is twice the radius. Setting this value also updates the radius accordingly.
             */
            diameter: number;

            /**
             * The leftmost point of the Circle, equal to `x - radius`. Setting this value adjusts the
             * x position of the circle's center while keeping the radius unchanged.
             */
            left: number;

            /**
             * The rightmost point of the Circle, equal to `x + radius`. Setting this value adjusts the
             * x position of the circle's center while keeping the radius unchanged.
             */
            right: number;

            /**
             * The topmost point of the Circle, equal to `y - radius`. Setting this value adjusts the
             * y position of the circle's center while keeping the radius unchanged.
             */
            top: number;

            /**
             * The bottommost point of the Circle, equal to `y + radius`. Setting this value adjusts the
             * y position of the circle's center while keeping the radius unchanged.
             */
            bottom: number;

            /**
             * Returns the circumference of the given Circle.
             * @param circle The Circle to get the circumference of.
             * @returns The circumference of the Circle.
             */
            static Circumference(circle: Phaser.Geom.Circle): number;

            /**
             * Returns a Vector2 object containing the coordinates of a point on the circumference of the Circle based on the given angle.
             * @param circle The Circle to get the circumference point on.
             * @param angle The angle from the center of the Circle to the circumference to return the point from. Given in radians.
             * @param out A Vector2 to store the results in. If not given a Vector2 will be created.
             * @returns A Vector2 object where the `x` and `y` properties are the point on the circumference.
             */
            static CircumferencePoint<O extends Phaser.Math.Vector2>(circle: Phaser.Geom.Circle, angle: number, out?: O): O;

            /**
             * Creates a new Circle instance based on the values contained in the given source.
             * @param source The Circle to be cloned. Can be an instance of a Circle or a circle-like object, with x, y and radius properties.
             * @returns A clone of the source Circle.
             */
            static Clone(source: Phaser.Geom.Circle | object): Phaser.Geom.Circle;

            /**
             * Check to see if the Circle contains the given x / y coordinates.
             * @param circle The Circle to check.
             * @param x The x coordinate to check within the circle.
             * @param y The y coordinate to check within the circle.
             * @returns True if the coordinates are within the circle, otherwise false.
             */
            static Contains(circle: Phaser.Geom.Circle, x: number, y: number): boolean;

            /**
             * Check to see if the Circle contains the given x and y coordinates as stored in the Vector2.
             * @param circle The Circle to check.
             * @param vec The Vector2 object to check if its coordinates are within the Circle or not.
             * @returns True if the Vector2 coordinates are within the circle, otherwise false.
             */
            static ContainsPoint(circle: Phaser.Geom.Circle, vec: Phaser.Math.Vector2): boolean;

            /**
             * Check to see if the Circle contains all four points of the given Rectangle object.
             * @param circle The Circle to check.
             * @param rect The Rectangle object to check if it's within the Circle or not.
             * @returns True if all of the Rectangle coordinates are within the circle, otherwise false.
             */
            static ContainsRect(circle: Phaser.Geom.Circle, rect: Phaser.Geom.Rectangle | object): boolean;

            /**
             * Copies the `x`, `y` and `radius` properties from the `source` Circle
             * into the given `dest` Circle, then returns the `dest` Circle.
             * @param source The source Circle to copy the values from.
             * @param dest The destination Circle to copy the values to.
             * @returns The destination Circle.
             */
            static CopyFrom<O extends Phaser.Geom.Circle>(source: Phaser.Geom.Circle, dest: O): O;

            /**
             * Compares the `x`, `y` and `radius` properties of the two given Circles.
             * Returns `true` if they all match, otherwise returns `false`.
             * @param circle The first Circle to compare.
             * @param toCompare The second Circle to compare.
             * @returns `true` if the two Circles equal each other, otherwise `false`.
             */
            static Equals(circle: Phaser.Geom.Circle, toCompare: Phaser.Geom.Circle): boolean;

            /**
             * Returns the bounds of the Circle object.
             * @param circle The Circle to get the bounds from.
             * @param out A Rectangle, or rectangle-like object, to store the circle bounds in. If not given a new Rectangle will be created.
             * @returns The Rectangle object containing the Circle's bounds.
             */
            static GetBounds<O extends Phaser.Geom.Rectangle>(circle: Phaser.Geom.Circle, out?: O): O;

            /**
             * Returns a Vector2 object containing the coordinates of a point on the circumference of the Circle
             * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point
             * at 180 degrees around the circle.
             * @param circle The Circle to get the circumference point on.
             * @param position A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle.
             * @param out A Vector2 instance to store the return values in. If not given a new Vector2 object will be created.
             * @returns A Vector2 containing the coordinates of the point around the circle.
             */
            static GetPoint<O extends Phaser.Math.Vector2>(circle: Phaser.Geom.Circle, position: number, out?: O): O;

            /**
             * Returns an array of Vector2 objects containing the coordinates of the points around the circumference of the Circle,
             * based on the given quantity or stepRate values.
             * @param circle The Circle to get the points from.
             * @param quantity The amount of points to return. If a falsy value the quantity will be derived from the `stepRate` instead.
             * @param stepRate Sets the quantity by getting the circumference of the circle and dividing it by the stepRate.
             * @param out An array to insert the points in to. If not provided a new array will be created.
             * @returns An array of Vector2 objects pertaining to the points around the circumference of the circle.
             */
            static GetPoints(circle: Phaser.Geom.Circle, quantity: number, stepRate?: number, out?: any[]): Phaser.Math.Vector2[];

            /**
             * Offsets the Circle by the values given.
             * @param circle The Circle to be offset (translated.)
             * @param x The amount to horizontally offset the Circle by.
             * @param y The amount to vertically offset the Circle by.
             * @returns The Circle that was offset.
             */
            static Offset<O extends Phaser.Geom.Circle>(circle: O, x: number, y: number): O;

            /**
             * Offsets the Circle by the values given in the `x` and `y` properties of the Vector2 object.
             * @param circle The Circle to be offset (translated.)
             * @param vec The Vector2 object containing the values to offset the Circle by.
             * @returns The Circle that was offset.
             */
            static OffsetPoint<O extends Phaser.Geom.Circle>(circle: O, vec: Phaser.Math.Vector2): O;

            /**
             * Returns a uniformly distributed random point from anywhere within the given Circle.
             * @param circle The Circle to get a random point from.
             * @param out A Vector2 object to set the random `x` and `y` values in.
             * @returns A Vector2 object with the random values set in the `x` and `y` properties.
             */
            static Random<O extends Phaser.Math.Vector2>(circle: Phaser.Geom.Circle, out?: O): O;

        }

        /**
         * A Circle Geometry object type.
         */
        var CIRCLE: number;

        /**
         * An Ellipse Geometry object type.
         */
        var ELLIPSE: number;

        /**
         * A Line Geometry object type.
         */
        var LINE: number;

        /**
         * A Point Geometry object type.
         * This object type was removed in 4.0.0. Use Vector2 instead.
         */
        var POINT: number;

        /**
         * A Polygon Geometry object type.
         */
        var POLYGON: number;

        /**
         * A Rectangle Geometry object type.
         */
        var RECTANGLE: number;

        /**
         * A Triangle Geometry object type.
         */
        var TRIANGLE: number;

        /**
         * An Ellipse object.
         * 
         * An Ellipse is defined by its center position (x, y), a total width, and a total height. It can be
         * used for geometric intersection tests (point-in-ellipse containment), sampling evenly-spaced or random
         * points on its circumference or interior, and as a lightweight shape descriptor for collision or
         * hit-area purposes.
         * 
         * This is a geometry object, containing numerical values and related methods to inspect and modify them.
         * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.
         * To render an Ellipse you should look at the capabilities of the Graphics class.
         */
        class Ellipse {
            /**
             * 
             * @param x The x position of the center of the ellipse. Default 0.
             * @param y The y position of the center of the ellipse. Default 0.
             * @param width The width of the ellipse. Default 0.
             * @param height The height of the ellipse. Default 0.
             */
            constructor(x?: number, y?: number, width?: number, height?: number);

            /**
             * Calculates the area of the given Ellipse using the formula: π × majorRadius × minorRadius.
             * Returns 0 if the Ellipse is empty (i.e. has no width or height).
             * @param ellipse The Ellipse to get the area of.
             * @returns The area of the Ellipse, or 0 if the Ellipse is empty.
             */
            static Area(ellipse: Phaser.Geom.Ellipse): number;

            /**
             * Returns the circumference of the given Ellipse.
             * @param ellipse The Ellipse to get the circumference of.
             * @returns The circumference of the Ellipse.
             */
            static Circumference(ellipse: Phaser.Geom.Ellipse): number;

            /**
             * Returns a Vector2 containing the coordinates of a point on the circumference of the Ellipse based on the given angle.
             * @param ellipse The Ellipse to get the circumference point on.
             * @param angle The angle from the center of the Ellipse to the circumference to return the point from. Given in radians.
             * @param out A Vector2 to store the results in. If not given a Vector2 will be created.
             * @returns A Vector2 object where the `x` and `y` properties are the point on the circumference.
             */
            static CircumferencePoint<O extends Phaser.Math.Vector2>(ellipse: Phaser.Geom.Ellipse, angle: number, out?: O): O;

            /**
             * Creates a new Ellipse instance based on the values contained in the given source.
             * @param source The Ellipse to be cloned. Can be an instance of an Ellipse or an ellipse-like object, with x, y, width and height properties.
             * @returns A clone of the source Ellipse.
             */
            static Clone(source: Phaser.Geom.Ellipse): Phaser.Geom.Ellipse;

            /**
             * Check to see if the Ellipse contains the given x / y coordinates.
             * @param ellipse The Ellipse to check.
             * @param x The x coordinate to check within the ellipse.
             * @param y The y coordinate to check within the ellipse.
             * @returns True if the coordinates are within the ellipse, otherwise false.
             */
            static Contains(ellipse: Phaser.Geom.Ellipse, x: number, y: number): boolean;

            /**
             * Check to see if the Ellipse contains the given x and y coordinates as stored in the Vector2.
             * @param ellipse The Ellipse to check.
             * @param vec The Vector2 object to check if its coordinates are within the Ellipse or not.
             * @returns True if the Vector2 coordinates are within the ellipse, otherwise false.
             */
            static ContainsPoint(ellipse: Phaser.Geom.Ellipse, vec: Phaser.Math.Vector2): boolean;

            /**
             * Check to see if the Ellipse contains all four points of the given Rectangle object.
             * @param ellipse The Ellipse to check.
             * @param rect The Rectangle object to check if it's within the Ellipse or not.
             * @returns True if all of the Rectangle coordinates are within the ellipse, otherwise false.
             */
            static ContainsRect(ellipse: Phaser.Geom.Ellipse, rect: Phaser.Geom.Rectangle | object): boolean;

            /**
             * Copies the `x`, `y`, `width` and `height` properties from the `source` Ellipse
             * into the given `dest` Ellipse, then returns the `dest` Ellipse.
             * @param source The source Ellipse to copy the values from.
             * @param dest The destination Ellipse to copy the values to.
             * @returns The destination Ellipse.
             */
            static CopyFrom<O extends Phaser.Geom.Ellipse>(source: Phaser.Geom.Ellipse, dest: O): O;

            /**
             * The geometry constant type of this object: `GEOM_CONST.ELLIPSE`.
             * Used for fast type comparisons.
             */
            readonly type: number;

            /**
             * The x position of the center of the ellipse.
             */
            x: number;

            /**
             * The y position of the center of the ellipse.
             */
            y: number;

            /**
             * The width of the ellipse.
             */
            width: number;

            /**
             * The height of the ellipse.
             */
            height: number;

            /**
             * Check to see if the Ellipse contains the given x / y coordinates.
             * @param x The x coordinate to check within the ellipse.
             * @param y The y coordinate to check within the ellipse.
             * @returns True if the coordinates are within the ellipse, otherwise false.
             */
            contains(x: number, y: number): boolean;

            /**
             * Returns a Vector2 object containing the coordinates of a point on the circumference of the Ellipse
             * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point
             * at 180 degrees around the ellipse.
             * @param position A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse.
             * @param point A Vector2 to store the return values in. If not given a Vector2 object will be created.
             * @returns A Vector2 instance containing the coordinates of the point around the ellipse.
             */
            getPoint<O extends Phaser.Math.Vector2>(position: number, point?: Phaser.Math.Vector2): O;

            /**
             * Returns an array of Vector2 objects containing the coordinates of the points around the circumference of the Ellipse,
             * based on the given quantity or stepRate values.
             * @param quantity The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.
             * @param stepRate Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.
             * @param output An array to insert the Vector2s in. If not provided a new array will be created.
             * @returns An array of Vector2 objects pertaining to the points around the circumference of the ellipse.
             */
            getPoints<O extends Phaser.Math.Vector2[]>(quantity: number, stepRate?: number, output?: O): O;

            /**
             * Returns a uniformly distributed random point from anywhere within the given Ellipse.
             * @param vec A Vector2 object to set the random `x` and `y` values in.
             * @returns A Vector2 object with the random values set in the `x` and `y` properties.
             */
            getRandomPoint<O extends Phaser.Math.Vector2>(vec?: Phaser.Math.Vector2): O;

            /**
             * Sets the x, y, width and height of this ellipse.
             * @param x The x position of the center of the ellipse.
             * @param y The y position of the center of the ellipse.
             * @param width The width of the ellipse.
             * @param height The height of the ellipse.
             * @returns This Ellipse object.
             */
            setTo(x: number, y: number, width: number, height: number): this;

            /**
             * Sets this Ellipse to be empty with a width and height of zero.
             * Does not change its position.undefined
             * @returns This Ellipse object.
             */
            setEmpty(): this;

            /**
             * Sets the position of this Ellipse. If the `y` argument is omitted, both the x and y positions
             * will be set to the value of `x`.
             * @param x The x position of the center of the ellipse.
             * @param y The y position of the center of the ellipse.
             * @returns This Ellipse object.
             */
            setPosition(x: number, y: number): this;

            /**
             * Sets the size of this Ellipse. Does not change its position.
             * If the `height` argument is omitted it will be set equal to `width`, producing a circle.
             * @param width The width of the ellipse.
             * @param height The height of the ellipse. Default width.
             * @returns This Ellipse object.
             */
            setSize(width: number, height?: number): this;

            /**
             * Checks to see if the Ellipse is empty: has a width or height of zero or less.undefined
             * @returns True if the Ellipse is empty, otherwise false.
             */
            isEmpty(): boolean;

            /**
             * Returns the minor radius of the ellipse. Also known as the Semi Minor Axis.undefined
             * @returns The minor radius.
             */
            getMinorRadius(): number;

            /**
             * Returns the major radius of the ellipse. Also known as the Semi Major Axis.undefined
             * @returns The major radius.
             */
            getMajorRadius(): number;

            /**
             * The left position of the Ellipse.
             */
            left: number;

            /**
             * The right position of the Ellipse.
             */
            right: number;

            /**
             * The top position of the Ellipse.
             */
            top: number;

            /**
             * The bottom position of the Ellipse.
             */
            bottom: number;

            /**
             * Compares the `x`, `y`, `width` and `height` properties of the two given Ellipses.
             * Returns `true` if they all match, otherwise returns `false`.
             * @param ellipse The first Ellipse to compare.
             * @param toCompare The second Ellipse to compare.
             * @returns `true` if the two Ellipse equal each other, otherwise `false`.
             */
            static Equals(ellipse: Phaser.Geom.Ellipse, toCompare: Phaser.Geom.Ellipse): boolean;

            /**
             * Returns the bounds of the Ellipse object.
             * @param ellipse The Ellipse to get the bounds from.
             * @param out A Rectangle, or rectangle-like object, to store the ellipse bounds in. If not given a new Rectangle will be created.
             * @returns The Rectangle object containing the Ellipse bounds.
             */
            static GetBounds<O extends Phaser.Geom.Rectangle>(ellipse: Phaser.Geom.Ellipse, out?: O): O;

            /**
             * Returns a Vector2 object containing the coordinates of a point on the circumference of the Ellipse
             * based on the given angle normalized to the range 0 to 1. i.e. a value of 0.5 will give the point
             * at 180 degrees around the ellipse.
             * @param ellipse The Ellipse to get the circumference point on.
             * @param position A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 degrees around the ellipse.
             * @param out A Vector2 object to store the return values in. If not given a new Vector2 object will be created.
             * @returns A Vector2 object, containing the coordinates of the point around the ellipse.
             */
            static GetPoint<O extends Phaser.Math.Vector2>(ellipse: Phaser.Geom.Ellipse, position: number, out?: O): O;

            /**
             * Returns an array of Vector2 objects containing the coordinates of the points around the circumference of the Ellipse,
             * based on the given quantity or stepRate values.
             * @param ellipse The Ellipse to get the points from.
             * @param quantity The amount of points to return. If a falsy value the quantity will be derived from the `stepRate` instead.
             * @param stepRate Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.
             * @param out An array to insert the Vector2 objects into. If not provided a new array will be created.
             * @returns An array of Vector2 objects pertaining to the points around the circumference of the ellipse.
             */
            static GetPoints<O extends Phaser.Math.Vector2[]>(ellipse: Phaser.Geom.Ellipse, quantity: number, stepRate?: number, out?: O): O;

            /**
             * Offsets the Ellipse by the values given.
             * @param ellipse The Ellipse to be offset (translated).
             * @param x The amount to horizontally offset the Ellipse by.
             * @param y The amount to vertically offset the Ellipse by.
             * @returns The Ellipse that was offset.
             */
            static Offset<O extends Phaser.Geom.Ellipse>(ellipse: O, x: number, y: number): O;

            /**
             * Offsets the Ellipse by the values given in the `x` and `y` properties of the Vector2 object.
             * @param ellipse The Ellipse to be offset (translated.)
             * @param vec The Vector2 object containing the values to offset the Ellipse by.
             * @returns The Ellipse that was offset.
             */
            static OffsetPoint<O extends Phaser.Geom.Ellipse>(ellipse: O, vec: Phaser.Math.Vector2): O;

            /**
             * Returns a uniformly distributed random point from anywhere within the given Ellipse.
             * @param ellipse The Ellipse to get a random point from.
             * @param out A Vector2 object to set the random `x` and `y` values in.
             * @returns A Vector2 object with the random values set in the `x` and `y` properties.
             */
            static Random<O extends Phaser.Math.Vector2>(ellipse: Phaser.Geom.Ellipse, out?: O): O;

        }

        namespace Intersects {
            /**
             * Checks if two Circles intersect.
             * @param circleA The first Circle to check for intersection.
             * @param circleB The second Circle to check for intersection.
             * @returns `true` if the two Circles intersect, otherwise `false`.
             */
            function CircleToCircle(circleA: Phaser.Geom.Circle, circleB: Phaser.Geom.Circle): boolean;

            /**
             * Checks for intersection between a circle and a rectangle.
             * @param circle The circle to be checked.
             * @param rect The rectangle to be checked.
             * @returns `true` if the two objects intersect, otherwise `false`.
             */
            function CircleToRectangle(circle: Phaser.Geom.Circle, rect: Phaser.Geom.Rectangle): boolean;

            /**
             * Checks if two Circles intersect and returns the intersection points as a Point object array.
             * @param circleA The first Circle to check for intersection.
             * @param circleB The second Circle to check for intersection.
             * @param out An optional array of Vector2 objects in which to store the points of intersection.
             * @returns An array with the points of intersection if objects intersect, otherwise an empty array.
             */
            function GetCircleToCircle(circleA: Phaser.Geom.Circle, circleB: Phaser.Geom.Circle, out?: Phaser.Math.Vector2[]): Phaser.Math.Vector2[];

            /**
             * Checks for intersection between a circle and a rectangle, and returns the
             * intersection points as an array of Point objects. If the shapes do not intersect,
             * an empty array is returned. If they do intersect, each of the rectangle's four
             * edges is tested against the circle and any intersection points found are added to
             * the output array.
             * @param circle The circle to be checked.
             * @param rect The rectangle to be checked.
             * @param out An optional array in which to store the points of intersection.
             * @returns An array with the points of intersection if objects intersect, otherwise an empty array.
             */
            function GetCircleToRectangle(circle: Phaser.Geom.Circle, rect: Phaser.Geom.Rectangle, out?: any[]): any[];

            /**
             * Checks for intersection between the line segment and circle,
             * and returns the intersection points as a Vector2 object array.
             * @param line The line segment to check.
             * @param circle The circle to check against the line.
             * @param out An optional array of Vector2 objects in which to store the points of intersection.
             * @returns An array with the points of intersection if objects intersect, otherwise an empty array.
             */
            function GetLineToCircle(line: Phaser.Geom.Line, circle: Phaser.Geom.Circle, out?: Phaser.Math.Vector2[]): Phaser.Math.Vector2[];

            /**
             * Checks for intersection between the two line segments, or a ray and a line segment,
             * and returns the intersection point as a Vector3, or `null` if the lines are parallel, or do not intersect.
             * 
             * The `z` property of the Vector3 contains the parametric `t` value (a scalar between 0 and 1)
             * representing how far along `line1` the intersection occurs. This can be used to sort or compare
             * multiple intersection results to find the closest intersecting point from a group of line segments.
             * @param line1 The first line segment, or a ray, to check.
             * @param line2 The second line segment to check.
             * @param isRay Is `line1` a ray or a line segment? Default false.
             * @param out A Vector3 to store the intersection results in.
             * @returns A Vector3 where `x` and `y` are the intersection point coordinates and `z` is the parametric `t` value along `line1`, or `null` if the lines do not intersect.
             */
            function GetLineToLine(line1: Phaser.Geom.Line, line2: Phaser.Geom.Line, isRay?: boolean, out?: Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Checks for the closest point of intersection between a line segment and an array of points, where each consecutive pair
             * of points is converted to a line segment for the intersection tests. The array is treated as a closed shape, meaning
             * the last point is connected back to the first point.
             * 
             * If no intersection is found, this function returns `null`.
             * 
             * If intersection was found, a Vector3 is returned with the following properties:
             * 
             * The `x` and `y` components contain the point of the intersection.
             * The `z` component contains the closest distance.
             * @param line The line segment, or ray, to check. If a ray, set the `isRay` parameter to `true`.
             * @param points An array of points to check.
             * @param isRay Is `line` a ray or a line segment? Default false.
             * @param out A Vector3 to store the intersection results in.
             * @returns A Vector3 containing the intersection results, or `null`.
             */
            function GetLineToPoints(line: Phaser.Geom.Line, points: Phaser.Math.Vector2[] | Phaser.Math.Vector2[], isRay?: boolean, out?: Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Checks for the closest point of intersection between a line segment and an array of polygons.
             * 
             * If no intersection is found, this function returns `null`.
             * 
             * If intersection was found, a Vector4 is returned with the following properties:
             * 
             * The `x` and `y` components contain the point of the intersection.
             * The `z` component contains the closest distance.
             * The `w` component contains the index of the polygon, in the given array, that triggered the intersection.
             * @param line The line segment, or ray, to check. If a ray, set the `isRay` parameter to `true`.
             * @param polygons A single polygon, or array of polygons, to check.
             * @param isRay Is `line` a ray or a line segment? Default false.
             * @param out A Vector4 to store the intersection results in.
             * @returns A Vector4 containing the intersection results, or `null`.
             */
            function GetLineToPolygon(line: Phaser.Geom.Line, polygons: Phaser.Geom.Polygon | Phaser.Geom.Polygon[], isRay?: boolean, out?: Phaser.Math.Vector4): Phaser.Math.Vector4;

            /**
             * Checks for intersection between the Line and a Rectangle shape,
             * and returns the intersection points as a Vector2 array.
             * @param line The Line to check for intersection.
             * @param rect The Rectangle to check for intersection.
             * @param out An optional array of Vector2 objects in which to store the points of intersection.
             * @returns An array with the points of intersection if objects intersect, otherwise an empty array.
             */
            function GetLineToRectangle(line: Phaser.Geom.Line, rect: Phaser.Geom.Rectangle, out?: Phaser.Math.Vector2[]): Phaser.Math.Vector2[];

            /**
             * Projects rays out from the given point to each vertex of the polygons.
             * 
             * If the rays intersect with the polygons, the points of intersection are returned in an array.
             * 
             * If no intersections are found, the returned array will be empty.
             * 
             * Each Vector4 intersection result has the following properties:
             * 
             * The `x` and `y` components contain the point of the intersection.
             * The `z` component contains the angle of the projected ray, in radians.
             * The `w` component contains the index of the polygon, in the given array, that triggered the intersection.
             * @param x The x coordinate to project the rays from.
             * @param y The y coordinate to project the rays from.
             * @param polygons A single polygon, or array of polygons, to check against the rays.
             * @returns An array containing all intersections in Vector4s.
             */
            function GetRaysFromPointToPolygon(x: number, y: number, polygons: Phaser.Geom.Polygon | Phaser.Geom.Polygon[]): Phaser.Math.Vector4[];

            /**
             * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object.
             * 
             * If optional `output` parameter is omitted, new Rectangle object is created and returned. If there is intersection, it will contain intersection area. If there is no intersection, it will be empty Rectangle (all values set to zero).
             * 
             * If Rectangle object is passed as `output` and there is intersection, then intersection area data will be loaded into it and it will be returned. If there is no intersection, it will be returned without any change.
             * @param rectA The first Rectangle object.
             * @param rectB The second Rectangle object.
             * @param output Optional Rectangle object. If given, the intersection data will be loaded into it (in case of no intersection, it will be left unchanged). Otherwise, new Rectangle object will be created and returned with either intersection data or empty (all values set to zero), if there is no intersection.
             * @returns A rectangle object with intersection data.
             */
            function GetRectangleIntersection<O extends Phaser.Geom.Rectangle>(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle, output?: O): O;

            /**
             * Checks if two Rectangles intersect and returns the intersection points as a Point object array.
             * 
             * A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle's bounds. As such, the two Rectangles are considered "solid". A Rectangle with no width or no height will never intersect another Rectangle.
             * @param rectA The first Rectangle to check for intersection.
             * @param rectB The second Rectangle to check for intersection.
             * @param out An optional array in which to store the points of intersection.
             * @returns An array with the points of intersection if objects intersect, otherwise an empty array.
             */
            function GetRectangleToRectangle(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle, out?: any[]): any[];

            /**
             * Checks for intersection between Rectangle shape and Triangle shape,
             * and returns the intersection points as a Point object array.
             * @param rect Rectangle object to test.
             * @param triangle Triangle object to test.
             * @param out An optional array in which to store the points of intersection.
             * @returns An array with the points of intersection if objects intersect, otherwise an empty array.
             */
            function GetRectangleToTriangle(rect: Phaser.Geom.Rectangle, triangle: Phaser.Geom.Triangle, out?: any[]): any[];

            /**
             * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array.
             * 
             * A Circle intersects a Triangle if its center is located within it or if any of the Triangle's sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.
             * @param triangle The Triangle to check for intersection.
             * @param circle The Circle to check for intersection.
             * @param out An optional array in which to store the points of intersection.
             * @returns An array with the points of intersection if objects intersect, otherwise an empty array.
             */
            function GetTriangleToCircle(triangle: Phaser.Geom.Triangle, circle: Phaser.Geom.Circle, out?: any[]): any[];

            /**
             * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array.
             * 
             * The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle's sides. Thus, the Triangle is considered "solid".
             * @param triangle The Triangle to check with.
             * @param line The Line to check with.
             * @param out An optional array of Vector2 objects in which to store the points of intersection.
             * @returns An array with the points of intersection if objects intersect, otherwise an empty array.
             */
            function GetTriangleToLine(triangle: Phaser.Geom.Triangle, line: Phaser.Geom.Line, out?: Phaser.Math.Vector2[]): Phaser.Math.Vector2[];

            /**
             * Checks if two Triangles intersect, and returns the intersection points as a Point object array.
             * 
             * A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".
             * @param triangleA The first Triangle to check for intersection.
             * @param triangleB The second Triangle to check for intersection.
             * @param out An optional array in which to store the points of intersection.
             * @returns An array with the points of intersection if objects intersect, otherwise an empty array.
             */
            function GetTriangleToTriangle(triangleA: Phaser.Geom.Triangle, triangleB: Phaser.Geom.Triangle, out?: any[]): any[];

            /**
             * Checks for intersection between the line segment and circle.
             * 
             * Based on code by [Matt DesLauriers](https://github.com/mattdesl/line-circle-collision/blob/master/LICENSE.md).
             * @param line The line segment to check.
             * @param circle The circle to check against the line.
             * @param nearest An optional Vector2 object. If given the closest point on the Line where the circle intersects will be stored in this object.
             * @returns `true` if the two objects intersect, otherwise `false`.
             */
            function LineToCircle(line: Phaser.Geom.Line, circle: Phaser.Geom.Circle, nearest?: Phaser.Math.Vector2): boolean;

            /**
             * Checks if two Lines intersect. If the Lines are identical, they will be treated as parallel and thus non-intersecting.
             * @param line1 The first Line to check.
             * @param line2 The second Line to check.
             * @param out An optional point-like object in which to store the coordinates of intersection, if needed.
             * @returns `true` if the two Lines intersect, and the `out` object will be populated, if given. Otherwise, `false`.
             */
            function LineToLine(line1: Phaser.Geom.Line, line2: Phaser.Geom.Line, out?: Phaser.Types.Math.Vector2Like): boolean;

            /**
             * Checks for intersection between the Line and a Rectangle shape, or a rectangle-like
             * object, with public `x`, `y`, `right` and `bottom` properties, such as a Sprite or Body.
             * 
             * An intersection is considered valid if:
             * 
             * The line starts within, or ends within, the Rectangle.
             * The line segment intersects one of the 4 rectangle edges.
             * 
             * For the purposes of this function rectangles are considered 'solid'.
             * @param line The Line to check for intersection.
             * @param rect The Rectangle to check for intersection.
             * @returns `true` if the Line and the Rectangle intersect, `false` otherwise.
             */
            function LineToRectangle(line: Phaser.Geom.Line, rect: Phaser.Geom.Rectangle | object): boolean;

            /**
             * Checks if a Point falls between the two end-points of a Line, based on the given line thickness.
             * 
             * Assumes that the line end points are circular, not square.
             * @param point The point, or point-like object to check.
             * @param line The line segment to test for intersection on.
             * @param lineThickness The line thickness. Assumes that the line end points are circular. Default 1.
             * @returns `true` if the Point falls on the Line, otherwise `false`.
             */
            function PointToLine(point: Phaser.Math.Vector2 | any, line: Phaser.Geom.Line, lineThickness?: number): boolean;

            /**
             * Checks if a Point is located on the given line segment.
             * @param point The Point to check for intersection.
             * @param line The line segment to check for intersection.
             * @returns `true` if the Point is on the given line segment, otherwise `false`.
             */
            function PointToLineSegment(point: Phaser.Math.Vector2, line: Phaser.Geom.Line): boolean;

            /**
             * Checks if two Rectangles intersect.
             * 
             * A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle's bounds.
             * As such, the two Rectangles are considered "solid".
             * A Rectangle with no width or no height will never intersect another Rectangle.
             * @param rectA The first Rectangle to check for intersection.
             * @param rectB The second Rectangle to check for intersection.
             * @returns `true` if the two Rectangles intersect, otherwise `false`.
             */
            function RectangleToRectangle(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle): boolean;

            /**
             * Checks for intersection between a Rectangle and a Triangle shape.
             * 
             * The test is performed in multiple stages of increasing cost. First, the bounding
             * boxes of the two shapes are compared for a quick early-out. If they overlap, the
             * test checks whether any triangle vertex lies inside the rectangle, then whether any
             * edge of the triangle intersects any edge of the rectangle, and finally whether any
             * corner of the rectangle lies inside the triangle.
             * @param rect The Rectangle to test.
             * @param triangle The Triangle to test.
             * @returns A value of `true` if objects intersect; otherwise `false`.
             */
            function RectangleToTriangle(rect: Phaser.Geom.Rectangle, triangle: Phaser.Geom.Triangle): boolean;

            /**
             * Checks if a Rectangle intersects with a region defined by explicit left, right, top, and bottom boundary values.
             * @param rect The Rectangle to check for intersection.
             * @param left The x coordinate of the left edge of the region to check against.
             * @param right The x coordinate of the right edge of the region to check against.
             * @param top The y coordinate of the top edge of the region to check against.
             * @param bottom The y coordinate of the bottom edge of the region to check against.
             * @param tolerance Tolerance allowed in the calculation, expressed in pixels. Default 0.
             * @returns Returns true if there is an intersection.
             */
            function RectangleToValues(rect: Phaser.Geom.Rectangle, left: number, right: number, top: number, bottom: number, tolerance?: number): boolean;

            /**
             * Checks if a Triangle and a Circle intersect.
             * 
             * A Circle intersects a Triangle if its center is located within it or if any of the Triangle's sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.
             * @param triangle The Triangle to check for intersection.
             * @param circle The Circle to check for intersection.
             * @returns `true` if the Triangle and the `Circle` intersect, otherwise `false`.
             */
            function TriangleToCircle(triangle: Phaser.Geom.Triangle, circle: Phaser.Geom.Circle): boolean;

            /**
             * Checks if a Triangle and a Line intersect.
             * 
             * The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle's sides. Thus, the Triangle is considered "solid".
             * @param triangle The Triangle to check with.
             * @param line The Line to check with.
             * @returns `true` if the Triangle and the Line intersect, otherwise `false`.
             */
            function TriangleToLine(triangle: Phaser.Geom.Triangle, line: Phaser.Geom.Line): boolean;

            /**
             * Checks if two Triangles intersect.
             * 
             * A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".
             * @param triangleA The first Triangle to check for intersection.
             * @param triangleB The second Triangle to check for intersection.
             * @returns `true` if the Triangles intersect, otherwise `false`.
             */
            function TriangleToTriangle(triangleA: Phaser.Geom.Triangle, triangleB: Phaser.Geom.Triangle): boolean;

        }

        /**
         * Defines a Line segment: a finite portion of a line described by a start point (`x1`, `y1`)
         * and an end point (`x2`, `y2`). Unlike an infinite mathematical line, a Line segment has a
         * fixed length and direction.
         * 
         * Line segments are used throughout Phaser for collision detection, geometry calculations,
         * path and boundary definitions, and placement utilities. You can retrieve a point at any
         * percentage along the line via `getPoint`, get an array of evenly-spaced points via
         * `getPoints`, or query the bounding extents through the `left`, `right`, `top`, and `bottom`
         * accessors.
         */
        class Line {
            /**
             * 
             * @param x1 The x coordinate of the line's starting point. Default 0.
             * @param y1 The y coordinate of the line's starting point. Default 0.
             * @param x2 The x coordinate of the line's ending point. Default 0.
             * @param y2 The y coordinate of the line's ending point. Default 0.
             */
            constructor(x1?: number, y1?: number, x2?: number, y2?: number);

            /**
             * Calculate the angle of the line in radians.
             * @param line The line to calculate the angle of.
             * @returns The angle of the line, in radians.
             */
            static Angle(line: Phaser.Geom.Line): number;

            /**
             * Using Bresenham's line algorithm this will return an array of all coordinates on the given line.
             * 
             * The `start` and `end` points are rounded before this runs as the algorithm works on integers.
             * @param line The line.
             * @param stepRate Controls how densely the points are sampled along the line. A value of 1 returns every integer coordinate; a value of 2 returns every other coordinate, and so on. Default 1.
             * @param results An optional array to push the resulting coordinates into.
             * @returns The array of coordinates on the line.
             */
            static BresenhamPoints(line: Phaser.Geom.Line, stepRate?: number, results?: Phaser.Types.Math.Vector2Like[]): Phaser.Types.Math.Vector2Like[];

            /**
             * Center a line on the given coordinates.
             * @param line The line to center.
             * @param x The horizontal coordinate to center the line on.
             * @param y The vertical coordinate to center the line on.
             * @returns The centered line.
             */
            static CenterOn(line: Phaser.Geom.Line, x: number, y: number): Phaser.Geom.Line;

            /**
             * Clone the given line.
             * @param source The source line to clone.
             * @returns The cloned line.
             */
            static Clone(source: Phaser.Geom.Line): Phaser.Geom.Line;

            /**
             * Copy the values of one line to a destination line.
             * @param source The source line to copy the values from.
             * @param dest The destination line to copy the values to.
             * @returns The destination line.
             */
            static CopyFrom<O extends Phaser.Geom.Line>(source: Phaser.Geom.Line, dest: O): O;

            /**
             * Compares two lines for strict equality. Two lines are considered equal if their start
             * and end point coordinates all match exactly: `x1`, `y1`, `x2`, and `y2`.
             * @param line The first line to compare.
             * @param toCompare The second line to compare.
             * @returns `true` if the two lines have identical start and end point coordinates, otherwise `false`.
             */
            static Equals(line: Phaser.Geom.Line, toCompare: Phaser.Geom.Line): boolean;

            /**
             * Extends the start and end points of a Line by the given amounts.
             * 
             * The amounts can be positive or negative. Positive values will increase the length of the line,
             * while negative ones will decrease it.
             * 
             * If no `right` value is provided it will extend the length of the line equally in both directions.
             * 
             * Pass a value of zero to leave the start or end point unchanged.
             * 
             * The `left` value extends outward from the start point (x1, y1) along the line's direction, and the `right` value extends outward from the end point (x2, y2).
             * @param line The line instance to extend.
             * @param left The amount to extend the start of the line by.
             * @param right The amount to extend the end of the line by. If not given it will be set to the `left` value.
             * @returns The modified Line instance.
             */
            static Extend(line: Phaser.Geom.Line, left: number, right?: number): Phaser.Geom.Line;

            /**
             * Returns an array of `quantity` Points where each point is taken from the given Line,
             * spaced out according to the ease function specified.
             * 
             * ```javascript
             * const line = new Phaser.Geom.Line(100, 300, 700, 300);
             * const points = Phaser.Geom.Line.GetEasedPoints(line, 'sine.out', 32)
             * ```
             * 
             * In the above example, the `points` array will contain 32 points spread-out across
             * the length of `line`, where the position of each point is determined by the `Sine.out`
             * ease function.
             * 
             * You can optionally provide a collinear threshold. In this case, the resulting points
             * are checked against each other, and if they are `< collinearThreshold` distance apart,
             * they are dropped from the results. This can help avoid lots of clustered points at
             * far ends of the line with tightly-packed eases such as Quartic. Leave the value set
             * to zero to skip this check.
             * 
             * Note that if you provide a collinear threshold, the resulting array may not always
             * contain `quantity` points.
             * @param line The Line object.
             * @param ease The ease to use. This can be either a string from the EaseMap, or a custom function.
             * @param quantity The number of points to return. Note that if you provide a `collinearThreshold`, the resulting array may not always contain this number of points.
             * @param collinearThreshold An optional threshold. The final array is reduced so that each point is spaced out at least this distance apart. This helps reduce clustering in noisy eases. Default 0.
             * @param easeParams An optional array of ease parameters to go with the ease.
             * @returns An array of Math.Vector2s containing the coordinates of the points on the line.
             */
            static GetEasedPoints<O extends Phaser.Math.Vector2[]>(line: Phaser.Geom.Line, ease: string | Function, quantity: number, collinearThreshold?: number, easeParams?: number[]): O;

            /**
             * Get the midpoint of the given line.
             * @param line The line to get the midpoint of.
             * @param out An optional Vector2 object to store the midpoint in.
             * @returns The midpoint of the Line.
             */
            static GetMidPoint<O extends Phaser.Math.Vector2>(line: Phaser.Geom.Line, out?: O): O;

            /**
             * Gets the nearest point on the infinite line defined by the given Line segment to the specified point.
             * Note that the returned point is projected onto the full line, not clamped to the segment endpoints.
             * @param line The line to get the nearest point on.
             * @param vec The Vector2 to get the nearest point to.
             * @param out An optional Vector2 object, to store the coordinates of the nearest point on the line.
             * @returns The nearest point on the line.
             */
            static GetNearestPoint<O extends Phaser.Math.Vector2>(line: Phaser.Geom.Line, vec: Phaser.Math.Vector2, out?: O): O;

            /**
             * Calculate the normal of the given line.
             * 
             * The normal of a line is a vector that points perpendicular from it.
             * @param line The line to calculate the normal of.
             * @param out An optional Vector2 object to store the normal in.
             * @returns The normal of the Line.
             */
            static GetNormal<O extends Phaser.Math.Vector2>(line: Phaser.Geom.Line, out?: O): O;

            /**
             * Get a point on a line that's a given percentage along its length.
             * @param line The line.
             * @param position A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.
             * @param out An optional Vector2 object to store the coordinates of the point on the line.
             * @returns The point on the line.
             */
            static GetPoint<O extends Phaser.Math.Vector2>(line: Phaser.Geom.Line, position: number, out?: O): O;

            /**
             * Get a number of evenly-spaced points along a line, starting from the first endpoint (x1, y1).
             * The last endpoint (x2, y2) is not included in the returned points.
             * 
             * Provide a `quantity` to get an exact number of points along the line.
             * 
             * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when
             * providing a `stepRate`.
             * 
             * See also `GetEasedPoints` for a way to distribute the points across the line according to an ease type or input function.
             * @param line The line.
             * @param quantity The number of points to place on the line. Set to `0` to use `stepRate` instead.
             * @param stepRate The distance between each point on the line. When set, `quantity` is calculated as the line length divided by this value; `quantity` should be set to `0`.
             * @param out An optional array of Vector2 objects to store the coordinates of the points on the line.
             * @returns An array of Vector2 objects containing the coordinates of the points on the line.
             */
            static GetPoints<O extends Phaser.Math.Vector2[]>(line: Phaser.Geom.Line, quantity: number, stepRate?: number, out?: O): O;

            /**
             * Calculates the shortest (perpendicular) distance from an infinite line, defined by the two
             * endpoints of the given Line object, to the given Point. If the line has zero length (both
             * endpoints are identical), this function returns `false`.
             * @param line The line to get the distance from.
             * @param point The point to get the shortest distance to.
             * @returns The shortest perpendicular distance from the line to the point, or `false` if the line has zero length.
             */
            static GetShortestDistance(line: Phaser.Geom.Line, point: Phaser.Types.Math.Vector2Like): boolean | number;

            /**
             * Calculate the height of the given line.
             * @param line The line to calculate the height of.
             * @returns The height of the line.
             */
            static Height(line: Phaser.Geom.Line): number;

            /**
             * Calculate the length of the given line.
             * @param line The line to calculate the length of.
             * @returns The length of the line.
             */
            static Length(line: Phaser.Geom.Line): number;

            /**
             * The geometry constant type of this object: `GEOM_CONST.LINE`.
             * Used for fast type comparisons.
             */
            readonly type: number;

            /**
             * The x coordinate of the line's starting point.
             */
            x1: number;

            /**
             * The y coordinate of the line's starting point.
             */
            y1: number;

            /**
             * The x coordinate of the line's ending point.
             */
            x2: number;

            /**
             * The y coordinate of the line's ending point.
             */
            y2: number;

            /**
             * Get a point on a line that's a given percentage along its length.
             * @param position A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.
             * @param output An optional Vector2 object to store the coordinates of the point on the line.
             * @returns A Vector2 object containing the coordinates of the point on the line.
             */
            getPoint<O extends Phaser.Math.Vector2>(position: number, output?: O): O;

            /**
             * Get a number of points along a line's length.
             * 
             * Provide a `quantity` to get an exact number of points along the line.
             * 
             * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when
             * providing a `stepRate`.
             * @param quantity The number of points to place on the line. Set to `0` to use `stepRate` instead.
             * @param stepRate The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.
             * @param output An optional array of Vector2 objects to store the coordinates of the points on the line.
             * @returns An array of Vector2 objects containing the coordinates of the points on the line.
             */
            getPoints<O extends Phaser.Math.Vector2[]>(quantity: number, stepRate?: number, output?: O): O;

            /**
             * Returns a randomly chosen point on this Line, selected with uniform distribution along its length.
             * If a Vector2 is provided it will be populated with the result and returned; otherwise a new Vector2 is created.
             * @param point An instance of a Vector2 to be modified.
             * @returns A random point on the Line.
             */
            getRandomPoint<O extends Phaser.Math.Vector2>(point?: O): O;

            /**
             * Set new coordinates for the line endpoints.
             * @param x1 The x coordinate of the line's starting point. Default 0.
             * @param y1 The y coordinate of the line's starting point. Default 0.
             * @param x2 The x coordinate of the line's ending point. Default 0.
             * @param y2 The y coordinate of the line's ending point. Default 0.
             * @returns This Line object.
             */
            setTo(x1?: number, y1?: number, x2?: number, y2?: number): this;

            /**
             * Sets this Line to match the x/y coordinates of the two given Vector2Like objects.
             * @param start Any object with public `x` and `y` properties, whose values will be assigned to the x1/y1 components of this Line.
             * @param end Any object with public `x` and `y` properties, whose values will be assigned to the x2/y2 components of this Line.
             * @returns This Line object.
             */
            setFromObjects(start: Phaser.Types.Math.Vector2Like, end: Phaser.Types.Math.Vector2Like): this;

            /**
             * Returns a Vector2 object that corresponds to the start of this Line.
             * @param vec2 A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.
             * @returns A Vector2 object that corresponds to the start of this Line.
             */
            getPointA<O extends Phaser.Math.Vector2>(vec2?: O): O;

            /**
             * Returns a Vector2 object that corresponds to the end of this Line.
             * @param vec2 A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.
             * @returns A Vector2 object that corresponds to the end of this Line.
             */
            getPointB<O extends Phaser.Math.Vector2>(vec2?: O): O;

            /**
             * The left-most x coordinate of this Line, i.e. the lesser of `x1` and `x2`.
             * When set, the endpoint that currently holds the smaller x value is moved to the new position.
             */
            left: number;

            /**
             * The right-most x coordinate of this Line, i.e. the greater of `x1` and `x2`.
             * When set, the endpoint that currently holds the larger x value is moved to the new position.
             */
            right: number;

            /**
             * The top-most y coordinate of this Line, i.e. the lesser of `y1` and `y2`.
             * When set, the endpoint that currently holds the smaller y value is moved to the new position.
             */
            top: number;

            /**
             * The bottom-most y coordinate of this Line, i.e. the greater of `y1` and `y2`.
             * When set, the endpoint that currently holds the larger y value is moved to the new position.
             */
            bottom: number;

            /**
             * Get the angle of the normal of the given line in radians.
             * @param line The line to calculate the angle of the normal of.
             * @returns The angle of the normal of the line in radians.
             */
            static NormalAngle(line: Phaser.Geom.Line): number;

            /**
             * Returns the x component of the normal vector of the given line.
             * @param line The Line object to get the normal value from.
             * @returns The x component of the normal vector of the line.
             */
            static NormalX(line: Phaser.Geom.Line): number;

            /**
             * The Y value of the normal of the given line.
             * The normal of a line is a vector that points perpendicular from it.
             * @param line The line to calculate the normal of.
             * @returns The Y value of the normal of the Line.
             */
            static NormalY(line: Phaser.Geom.Line): number;

            /**
             * Translates both endpoints of the given Line by the specified horizontal and vertical amounts, effectively moving the line to a new position in 2D space while preserving its length and angle.
             * @param line The line to offset.
             * @param x The horizontal offset to add to the line.
             * @param y The vertical offset to add to the line.
             * @returns The modified Line object, with both endpoints moved by the given offset.
             */
            static Offset<O extends Phaser.Geom.Line>(line: O, x: number, y: number): O;

            /**
             * Calculate the perpendicular slope of the given line.
             * @param line The line to calculate the perpendicular slope of.
             * @returns The perpendicular slope of the line.
             */
            static PerpSlope(line: Phaser.Geom.Line): number;

            /**
             * Returns a random point on a given Line.
             * @param line The Line to calculate the random point on.
             * @param out An instance of a Vector2 to be modified.
             * @returns A random point on the Line stored in a Vector2.
             */
            static Random<O extends Phaser.Math.Vector2>(line: Phaser.Geom.Line, out?: O): O;

            /**
             * Calculates the reflected angle of Line A off the surface represented by Line B. This is the outgoing angle based on the angle of incidence (Line A) and the surface normal of Line B. The result is in radians.
             * @param lineA The incident line whose angle of incidence is used.
             * @param lineB The surface line, used to calculate the normal angle of reflection.
             * @returns The reflected angle of Line A off the surface of Line B, in radians.
             */
            static ReflectAngle(lineA: Phaser.Geom.Line, lineB: Phaser.Geom.Line): number;

            /**
             * Rotate a line around its midpoint by the given angle in radians.
             * @param line The line to rotate.
             * @param angle The angle of rotation in radians.
             * @returns The rotated line.
             */
            static Rotate<O extends Phaser.Geom.Line>(line: O, angle: number): O;

            /**
             * Rotate a line around a point by the given angle in radians.
             * @param line The line to rotate.
             * @param point The point to rotate the line around.
             * @param angle The angle of rotation in radians.
             * @returns The rotated line.
             */
            static RotateAroundPoint<O extends Phaser.Geom.Line>(line: O, point: Phaser.Math.Vector2, angle: number): O;

            /**
             * Rotate a line around the given coordinates by the given angle in radians.
             * @param line The line to rotate.
             * @param x The horizontal coordinate to rotate the line around.
             * @param y The vertical coordinate to rotate the line around.
             * @param angle The angle of rotation in radians.
             * @returns The rotated line.
             */
            static RotateAroundXY<O extends Phaser.Geom.Line>(line: O, x: number, y: number, angle: number): O;

            /**
             * Set a line to a given position, angle and length.
             * @param line The line to set.
             * @param x The horizontal start position of the line.
             * @param y The vertical start position of the line.
             * @param angle The angle of the line in radians.
             * @param length The length of the line.
             * @returns The updated line.
             */
            static SetToAngle<O extends Phaser.Geom.Line>(line: O, x: number, y: number, angle: number, length: number): O;

            /**
             * Calculate the slope of the given line.
             * @param line The line to calculate the slope of.
             * @returns The slope of the line.
             */
            static Slope(line: Phaser.Geom.Line): number;

            /**
             * Calculates the width of the given line, defined as the absolute difference between
             * the x-coordinates of its two endpoints (`x1` and `x2`). This represents the
             * horizontal extent of the line, not its geometric length. To get the true length
             * of the line, use `Phaser.Geom.Line.Length` instead.
             * @param line The line to calculate the width of.
             * @returns The width of the line, i.e. the absolute difference between its x1 and x2 coordinates.
             */
            static Width(line: Phaser.Geom.Line): number;

        }

        /**
         * A Polygon object
         * 
         * The polygon is a closed shape consisting of a series of connected straight lines defined by a list of ordered points.
         * Several formats are supported to define the list of points, check the setTo method for details.
         * This is a geometry object allowing you to define and inspect the shape.
         * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.
         * To render a Polygon you should look at the capabilities of the Graphics class.
         */
        class Polygon {
            /**
             * 
             * @param points List of points defining the perimeter of this Polygon. Several formats are supported:
             * - A string containing paired x y values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`
             * - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`
             * - An array of objects with public x y properties: `[obj1, obj2, ...]`
             * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
             * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`
             */
            constructor(points?: string | number[] | Phaser.Types.Math.Vector2Like[]);

            /**
             * Create a new polygon which is a copy of the specified polygon
             * @param polygon The polygon to create a clone of
             * @returns A new separate Polygon cloned from the specified polygon, based on the same points.
             */
            static Clone(polygon: Phaser.Geom.Polygon): Phaser.Geom.Polygon;

            /**
             * Checks if a point is within the bounds of a Polygon.
             * @param polygon The Polygon to check against.
             * @param x The X coordinate of the point to check.
             * @param y The Y coordinate of the point to check.
             * @returns `true` if the point is within the bounds of the Polygon, otherwise `false`.
             */
            static Contains(polygon: Phaser.Geom.Polygon, x: number, y: number): boolean;

            /**
             * Checks the given Point against the Polygon to see if the Point lays within its vertices.
             * @param polygon The Polygon to check.
             * @param vec The Vector2 point to check if it's within the Polygon.
             * @returns `true` if the point is within the Polygon, otherwise `false`.
             */
            static ContainsPoint(polygon: Phaser.Geom.Polygon, vec: Phaser.Math.Vector2): boolean;

            /**
             * This module implements a modified ear slicing algorithm, optimized by z-order curve hashing and extended to
             * handle holes, twisted polygons, degeneracies and self-intersections in a way that doesn't guarantee correctness
             * of triangulation, but attempts to always produce acceptable results for practical data.
             * 
             * Example:
             * 
             * ```javascript
             * const triangles = Phaser.Geom.Polygon.Earcut([10,0, 0,50, 60,60, 70,10]); // returns [1,0,3, 3,2,1]
             * ```
             * 
             * Each group of three vertex indices in the resulting array forms a triangle.
             * 
             * ```javascript
             * // triangulating a polygon with a hole
             * earcut([0,0, 100,0, 100,100, 0,100,  20,20, 80,20, 80,80, 20,80], [4]);
             * // [3,0,4, 5,4,0, 3,4,7, 5,0,1, 2,3,7, 6,5,1, 2,7,6, 6,1,2]
             * 
             * // triangulating a polygon with 3d coords
             * earcut([10,0,1, 0,50,2, 60,60,3, 70,10,4], null, 3);
             * // [1,0,3, 3,2,1]
             * ```
             * 
             * If you pass a single vertex as a hole, Earcut treats it as a Steiner point.
             * 
             * If your input is a multi-dimensional array (e.g. GeoJSON Polygon), you can convert it to the format
             * expected by Earcut with `Phaser.Geom.Polygon.Earcut.flatten`:
             * 
             * ```javascript
             * var data = earcut.flatten(geojson.geometry.coordinates);
             * var triangles = earcut(data.vertices, data.holes, data.dimensions);
             * ```
             * 
             * After getting a triangulation, you can verify its correctness with `Phaser.Geom.Polygon.Earcut.deviation`:
             * 
             * ```javascript
             * var deviation = earcut.deviation(vertices, holes, dimensions, triangles);
             * ```
             * Returns the relative difference between the total area of triangles and the area of the input polygon.
             * 0 means the triangulation is fully correct.
             * 
             * For more information see https://github.com/mapbox/earcut
             * @param data A flat array of vertex coordinates, like [x0,y0, x1,y1, x2,y2, ...]
             * @param holeIndices An array of hole indices if any (e.g. [5, 8] for a 12-vertex input would mean one hole with vertices 5–7 and another with 8–11).
             * @param dimensions The number of coordinates per vertex in the input array (2 by default). Default 2.
             * @returns An array of triangulated data.
             */
            static Earcut(data: number[], holeIndices?: number[], dimensions?: number): number[];

            /**
             * Calculates the bounding AABB rectangle of a polygon.
             * @param polygon The polygon that should be calculated.
             * @param out The rectangle or object that has x, y, width, and height properties to store the result. Optional.
             * @returns The resulting rectangle or object that is passed in with position and dimensions of the polygon's AABB.
             */
            static GetAABB<O extends Phaser.Geom.Rectangle>(polygon: Phaser.Geom.Polygon, out?: O): O;

            /**
             * Stores all of the points of a Polygon into a flat array of numbers following the sequence [ x,y, x,y, x,y ],
             * i.e. each point of the Polygon, in the order it's defined, corresponds to two elements of the resultant
             * array for the point's X and Y coordinate.
             * @param polygon The Polygon whose points to export.
             * @param output An array to which the points' coordinates should be appended.
             * @returns The modified `output` array, or a new array if none was given.
             */
            static GetNumberArray<O extends number[]>(polygon: Phaser.Geom.Polygon, output?: O): O;

            /**
             * Returns an array of Vector2 objects containing the coordinates of the points around the perimeter of the Polygon,
             * based on the given quantity or stepRate values.
             * @param polygon The Polygon to get the points from.
             * @param quantity The amount of points to return. If a falsy value the quantity will be derived from the `stepRate` instead.
             * @param stepRate Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate.
             * @param output An array to insert the points in to. If not provided a new array will be created.
             * @returns An array of Vector2 objects pertaining to the points around the perimeter of the Polygon.
             */
            static GetPoints(polygon: Phaser.Geom.Polygon, quantity: number, stepRate?: number, output?: any[]): Phaser.Math.Vector2[];

            /**
             * Returns the perimeter of the given Polygon by summing the lengths of all its edges.
             * The polygon is treated as closed, so the edge between the last point and the first
             * point is included in the total.
             * @param polygon The Polygon to get the perimeter of.
             * @returns The perimeter of the Polygon.
             */
            static Perimeter(polygon: Phaser.Geom.Polygon): number;

            /**
             * The geometry constant type of this object: `GEOM_CONST.POLYGON`.
             * Used for fast type comparisons.
             */
            readonly type: number;

            /**
             * The area of this Polygon.
             */
            area: number;

            /**
             * An array of number pair objects that make up this polygon. I.e. [ {x,y}, {x,y}, {x,y} ]
             */
            points: Phaser.Math.Vector2[];

            /**
             * Check to see if the Polygon contains the given x / y coordinates.
             * @param x The x coordinate to check within the polygon.
             * @param y The y coordinate to check within the polygon.
             * @returns `true` if the coordinates are within the polygon, otherwise `false`.
             */
            contains(x: number, y: number): boolean;

            /**
             * Sets this Polygon to the given points.
             * 
             * The points can be set from a variety of formats:
             * 
             * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`
             * - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`
             * - An array of objects with public x/y properties: `[obj1, obj2, ...]`
             * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
             * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`
             * 
             * `setTo` may also be called without any arguments to remove all points.
             * @param points Points defining the perimeter of this polygon. Please check function description above for the different supported formats.
             * @returns This Polygon object.
             */
            setTo(points?: string | number[] | Phaser.Types.Math.Vector2Like[]): this;

            /**
             * Calculates the area of the Polygon using the Shoelace formula. The result is stored in the `area` property.undefined
             * @returns The area of the polygon.
             */
            calculateArea(): number;

            /**
             * Returns an array of Vector2 objects containing the coordinates of the points around the perimeter of the Polygon,
             * based on the given quantity or stepRate values.
             * @param quantity The amount of points to return. If a falsy value the quantity will be derived from the `stepRate` instead.
             * @param stepRate Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate.
             * @param output An array to insert the points in to. If not provided a new array will be created.
             * @returns An array of Vector2 objects pertaining to the points around the perimeter of the Polygon.
             */
            getPoints<O extends Phaser.Math.Vector2[]>(quantity: number, stepRate?: number, output?: O): O;

            /**
             * Reverses the order of the points of a Polygon.
             * @param polygon The Polygon to modify.
             * @returns The modified Polygon.
             */
            static Reverse<O extends Phaser.Geom.Polygon>(polygon: O): O;

            /**
             * Takes a Polygon object and simplifies the points by running them through a combination of
             * Douglas-Peucker and Radial Distance algorithms. Simplification dramatically reduces the number of
             * points in a polygon while retaining its shape, giving a huge performance boost when processing
             * it and also reducing visual noise.
             * @param polygon The polygon to be simplified. The polygon will be modified in-place and returned.
             * @param tolerance Affects the amount of simplification (in the same metric as the point coordinates). Default 1.
             * @param highestQuality Excludes distance-based preprocessing step which leads to highest quality simplification but runs ~10-20 times slower. Default false.
             * @returns The input polygon.
             */
            static Simplify<O extends Phaser.Geom.Polygon>(polygon: O, tolerance?: number, highestQuality?: boolean): O;

            /**
             * Takes a Polygon object and applies Chaikin's smoothing algorithm on its points.
             * 
             * Chaikin's algorithm is a corner-cutting technique that replaces each edge between
             * two consecutive points with two new points positioned along that edge, resulting in
             * a smoother curve. Each iteration of the algorithm increases the total number of points
             * in the polygon. The original first and last points are preserved, while all intermediate
             * points are replaced by pairs of new points at 85% and 15% along each edge.
             * 
             * The polygon is modified in-place and the same polygon object is returned.
             * @param polygon The polygon to be smoothed. The polygon will be modified in-place and returned.
             * @returns The input polygon.
             */
            static Smooth<O extends Phaser.Geom.Polygon>(polygon: O): O;

            /**
             * Translates the points of the given Polygon.
             * @param polygon The Polygon to modify.
             * @param x The amount to horizontally translate the points by.
             * @param y The amount to vertically translate the points by.
             * @returns The modified Polygon.
             */
            static Translate<O extends Phaser.Geom.Polygon>(polygon: O, x: number, y: number): O;

        }

        /**
         * A Rectangle is an axis-aligned region of 2D space defined by its top-left corner position (`x`, `y`) and its
         * dimensions (`width`, `height`). It is one of the core geometric primitives in Phaser and is used extensively
         * throughout the framework for bounds checking, camera viewports, hit areas, culling regions, and UI layout.
         * 
         * Rectangles support containment tests, perimeter point sampling, and many other geometric operations available
         * via the `Phaser.Geom.Rectangle` static methods. The `left`, `right`, `top`, `bottom`, `centerX`, and `centerY`
         * properties provide convenient access to derived positional values and can be set directly to reposition or
         * resize the Rectangle.
         */
        class Rectangle {
            /**
             * 
             * @param x The X coordinate of the top left corner of the Rectangle. Default 0.
             * @param y The Y coordinate of the top left corner of the Rectangle. Default 0.
             * @param width The width of the Rectangle. Default 0.
             * @param height The height of the Rectangle. Default 0.
             */
            constructor(x?: number, y?: number, width?: number, height?: number);

            /**
             * Calculates the area of the given Rectangle object.
             * @param rect The rectangle to calculate the area of.
             * @returns The area of the Rectangle object.
             */
            static Area(rect: Phaser.Geom.Rectangle): number;

            /**
             * Rounds a Rectangle's position up to the smallest integer greater than or equal to each current coordinate.
             * @param rect The Rectangle to adjust.
             * @returns The adjusted Rectangle.
             */
            static Ceil<O extends Phaser.Geom.Rectangle>(rect: O): O;

            /**
             * Rounds a Rectangle's position and size up to the smallest integer greater than or equal to each respective value.
             * @param rect The Rectangle to modify.
             * @returns The modified Rectangle.
             */
            static CeilAll<O extends Phaser.Geom.Rectangle>(rect: O): O;

            /**
             * Moves the top-left corner of a Rectangle so that its center is at the given coordinates.
             * @param rect The Rectangle to be centered.
             * @param x The X coordinate of the Rectangle's center.
             * @param y The Y coordinate of the Rectangle's center.
             * @returns The centered rectangle.
             */
            static CenterOn<O extends Phaser.Geom.Rectangle>(rect: O, x: number, y: number): O;

            /**
             * Creates a new Rectangle which is identical to the given one.
             * @param source The Rectangle to clone.
             * @returns The newly created Rectangle, which is separate from the given one.
             */
            static Clone(source: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle;

            /**
             * Checks if a given point is inside a Rectangle's bounds.
             * @param rect The Rectangle to check.
             * @param x The X coordinate of the point to check.
             * @param y The Y coordinate of the point to check.
             * @returns `true` if the point is within the Rectangle's bounds, otherwise `false`.
             */
            static Contains(rect: Phaser.Geom.Rectangle, x: number, y: number): boolean;

            /**
             * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object.
             * @param rect The Rectangle object.
             * @param vec The Vector2 object to check the coordinates of.
             * @returns A value of true if the Rectangle object contains the specified point, otherwise false.
             */
            static ContainsPoint(rect: Phaser.Geom.Rectangle, vec: Phaser.Math.Vector2): boolean;

            /**
             * Tests if one rectangle fully contains another. A rectangle is considered fully contained
             * if all four of its edges (left, right, top, and bottom) lie strictly within the bounds
             * of the outer rectangle. Rectangles that merely touch or overlap are not considered contained.
             * @param rectA The outer rectangle to test as the container.
             * @param rectB The inner rectangle to test for full containment within rectA.
             * @returns True only if rectA fully contains rectB.
             */
            static ContainsRect(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle): boolean;

            /**
             * Copy the values of one Rectangle to a destination Rectangle.
             * @param source The source Rectangle to copy the values from.
             * @param dest The destination Rectangle to copy the values to.
             * @returns The destination Rectangle.
             */
            static CopyFrom<O extends Phaser.Geom.Rectangle>(source: Phaser.Geom.Rectangle, dest: O): O;

            /**
             * Creates an array of plain `{x, y}` point objects for each of the four corners of a Rectangle, in the order: top-left, top-right, bottom-right, bottom-left.
             * If an output array is provided, each point object will be pushed to the end of it, otherwise a new array will be created and returned.
             * @param rect The Rectangle object to be decomposed.
             * @param out If provided, each point will be added to this array.
             * @returns Will return the array you specified or a new array containing the points of the Rectangle.
             */
            static Decompose(rect: Phaser.Geom.Rectangle, out?: any[]): any[];

            /**
             * Compares the `x`, `y`, `width` and `height` properties of two rectangles.
             * Returns `true` only if all four values match exactly using strict equality.
             * This function does not consider rectangles with the same area but different
             * positions or dimensions to be equal.
             * @param rect The first rectangle to compare.
             * @param toCompare The second rectangle to compare against.
             * @returns `true` if the rectangles' properties are an exact match, otherwise `false`.
             */
            static Equals(rect: Phaser.Geom.Rectangle, toCompare: Phaser.Geom.Rectangle): boolean;

            /**
             * 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.
             * @param target The target rectangle to adjust.
             * @param source The source rectangle to envelop the target in.
             * @returns The modified target rectangle instance.
             */
            static FitInside<O extends Phaser.Geom.Rectangle>(target: O, source: Phaser.Geom.Rectangle): O;

            /**
             * 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.
             * @param target The target rectangle to adjust.
             * @param source The source rectangle to envelope the target in.
             * @returns The modified target rectangle instance.
             */
            static FitOutside<O extends Phaser.Geom.Rectangle>(target: O, source: Phaser.Geom.Rectangle): O;

            /**
             * Rounds down (floors) the top left X and Y coordinates of the given Rectangle to the largest integer less than or equal to them
             * @param rect The rectangle to floor the top left X and Y coordinates of
             * @returns The rectangle that was passed to this function with its coordinates floored.
             */
            static Floor<O extends Phaser.Geom.Rectangle>(rect: O): O;

            /**
             * Rounds a Rectangle's position and size down to the largest integer less than or equal to each current coordinate or dimension.
             * @param rect The Rectangle to adjust.
             * @returns The adjusted Rectangle.
             */
            static FloorAll<O extends Phaser.Geom.Rectangle>(rect: O): O;

            /**
             * Constructs a new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds.
             * 
             * The `points` parameter is an array of Point-like objects:
             * 
             * ```js
             * const points = [
             *     [100, 200],
             *     [200, 400],
             *     { x: 30, y: 60 }
             * ]
             * ```
             * @param points An array of points (either arrays with two elements corresponding to the X and Y coordinate or an object with public `x` and `y` properties) which should be surrounded by the Rectangle.
             * @param out Optional Rectangle to adjust.
             * @returns The adjusted `out` Rectangle, or a new Rectangle if none was provided.
             */
            static FromPoints<O extends Phaser.Geom.Rectangle>(points: any[], out?: O): O;

            /**
             * Create the smallest Rectangle containing two coordinate pairs.
             * @param x1 The X coordinate of the first point.
             * @param y1 The Y coordinate of the first point.
             * @param x2 The X coordinate of the second point.
             * @param y2 The Y coordinate of the second point.
             * @param out Optional Rectangle to adjust.
             * @returns The adjusted `out` Rectangle, or a new Rectangle if none was provided.
             */
            static FromXY<O extends Phaser.Geom.Rectangle>(x1: number, y1: number, x2: number, y2: number, out?: O): O;

            /**
             * Calculates the width/height ratio of a rectangle.
             * @param rect The rectangle.
             * @returns The width/height ratio of the rectangle.
             */
            static GetAspectRatio(rect: Phaser.Geom.Rectangle): number;

            /**
             * Returns the center of a Rectangle as a Point.
             * @param rect The Rectangle to get the center of.
             * @param out Optional Vector2 object to update with the center coordinates.
             * @returns The modified `out` object, or a new Vector2 if none was provided.
             */
            static GetCenter<O extends Phaser.Math.Vector2>(rect: Phaser.Geom.Rectangle, out?: O): O;

            /**
             * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.
             * 
             * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.
             * 
             * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.
             * @param rectangle The Rectangle to get the perimeter point from.
             * @param position The normalized distance into the Rectangle's perimeter to return.
             * @param out A Vector2 object to update with the `x` and `y` coordinates of the point.
             * @returns The updated `out` object, or a new Vector2 if no `out` object was given.
             */
            static GetPoint<O extends Phaser.Math.Vector2>(rectangle: Phaser.Geom.Rectangle, position: number, out?: O): O;

            /**
             * Return an array of Vector2 points from the perimeter of the rectangle, each spaced out based on the quantity or step required.
             * @param rectangle The Rectangle object to get the points from.
             * @param quantity The number of evenly spaced points from the rectangle's perimeter to return. If falsey, stepRate param will be used to calculate the number of points.
             * @param stepRate Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.
             * @param out An optional array to store the points in.
             * @returns An array of Vector2 points from the perimeter of the rectangle.
             */
            static GetPoints<O extends Phaser.Math.Vector2[]>(rectangle: Phaser.Geom.Rectangle, quantity: number, stepRate: number, out?: O): O;

            /**
             * Returns the size of the Rectangle, expressed as a Vector2 object.
             * With the value of the `width` as the `x` property and the `height` as the `y` property.
             * @param rect The Rectangle to get the size from.
             * @param out The Vector2 object to store the size in. If not given, a new Vector2 instance is created.
             * @returns A Vector2 object where `x` holds the width and `y` holds the height of the Rectangle.
             */
            static GetSize<O extends Phaser.Math.Vector2>(rect: Phaser.Geom.Rectangle, out?: O): O;

            /**
             * Increases the size of a Rectangle by a specified amount.
             * 
             * The center of the Rectangle stays the same. The amounts are added to each side, so the actual increase in width or height is two times bigger than the respective argument.
             * @param rect The Rectangle to inflate.
             * @param x How many pixels the left and the right side should be moved by horizontally.
             * @param y How many pixels the top and the bottom side should be moved by vertically.
             * @returns The inflated Rectangle.
             */
            static Inflate<O extends Phaser.Geom.Rectangle>(rect: O, x: number, y: number): O;

            /**
             * Takes two Rectangles and first checks to see if they intersect.
             * If they intersect it will return the area of intersection in the `out` Rectangle.
             * If they do not intersect, the `out` Rectangle will have a width and height of zero.
             * @param rectA The first Rectangle to get the intersection from.
             * @param rectB The second Rectangle to get the intersection from.
             * @param out A Rectangle to store the intersection results in.
             * @returns The intersection result. If the width and height are zero, no intersection occurred.
             */
            static Intersection<O extends Phaser.Geom.Rectangle>(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle, out?: Phaser.Geom.Rectangle): O;

            /**
             * Returns an array of Vector2 points evenly distributed around the perimeter of the Rectangle. This is
             * commonly used to create a "marching ants" selection effect, where the returned points are used to
             * animate a dashed outline that appears to march around the border of the rectangle.
             * 
             * You can control the spacing of the points either by providing a pixel `step` distance between each
             * point, or by specifying the total `quantity` of points to distribute evenly around the full perimeter.
             * If both are omitted, an empty array is returned. If `step` is provided, `quantity` is derived from
             * the perimeter length divided by the step. If only `quantity` is provided, the step is derived instead.
             * @param rect The Rectangle to get the perimeter points from.
             * @param step The distance between each point of the perimeter. Set to `null` if you wish to use the `quantity` parameter instead.
             * @param quantity The total number of points to return. The step is then calculated based on the length of the Rectangle, divided by this value.
             * @param out An array in which the perimeter points will be stored. If not given, a new array instance is created.
             * @returns An array containing the perimeter points from the Rectangle.
             */
            static MarchingAnts<O extends Phaser.Math.Vector2[]>(rect: Phaser.Geom.Rectangle, step?: number, quantity?: number, out?: O): O;

            /**
             * Merges a Rectangle with a list of points by repositioning and/or resizing it such that all points are located on or within its bounds.
             * @param target The Rectangle which should be merged.
             * @param points An array of Vector2 objects which should be merged with the Rectangle.
             * @returns The modified Rectangle.
             */
            static MergePoints<O extends Phaser.Geom.Rectangle>(target: O, points: Phaser.Math.Vector2[]): O;

            /**
             * Merges the source rectangle into the target rectangle and returns the target.
             * Neither rectangle should have a negative width or height.
             * @param target Target rectangle. Will be modified to include source rectangle.
             * @param source Rectangle that will be merged into target rectangle.
             * @returns Modified target rectangle that contains source rectangle.
             */
            static MergeRect<O extends Phaser.Geom.Rectangle>(target: O, source: Phaser.Geom.Rectangle): O;

            /**
             * Merges a Rectangle with a point by repositioning and/or resizing it so that the point is on or within its bounds.
             * @param target The Rectangle which should be merged and modified.
             * @param x The X coordinate of the point which should be merged.
             * @param y The Y coordinate of the point which should be merged.
             * @returns The modified `target` Rectangle.
             */
            static MergeXY<O extends Phaser.Geom.Rectangle>(target: O, x: number, y: number): O;

            /**
             * Translates a Rectangle by the given horizontal and vertical amounts, moving its position while preserving its size.
             * @param rect The Rectangle to adjust.
             * @param x The distance to move the Rectangle horizontally.
             * @param y The distance to move the Rectangle vertically.
             * @returns The adjusted Rectangle.
             */
            static Offset<O extends Phaser.Geom.Rectangle>(rect: O, x: number, y: number): O;

            /**
             * Translates the top-left corner of a Rectangle by the coordinates of a translation vector.
             * @param rect The Rectangle to adjust.
             * @param vec The Vector2 point whose coordinates should be used as an offset.
             * @returns The adjusted Rectangle.
             */
            static OffsetPoint<O extends Phaser.Geom.Rectangle>(rect: O, vec: Phaser.Math.Vector2): O;

            /**
             * Checks if two Rectangles overlap. If a Rectangle is within another Rectangle, the two will be considered overlapping. Thus, the Rectangles are treated as "solid".
             * @param rectA The first Rectangle to check.
             * @param rectB The second Rectangle to check.
             * @returns `true` if the two Rectangles overlap, `false` otherwise.
             */
            static Overlaps(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle): boolean;

            /**
             * Calculates the perimeter of a Rectangle.
             * @param rect The Rectangle to use.
             * @returns The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.
             */
            static Perimeter(rect: Phaser.Geom.Rectangle): number;

            /**
             * Returns a point from the perimeter of a Rectangle based on the given angle, measured in degrees from the center of the Rectangle.
             * @param rectangle The Rectangle to get the perimeter point from.
             * @param angle The angle of the point, in degrees.
             * @param out The Vector2 object to store the position in. If not given, a new Vector2 instance is created.
             * @returns A Vector2 object holding the coordinates of the point on the Rectangle's perimeter.
             */
            static PerimeterPoint<O extends Phaser.Math.Vector2>(rectangle: Phaser.Geom.Rectangle, angle: number, out?: O): O;

            /**
             * Returns a random point within a Rectangle.
             * @param rect The Rectangle to return a point from.
             * @param out The object to update with the point's coordinates.
             * @returns The modified `out` object, or a new Point if none was provided.
             */
            static Random<O extends Phaser.Math.Vector2>(rect: Phaser.Geom.Rectangle, out: O): O;

            /**
             * Calculates a random point that lies within the `outer` Rectangle, but outside of the `inner` Rectangle.
             * The inner Rectangle must be fully contained within the outer rectangle for a point to be generated.
             * If `inner` is not fully contained within `outer`, the function returns the `out` vector unchanged.
             * @param outer The outer Rectangle to get the random point within.
             * @param inner The inner Rectangle to exclude from the returned point.
             * @param out A Vector2 object to store the result in. If not specified, a new Vector2 will be created.
             * @returns A Vector2 object containing the random values in its `x` and `y` properties.
             */
            static RandomOutside<O extends Phaser.Math.Vector2>(outer: Phaser.Geom.Rectangle, inner: Phaser.Geom.Rectangle, out?: O): O;

            /**
             * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.
             * Used for fast type comparisons.
             */
            readonly type: number;

            /**
             * The X coordinate of the top left corner of the Rectangle.
             */
            x: number;

            /**
             * The Y coordinate of the top left corner of the Rectangle.
             */
            y: number;

            /**
             * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.
             */
            width: number;

            /**
             * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.
             */
            height: number;

            /**
             * Checks if the given point is inside the Rectangle's bounds.
             * @param x The X coordinate of the point to check.
             * @param y The Y coordinate of the point to check.
             * @returns `true` if the point is within the Rectangle's bounds, otherwise `false`.
             */
            contains(x: number, y: number): boolean;

            /**
             * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.
             * 
             * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.
             * 
             * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.
             * @param position The normalized distance into the Rectangle's perimeter to return.
             * @param output A Vector2 instance to update with the `x` and `y` coordinates of the point.
             * @returns The updated `output` object, or a new Vector2 if no `output` object was given.
             */
            getPoint<O extends Phaser.Math.Vector2>(position: number, output?: O): O;

            /**
             * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.
             * @param quantity The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.
             * @param stepRate If `quantity` is 0, determines the normalized distance between each returned point.
             * @param output An array to which to append the points.
             * @returns The modified `output` array, or a new array if none was provided.
             */
            getPoints<O extends Phaser.Math.Vector2[]>(quantity: number, stepRate?: number, output?: O): O;

            /**
             * Returns a random point within the Rectangle's bounds.
             * @param vec The object in which to store the `x` and `y` coordinates of the point.
             * @returns The updated `vec`, or a new Vector2 if none was provided.
             */
            getRandomPoint<O extends Phaser.Math.Vector2>(vec?: Phaser.Math.Vector2): O;

            /**
             * Sets the position, width, and height of the Rectangle.
             * @param x The X coordinate of the top left corner of the Rectangle.
             * @param y The Y coordinate of the top left corner of the Rectangle.
             * @param width The width of the Rectangle.
             * @param height The height of the Rectangle.
             * @returns This Rectangle object.
             */
            setTo(x: number, y: number, width: number, height: number): this;

            /**
             * Resets the position, width, and height of the Rectangle to 0.undefined
             * @returns This Rectangle object.
             */
            setEmpty(): this;

            /**
             * Sets the position of the Rectangle.
             * @param x The X coordinate of the top left corner of the Rectangle.
             * @param y The Y coordinate of the top left corner of the Rectangle. Default x.
             * @returns This Rectangle object.
             */
            setPosition(x: number, y?: number): this;

            /**
             * Sets the width and height of the Rectangle.
             * @param width The width to set the Rectangle to.
             * @param height The height to set the Rectangle to. Default width.
             * @returns This Rectangle object.
             */
            setSize(width: number, height?: number): this;

            /**
             * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.undefined
             * @returns `true` if the Rectangle is empty, otherwise `false`.
             */
            isEmpty(): boolean;

            /**
             * Returns a Line object that corresponds to the top of this Rectangle.
             * @param line A Line object to set the results in. If `undefined` a new Line will be created.
             * @returns A Line object that corresponds to the top of this Rectangle.
             */
            getLineA<O extends Phaser.Geom.Line>(line?: O): O;

            /**
             * Returns a Line object that corresponds to the right of this Rectangle.
             * @param line A Line object to set the results in. If `undefined` a new Line will be created.
             * @returns A Line object that corresponds to the right of this Rectangle.
             */
            getLineB<O extends Phaser.Geom.Line>(line?: O): O;

            /**
             * Returns a Line object that corresponds to the bottom of this Rectangle.
             * @param line A Line object to set the results in. If `undefined` a new Line will be created.
             * @returns A Line object that corresponds to the bottom of this Rectangle.
             */
            getLineC<O extends Phaser.Geom.Line>(line?: O): O;

            /**
             * Returns a Line object that corresponds to the left of this Rectangle.
             * @param line A Line object to set the results in. If `undefined` a new Line will be created.
             * @returns A Line object that corresponds to the left of this Rectangle.
             */
            getLineD<O extends Phaser.Geom.Line>(line?: O): O;

            /**
             * The x coordinate of the left of the Rectangle.
             * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.
             */
            left: number;

            /**
             * The sum of the x and width properties.
             * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.
             */
            right: number;

            /**
             * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.
             * However it does affect the height property, whereas changing the y value does not affect the height property.
             */
            top: number;

            /**
             * The sum of the y and height properties.
             * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.
             */
            bottom: number;

            /**
             * The x coordinate of the center of the Rectangle.
             */
            centerX: number;

            /**
             * The y coordinate of the center of the Rectangle.
             */
            centerY: number;

            /**
             * Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.
             * @param rect The first Rectangle object.
             * @param toCompare The second Rectangle object.
             * @returns `true` if the objects have equivalent values for the `width` and `height` properties, otherwise `false`.
             */
            static SameDimensions(rect: Phaser.Geom.Rectangle, toCompare: Phaser.Geom.Rectangle): boolean;

            /**
             * Scales the width and height of the given Rectangle by the given factors.
             * @param rect The `Rectangle` object that will be scaled by the specified amount(s).
             * @param x The factor by which to scale the rectangle horizontally.
             * @param y The factor by which to scale the rectangle vertically. If this is not specified, the rectangle will be scaled by the factor `x` in both directions.
             * @returns The rectangle object with updated `width` and `height` properties as calculated from the scaling factor(s).
             */
            static Scale<O extends Phaser.Geom.Rectangle>(rect: O, x: number, y: number): O;

            /**
             * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.
             * @param rectA The first Rectangle to use.
             * @param rectB The second Rectangle to use.
             * @param out The Rectangle to store the union in.
             * @returns The modified `out` Rectangle, or a new Rectangle if none was provided.
             */
            static Union<O extends Phaser.Geom.Rectangle>(rectA: Phaser.Geom.Rectangle, rectB: Phaser.Geom.Rectangle, out?: O): O;

        }

        /**
         * A Triangle is a closed polygon defined by three vertices in 2D space, useful for hit testing,
         * defining spawn or trigger regions, and geometric calculations. It is a geometry object only —
         * not a Game Object — and cannot be rendered directly. To draw a Triangle to the screen, pass it
         * to a Graphics Game Object's `strokeTriangleShape` or `fillTriangleShape` method.
         * 
         * The three vertices are stored as coordinate pairs (`x1`,`y1`), (`x2`,`y2`), and (`x3`,`y3`).
         * All coordinates default to `0` if not provided.
         */
        class Triangle {
            /**
             * 
             * @param x1 `x` coordinate of the first point. Default 0.
             * @param y1 `y` coordinate of the first point. Default 0.
             * @param x2 `x` coordinate of the second point. Default 0.
             * @param y2 `y` coordinate of the second point. Default 0.
             * @param x3 `x` coordinate of the third point. Default 0.
             * @param y3 `y` coordinate of the third point. Default 0.
             */
            constructor(x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number);

            /**
             * Returns the area of a Triangle.
             * @param triangle The Triangle to use.
             * @returns The area of the Triangle, always non-negative.
             */
            static Area(triangle: Phaser.Geom.Triangle): number;

            /**
             * Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent).
             * The x/y specifies the top-middle of the triangle (x1/y1) and length is the length of each side.
             * @param x x coordinate of the top point of the triangle.
             * @param y y coordinate of the top point of the triangle.
             * @param length Length of each side of the triangle.
             * @returns A new equilateral Triangle with its apex at (`x`, `y`) and all sides of the specified `length`.
             */
            static BuildEquilateral(x: number, y: number, length: number): Phaser.Geom.Triangle;

            /**
             * Takes an array of vertex coordinates, and optionally an array of hole indices, then returns an array
             * of Triangle instances, where the given vertices have been decomposed into a series of triangles.
             * @param data A flat array of vertex coordinates like [x0,y0, x1,y1, x2,y2, ...]
             * @param holes An array of hole indices if any (e.g. [5, 8] for a 12-vertex input would mean one hole with vertices 5–7 and another with 8–11). Default null.
             * @param scaleX Horizontal scale factor to multiply the resulting points by. Default 1.
             * @param scaleY Vertical scale factor to multiply the resulting points by. Default 1.
             * @param out An array to store the resulting Triangle instances in. If not provided, a new array is created.
             * @returns An array of Triangle instances, where each triangle is based on the decomposed vertices data.
             */
            static BuildFromPolygon<O extends Phaser.Geom.Triangle[]>(data: any[], holes?: any[], scaleX?: number, scaleY?: number, out?: O): O;

            /**
             * Builds a right triangle, i.e. one which has a 90-degree angle and two acute angles. The `x` and `y` coordinates mark the position of the right-angle vertex, which becomes the first point of the Triangle. The `width` and `height` values determine the lengths of the two sides adjacent to the right angle and may be positive or negative, which controls the direction in which each side extends from the right-angle vertex.
             * @param x The X coordinate of the right angle, which will also be the first X coordinate of the constructed Triangle.
             * @param y The Y coordinate of the right angle, which will also be the first Y coordinate of the constructed Triangle.
             * @param width The length of the side which is to the left or to the right of the right angle.
             * @param height The length of the side which is above or below the right angle. If not given, defaults to the value of `width`.
             * @returns The constructed right Triangle.
             */
            static BuildRight(x: number, y: number, width: number, height: number): Phaser.Geom.Triangle;

            /**
             * Positions the Triangle so that it is centered on the given coordinates.
             * @param triangle The triangle to be positioned.
             * @param x The horizontal coordinate to center on.
             * @param y The vertical coordinate to center on.
             * @param centerFunc The function used to center the triangle. Defaults to Centroid centering.
             * @returns The Triangle that was centered.
             */
            static CenterOn<O extends Phaser.Geom.Triangle>(triangle: O, x: number, y: number, centerFunc?: CenterFunction): O;

            /**
             * Calculates the position of a Triangle's centroid, which is also its center of mass (center of gravity).
             * 
             * The centroid is the point in a Triangle at which its three medians (the lines drawn from the vertices to the bisectors of the opposite sides) meet. It divides each one in a 2:1 ratio.
             * @param triangle The Triangle to use.
             * @param out A Vector2 object to store the coordinates in.
             * @returns The `out` object with modified `x` and `y` properties, or a new Vector2 if none was provided.
             */
            static Centroid<O extends Phaser.Math.Vector2>(triangle: Phaser.Geom.Triangle, out?: O): O;

            /**
             * Computes the circumcenter of a triangle. The circumcenter is the centre of
             * the circumcircle, the unique circle that passes through all three vertices of
             * the triangle. It is also the common intersection point of the perpendicular
             * bisectors of the sides of the triangle, and is the only point which has equal
             * distance to all three vertices of the triangle.
             * 
             * Adapted from http://bjornharrtell.github.io/jsts/doc/api/jsts_geom_Triangle.js.html
             * @param triangle The Triangle to get the circumcenter of.
             * @param out The Vector2 object to store the position in. If not given, a new Vector2 instance is created.
             * @returns A Vector2 object holding the coordinates of the circumcenter of the Triangle.
             */
            static CircumCenter<O extends Phaser.Math.Vector2>(triangle: Phaser.Geom.Triangle, out?: O): O;

            /**
             * Finds the circumscribed circle (circumcircle) of a Triangle object. The circumcircle is the circle which touches all of the triangle's vertices.
             * 
             * Adapted from https://gist.github.com/mutoo/5617691
             * @param triangle The Triangle to use as input.
             * @param out An optional Circle to store the result in.
             * @returns The updated `out` Circle, or a new Circle if none was provided.
             */
            static CircumCircle<O extends Phaser.Geom.Circle>(triangle: Phaser.Geom.Triangle, out?: O): O;

            /**
             * Clones a Triangle object.
             * @param source The Triangle to clone.
             * @returns A new Triangle identical to the given one but separate from it.
             */
            static Clone(source: Phaser.Geom.Triangle): Phaser.Geom.Triangle;

            /**
             * Checks if a point (as a pair of coordinates) is inside a Triangle's bounds.
             * @param triangle The Triangle to check.
             * @param x The X coordinate of the point to check.
             * @param y The Y coordinate of the point to check.
             * @returns `true` if the point is inside the Triangle, otherwise `false`.
             */
            static Contains(triangle: Phaser.Geom.Triangle, x: number, y: number): boolean;

            /**
             * Filters an array of point-like objects to only those contained within a triangle.
             * 
             * If `returnFirst` is true, will return an array containing only the first point in the provided array that is within the triangle (or an empty array if there are no such points).
             * @param triangle The triangle that the points are being checked in.
             * @param points An array of Vector2 objects to check if they are within the triangle.
             * @param returnFirst If `true`, return an array containing only the first point found that is within the triangle. Default false.
             * @param out If provided, the points that are within the triangle will be appended to this array instead of being added to a new array. If `returnFirst` is true, only the first point found within the triangle will be appended. This array will also be returned by this function.
             * @returns An array containing all the points from `points` that are within the triangle, if an array was provided as `out`, points will be appended to that array and it will also be returned here.
             */
            static ContainsArray(triangle: Phaser.Geom.Triangle, points: Phaser.Math.Vector2[], returnFirst?: boolean, out?: any[]): Phaser.Math.Vector2[];

            /**
             * Tests if a triangle contains a point.
             * @param triangle The triangle.
             * @param vec The Vector2 point to test if it's within the triangle.
             * @returns `true` if the point is within the triangle, otherwise `false`.
             */
            static ContainsPoint(triangle: Phaser.Geom.Triangle, vec: Phaser.Math.Vector2): boolean;

            /**
             * Copy the values of one Triangle to a destination Triangle.
             * @param source The source Triangle to copy the values from.
             * @param dest The destination Triangle to copy the values to.
             * @returns The destination Triangle.
             */
            static CopyFrom<O extends Phaser.Geom.Triangle>(source: Phaser.Geom.Triangle, dest: O): O;

            /**
             * Decomposes a Triangle into an array of its points.
             * @param triangle The Triangle to decompose.
             * @param out An array to store the points into.
             * @returns The provided `out` array, or a new array if none was provided, with three objects with `x` and `y` properties representing each point of the Triangle appended to it.
             */
            static Decompose(triangle: Phaser.Geom.Triangle, out?: any[]): any[];

            /**
             * Returns true if two triangles have the same coordinates.
             * @param triangle The first triangle to check.
             * @param toCompare The second triangle to check.
             * @returns `true` if the two given triangles have the exact same coordinates, otherwise `false`.
             */
            static Equals(triangle: Phaser.Geom.Triangle, toCompare: Phaser.Geom.Triangle): boolean;

            /**
             * Returns a point along the perimeter of a Triangle as a Vector2, based on a normalized position value.
             * 
             * The `position` parameter is a value between 0 and 1, where 0 and 1 both map to the start of
             * line A (the first vertex). The point is calculated by traversing the triangle's perimeter in
             * order: line A, then line B, then line C.
             * @param triangle The Triangle to get the point on its perimeter from.
             * @param position A normalized value between 0 and 1 representing a position along the triangle's perimeter. Both 0 and 1 return the start of line A.
             * @param out An optional Vector2 point to store the result in. If not given, a new Vector2 will be created.
             * @returns A Vector2 point containing the coordinates of the position on the triangle's perimeter.
             */
            static GetPoint<O extends Phaser.Math.Vector2>(triangle: Phaser.Geom.Triangle, position: number, out?: O): O;

            /**
             * Returns an array of evenly spaced points on the perimeter of a Triangle.
             * 
             * The points are placed along the triangle's three edges in order (A, B, then C),
             * with their positions calculated proportionally based on the total perimeter length.
             * @param triangle The Triangle to get the points from.
             * @param quantity The number of evenly spaced points to return. Set to 0 to return an arbitrary number of points based on the `stepRate`.
             * @param stepRate If `quantity` is 0, the distance in pixels between each returned point along the perimeter.
             * @param out An array to which the points should be appended.
             * @returns The modified `out` array, or a new array if none was provided.
             */
            static GetPoints<O extends Phaser.Math.Vector2>(triangle: Phaser.Geom.Triangle, quantity: number, stepRate: number, out?: O): O;

            /**
             * Calculates the position of the incenter of a Triangle object. This is the point where its three angle bisectors meet and it's also the center of the incircle, which is the circle inscribed in the triangle.
             * @param triangle The Triangle to find the incenter of.
             * @param out An optional Vector2 point in which to store the coordinates.
             * @returns The incenter of the triangle in a Vector2.
             */
            static InCenter<O extends Phaser.Math.Vector2>(triangle: Phaser.Geom.Triangle, out?: O): O;

            /**
             * Moves each point (vertex) of a Triangle by a given offset, thus moving the entire Triangle by that offset.
             * @param triangle The Triangle to move.
             * @param x The horizontal offset (distance) by which to move each point. Can be positive or negative.
             * @param y The vertical offset (distance) by which to move each point. Can be positive or negative.
             * @returns The modified Triangle.
             */
            static Offset<O extends Phaser.Geom.Triangle>(triangle: O, x: number, y: number): O;

            /**
             * Gets the length of the perimeter of the given triangle.
             * Calculated by adding together the length of each of the three sides.
             * @param triangle The Triangle to get the length from.
             * @returns The length of the Triangle.
             */
            static Perimeter(triangle: Phaser.Geom.Triangle): number;

            /**
             * Returns a random Point from within the area of the given Triangle.
             * @param triangle The Triangle to get a random point from.
             * @param out The Vector2 point object to store the position in. If not given, a new Vector2 instance is created.
             * @returns A Vector2 point object holding the coordinates of a random position within the Triangle.
             */
            static Random<O extends Phaser.Math.Vector2>(triangle: Phaser.Geom.Triangle, out?: O): O;

            /**
             * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet.
             * @param triangle The Triangle to rotate.
             * @param angle The angle by which to rotate the Triangle, in radians.
             * @returns The rotated Triangle.
             */
            static Rotate<O extends Phaser.Geom.Triangle>(triangle: O, angle: number): O;

            /**
             * Rotates a Triangle at a certain angle about a given Vector2 point.
             * @param triangle The Triangle to rotate.
             * @param point The Vector2 point to rotate the Triangle around.
             * @param angle The angle by which to rotate the Triangle, in radians.
             * @returns The rotated Triangle.
             */
            static RotateAroundPoint<O extends Phaser.Geom.Triangle>(triangle: O, point: Phaser.Math.Vector2, angle: number): O;

            /**
             * Rotates an entire Triangle at a given angle about a specific point.
             * @param triangle The Triangle to rotate.
             * @param x The X coordinate of the point to rotate the Triangle about.
             * @param y The Y coordinate of the point to rotate the Triangle about.
             * @param angle The angle by which to rotate the Triangle, in radians.
             * @returns The rotated Triangle.
             */
            static RotateAroundXY<O extends Phaser.Geom.Triangle>(triangle: O, x: number, y: number, angle: number): O;

            /**
             * The geometry constant type of this object: `GEOM_CONST.TRIANGLE`.
             * Used for fast type comparisons.
             */
            readonly type: number;

            /**
             * `x` coordinate of the first point.
             */
            x1: number;

            /**
             * `y` coordinate of the first point.
             */
            y1: number;

            /**
             * `x` coordinate of the second point.
             */
            x2: number;

            /**
             * `y` coordinate of the second point.
             */
            y2: number;

            /**
             * `x` coordinate of the third point.
             */
            x3: number;

            /**
             * `y` coordinate of the third point.
             */
            y3: number;

            /**
             * Checks whether a given point lies within the triangle.
             * @param x The x coordinate of the point to check.
             * @param y The y coordinate of the point to check.
             * @returns `true` if the coordinate pair is within the triangle, otherwise `false`.
             */
            contains(x: number, y: number): boolean;

            /**
             * Returns a point at a given normalized position along the perimeter of the triangle.
             * @param position Position as float within `0` and `1`. `0` equals the first point.
             * @param output Optional Vector2 point that the calculated point will be written to.
             * @returns Calculated Vector2 that represents the requested position. It is the same as `output` when this parameter has been given.
             */
            getPoint<O extends Phaser.Math.Vector2>(position: number, output?: O): O;

            /**
             * Calculates a list of evenly distributed points along the perimeter of the triangle. Either pass the number of points to generate (`quantity`) or the distance between consecutive points (`stepRate`).
             * @param quantity Number of points to be generated. Can be falsey when `stepRate` should be used. All points have the same distance along the triangle.
             * @param stepRate Distance between two points. Will only be used when `quantity` is falsey.
             * @param output Optional array of Vector2 points for writing the calculated points into. Otherwise a new array will be created.
             * @returns Returns a list of calculated `Vector2` instances or the filled array passed as parameter `output`.
             */
            getPoints<O extends Phaser.Math.Vector2[]>(quantity: number, stepRate?: number, output?: O): O;

            /**
             * Returns a random point from within the area of the triangle.
             * @param vec Optional Vector2 point that will be modified. Otherwise a new one will be created.
             * @returns Random Vector2. When parameter `vec` has been provided it will be returned.
             */
            getRandomPoint<O extends Phaser.Math.Vector2>(vec?: Phaser.Math.Vector2): O;

            /**
             * Sets all three points of the triangle. Leaving out any coordinate sets it to be `0`.
             * @param x1 `x` coordinate of the first point. Default 0.
             * @param y1 `y` coordinate of the first point. Default 0.
             * @param x2 `x` coordinate of the second point. Default 0.
             * @param y2 `y` coordinate of the second point. Default 0.
             * @param x3 `x` coordinate of the third point. Default 0.
             * @param y3 `y` coordinate of the third point. Default 0.
             * @returns This Triangle object.
             */
            setTo(x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number): this;

            /**
             * Returns a Line object that corresponds to Line A of this Triangle, running from vertex 1 (`x1`, `y1`) to vertex 2 (`x2`, `y2`).
             * @param line A Line object to set the results in. If `undefined` a new Line will be created.
             * @returns A Line object that corresponds to line A of this Triangle.
             */
            getLineA<O extends Phaser.Geom.Line>(line?: O): O;

            /**
             * Returns a Line object that corresponds to Line B of this Triangle, running from vertex 2 (`x2`, `y2`) to vertex 3 (`x3`, `y3`).
             * @param line A Line object to set the results in. If `undefined` a new Line will be created.
             * @returns A Line object that corresponds to line B of this Triangle.
             */
            getLineB<O extends Phaser.Geom.Line>(line?: O): O;

            /**
             * Returns a Line object that corresponds to Line C of this Triangle, running from vertex 3 (`x3`, `y3`) back to vertex 1 (`x1`, `y1`), closing the shape.
             * @param line A Line object to set the results in. If `undefined` a new Line will be created.
             * @returns A Line object that corresponds to line C of this Triangle.
             */
            getLineC<O extends Phaser.Geom.Line>(line?: O): O;

            /**
             * Left most X coordinate of the triangle. Setting it moves the triangle on the X axis accordingly.
             */
            left: number;

            /**
             * Right most X coordinate of the triangle. Setting it moves the triangle on the X axis accordingly.
             */
            right: number;

            /**
             * Top most Y coordinate of the triangle. Setting it moves the triangle on the Y axis accordingly.
             */
            top: number;

            /**
             * Bottom most Y coordinate of the triangle. Setting it moves the triangle on the Y axis accordingly.
             */
            bottom: number;

        }

    }

    namespace Input {
        /**
         * Creates a new Interactive Object.
         * 
         * An Interactive Object is a plain data object that stores all of the input-related state for
         * a Game Object. This includes its hit area geometry, drag state, local pointer coordinates,
         * and references to the camera and any drop zone target. It is not a class instance, but a
         * plain object literal returned by this function.
         * 
         * This is called automatically by the Input Manager when you enable a Game Object for input.
         * 
         * The resulting Interactive Object is mapped to the Game Object's `input` property.
         * @param gameObject The Game Object to which this Interactive Object is bound.
         * @param hitArea The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle.
         * @param hitAreaCallback The 'contains' check callback that the hit area shape will use for all hit tests.
         * @returns The new Interactive Object.
         */
        function CreateInteractiveObject(gameObject: Phaser.GameObjects.GameObject, hitArea: any, hitAreaCallback: Phaser.Types.Input.HitAreaCallback): Phaser.Types.Input.InteractiveObject;

        /**
         * Creates a new Pixel Perfect Handler function.
         * 
         * Pixel perfect hit detection tests the alpha value of the specific pixel at the point
         * of interaction on a Game Object's texture, rather than relying solely on its bounding
         * box or hit area geometry. This allows fully transparent regions of a sprite to be
         * correctly ignored during pointer and overlap checks, at the cost of a texture lookup
         * per test.
         * 
         * Access via `InputPlugin.makePixelPerfect` rather than calling it directly.
         * @param textureManager A reference to the Texture Manager.
         * @param alphaTolerance The alpha level that the pixel must be at or above to be counted as a successful interaction.
         * @returns The new Pixel Perfect Handler function.
         */
        function CreatePixelPerfectHandler(textureManager: Phaser.Textures.TextureManager, alphaTolerance: number): Function;

        /**
         * The Input Manager is responsible for handling the pointer related systems in a single Phaser Game instance.
         * 
         * Based on the Game Config it will create handlers for mouse and touch support.
         * 
         * Keyboard and Gamepad are plugins, handled directly by the InputPlugin class.
         * 
         * It then manages the events, pointer creation and general hit test related operations.
         * 
         * You rarely need to interact with the Input Manager directly, and as such, all of its properties and methods
         * should be considered private. Instead, you should use the Input Plugin, which is a Scene level system, responsible
         * for dealing with all input events for a Scene.
         */
        class InputManager {
            /**
             * 
             * @param game The Game instance that owns the Input Manager.
             * @param config The Input Configuration object, as set in the Game Config.
             */
            constructor(game: Phaser.Game, config: object);

            /**
             * The Game instance that owns the Input Manager.
             * A Game only maintains one instance of the Input Manager at any time.
             */
            readonly game: Phaser.Game;

            /**
             * A reference to the global Game Scale Manager.
             * Used for all bounds checks and pointer scaling.
             */
            scaleManager: Phaser.Scale.ScaleManager;

            /**
             * The Canvas that is used for all DOM event input listeners.
             */
            canvas: HTMLCanvasElement;

            /**
             * The Game Configuration object, as set during the game boot.
             */
            config: Phaser.Core.Config;

            /**
             * If set, the Input Manager will run its update loop every frame.
             */
            enabled: boolean;

            /**
             * The Event Emitter instance that the Input Manager uses to emit events from.
             */
            events: Phaser.Events.EventEmitter;

            /**
             * Are any mouse or touch pointers currently over the game canvas?
             * This is updated automatically by the canvas over and out handlers.
             */
            readonly isOver: boolean;

            /**
             * The default CSS cursor to be used when interacting with your game.
             * 
             * See the `setDefaultCursor` method for more details.
             */
            defaultCursor: string;

            /**
             * A reference to the Keyboard Manager class, if enabled via the `input.keyboard` Game Config property.
             */
            keyboard: Phaser.Input.Keyboard.KeyboardManager | null;

            /**
             * A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property.
             */
            mouse: Phaser.Input.Mouse.MouseManager | null;

            /**
             * A reference to the Touch Manager class, if enabled via the `input.touch` Game Config property.
             */
            touch: Phaser.Input.Touch.TouchManager;

            /**
             * An array of Pointers that have been added to the game.
             * The first entry is reserved for the Mouse Pointer, the rest are Touch Pointers.
             * 
             * By default there is 1 touch pointer enabled. If you need more use the `addPointer` method to start them,
             * or set the `input.activePointers` property in the Game Config.
             */
            pointers: Phaser.Input.Pointer[];

            /**
             * The number of touch objects activated and being processed each update.
             * 
             * You can change this by either calling `addPointer` at run-time, or by
             * setting the `input.activePointers` property in the Game Config.
             */
            readonly pointersTotal: number;

            /**
             * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_.
             * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer`
             * which will always map to the most recently interacted pointer.
             */
            mousePointer: Phaser.Input.Pointer | null;

            /**
             * The most recently active Pointer object.
             * 
             * If you've only 1 Pointer in your game then this will accurately be either the first finger touched, or the mouse.
             * 
             * If your game doesn't need to support multi-touch then you can safely use this property in all of your game
             * code and it will adapt to be either the mouse or the touch, based on device.
             */
            activePointer: Phaser.Input.Pointer;

            /**
             * If the top-most Scene in the Scene List receives an input it will stop input from
             * propagating any lower down the scene list, i.e. if you have a UI Scene at the top
             * and click something on it, that click will not then be passed down to any other
             * Scene below. Disable this to have input events passed through all Scenes, all the time.
             */
            globalTopOnly: boolean;

            /**
             * The time this Input Manager was last updated.
             * This value is populated by the Game Step each frame.
             */
            readonly time: number;

            /**
             * The Boot handler is called by Phaser.Game when it first starts up.
             * The renderer is available by now.
             */
            protected boot(): void;

            /**
             * Tells the Input system to set a custom cursor.
             * 
             * This cursor will be the default cursor used when interacting with the game canvas.
             * 
             * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.
             * 
             * Any valid CSS cursor value is allowed, including paths to image files, i.e.:
             * 
             * ```javascript
             * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer');
             * ```
             * 
             * Please read about the differences between browsers when it comes to the file formats and sizes they support:
             * 
             * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
             * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property
             * 
             * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support.
             * @param cursor The CSS to be used when setting the default cursor.
             */
            setDefaultCursor(cursor: string): void;

            /**
             * Adds new Pointer objects to the Input Manager.
             * 
             * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`.
             * 
             * You can create more either by calling this method, or by setting the `input.activePointers` property
             * in the Game Config, up to a maximum of 10 pointers.
             * 
             * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added
             * via this method.
             * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1.
             * @returns An array containing all of the new Pointer objects that were created.
             */
            addPointer(quantity?: number): Phaser.Input.Pointer[];

            /**
             * Internal method that gets a list of all the active Input Plugins in the game
             * and updates each of them in turn, in reverse order (top to bottom), to allow
             * for DOM top-level event handling simulation.
             * @param type The type of event to process.
             * @param pointers An array of Pointers on which the event occurred.
             */
            updateInputPlugins(type: number, pointers: Phaser.Input.Pointer[]): void;

            /**
             * Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects.
             * 
             * The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space
             * and used to determine if they fall within the remaining Game Objects hit areas or not.
             * 
             * If nothing is matched an empty array is returned.
             * 
             * This method is called automatically by InputPlugin.hitTestPointer and doesn't usually need to be invoked directly.
             * @param pointer The Pointer to test against.
             * @param gameObjects An array of interactive Game Objects to check.
             * @param camera The Camera which is being tested against.
             * @param output An array to store the results in. If not given, a new empty array is created.
             * @returns An array of the Game Objects that were hit during this hit test.
             */
            hitTest(pointer: Phaser.Input.Pointer, gameObjects: any[], camera: Phaser.Cameras.Scene2D.Camera, output?: any[]): any[];

            /**
             * Checks if the given x and y coordinate are within the hit area of the Game Object.
             * 
             * This method assumes that the coordinate values have already been translated into the space of the Game Object.
             * 
             * If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties.
             * @param gameObject The interactive Game Object to check against.
             * @param x The translated x coordinate for the hit test.
             * @param y The translated y coordinate for the hit test.
             * @returns `true` if the coordinates were inside the Game Objects hit area, otherwise `false`.
             */
            pointWithinHitArea(gameObject: Phaser.GameObjects.GameObject, x: number, y: number): boolean;

            /**
             * Checks if the given x and y coordinate are within the hit area of the Interactive Object.
             * 
             * This method assumes that the coordinate values have already been translated into the space of the Interactive Object.
             * 
             * If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties.
             * @param object The Interactive Object to check against.
             * @param x The translated x coordinate for the hit test.
             * @param y The translated y coordinate for the hit test.
             * @returns `true` if the coordinates were inside the Interactive Object's hit area, otherwise `false`.
             */
            pointWithinInteractiveObject(object: Phaser.Types.Input.InteractiveObject, x: number, y: number): boolean;

            /**
             * Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager.
             * @param pointer The Pointer to transform the values for.
             * @param pageX The Page X value.
             * @param pageY The Page Y value.
             * @param wasMove Are we transforming the Pointer from a move event, or an up / down event?
             */
            transformPointer(pointer: Phaser.Input.Pointer, pageX: number, pageY: number, wasMove: boolean): void;

            /**
             * Destroys the Input Manager and all of its systems.
             * 
             * There is no way to recover from doing this.
             */
            destroy(): void;

        }

        /**
         * The Input Plugin belongs to a Scene and handles all input related events and operations for it.
         * 
         * You can access it from within a Scene using `this.input`.
         * 
         * It emits events directly. For example, you can do:
         * 
         * ```javascript
         * this.input.on('pointerdown', callback, context);
         * ```
         * 
         * To listen for a pointer down event anywhere on the game canvas.
         * 
         * Game Objects can be enabled for input by calling their `setInteractive` method. After which they
         * will directly emit input events:
         * 
         * ```javascript
         * var sprite = this.add.sprite(x, y, texture);
         * sprite.setInteractive();
         * sprite.on('pointerdown', callback, context);
         * ```
         * 
         * There are lots of game configuration options available relating to input.
         * See the [Input Config object]{@linkcode Phaser.Types.Core.InputConfig} for more details, including how to deal with Phaser
         * listening for input events outside of the canvas, how to set a default number of pointers, input
         * capture settings and more.
         * 
         * Please also see the Input examples and tutorials for further information.
         * 
         * **Incorrect input coordinates with Angular**
         * 
         * If you are using Phaser within Angular, and use nglf or the router, to make the component in which the Phaser game resides
         * change state (i.e. appear or disappear) then you'll need to notify the Scale Manager about this, as Angular will mess with
         * the DOM in a way in which Phaser can't detect directly. Call `this.scale.updateBounds()` as part of your game init in order
         * to refresh the canvas DOM bounds values, which Phaser uses for input point position calculations.
         */
        class InputPlugin extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param scene A reference to the Scene that this Input Plugin is responsible for.
             */
            constructor(scene: Phaser.Scene);

            /**
             * A reference to the Scene that this Input Plugin is responsible for.
             */
            scene: Phaser.Scene;

            /**
             * A reference to the Scene Systems class.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * A reference to the Scene Systems Settings.
             */
            settings: Phaser.Types.Scenes.SettingsObject;

            /**
             * A reference to the Game Input Manager.
             */
            manager: Phaser.Input.InputManager;

            /**
             * If `true` this Input Plugin will process DOM input events.
             */
            enabled: boolean;

            /**
             * A reference to the Scene Display List. This property is set during the `boot` method.
             */
            displayList: Phaser.GameObjects.DisplayList;

            /**
             * A reference to the Scene Cameras Manager. This property is set during the `boot` method.
             */
            cameras: Phaser.Cameras.Scene2D.CameraManager;

            /**
             * A reference to the Mouse Manager.
             * 
             * This property is only set if Mouse support has been enabled in your Game Configuration file.
             * 
             * If you just wish to get access to the mouse pointer, use the `mousePointer` property instead.
             */
            mouse: Phaser.Input.Mouse.MouseManager | null;

            /**
             * When set to `true` (the default) the Input Plugin will emulate DOM behavior by only emitting events from
             * the top-most Game Objects in the Display List.
             * 
             * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one.
             */
            topOnly: boolean;

            /**
             * How often should the Pointers be checked?
             * 
             * The value is a time, given in ms, and is the time that must have elapsed between game steps before
             * the Pointers will be polled again. When a pointer is polled it runs a hit test to see which Game
             * Objects are currently below it, or being interacted with it.
             * 
             * Pointers will *always* be checked if they have been moved by the user, or press or released.
             * 
             * This property only controls how often they will be polled if they have not been updated.
             * You should set this if you want to have Game Objects constantly check against the pointers, even
             * if the pointer didn't itself move.
             * 
             * Set to 0 to poll constantly. Set to -1 to only poll on user movement.
             */
            pollRate: number;

            /**
             * The distance, in pixels, a pointer has to move while being held down, before it thinks it is being dragged.
             */
            dragDistanceThreshold: number;

            /**
             * The amount of time, in ms, a pointer has to be held down before it thinks it is dragging.
             * 
             * The default polling rate is to poll only on move so once the time threshold is reached the
             * drag event will not start until you move the mouse. If you want it to start immediately
             * when the time threshold is reached, you must increase the polling rate by calling
             * [setPollAlways]{@linkcode Phaser.Input.InputPlugin#setPollAlways} or
             * [setPollRate]{@linkcode Phaser.Input.InputPlugin#setPollRate}.
             */
            dragTimeThreshold: number;

            /**
             * Checks to see if the Input Manager, this plugin and the Scene to which it belongs are all active and input enabled.undefined
             * @returns `true` if the plugin and the Scene it belongs to is active.
             */
            isActive(): boolean;

            /**
             * Sets a custom cursor on the parent canvas element of the game, based on the `cursor`
             * setting of the given Interactive Object (i.e. a Sprite).
             * 
             * See the CSS property `cursor` for more information on MDN:
             * 
             * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
             * @param interactiveObject The Interactive Object that will set the cursor on the canvas.
             */
            setCursor(interactiveObject: Phaser.Types.Input.InteractiveObject): void;

            /**
             * Forces the Input Manager to clear the custom or hand cursor, regardless of the
             * interactive state of any Game Objects.
             */
            resetCursor(): void;

            /**
             * This is called automatically by the Input Manager.
             * It emits events for plugins to listen to and also handles polling updates, if enabled.
             * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
             * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
             * @returns `true` if the plugin and the Scene it belongs to is active.
             */
            updatePoll(time: number, delta: number): boolean;

            /**
             * Clears a Game Object so it no longer has an Interactive Object associated with it.
             * The Game Object is then queued for removal from the Input Plugin on the next update.
             * @param gameObject The Game Object that will have its Interactive Object removed.
             * @param skipQueue Skip adding this Game Object into the removal queue? Default false.
             * @returns The Game Object that had its Interactive Object removed.
             */
            clear(gameObject: Phaser.GameObjects.GameObject, skipQueue?: boolean): Phaser.GameObjects.GameObject;

            /**
             * Disables Input on a single Game Object.
             * 
             * An input disabled Game Object still retains its Interactive Object component and can be re-enabled
             * at any time, by passing it to `InputPlugin.enable`.
             * @param gameObject The Game Object to have its input system disabled.
             * @param resetCursor Reset the cursor to the default? Default false.
             * @returns This Input Plugin.
             */
            disable(gameObject: Phaser.GameObjects.GameObject, resetCursor?: boolean): this;

            /**
             * Enable a Game Object for interaction.
             * 
             * If the Game Object already has an Interactive Object component, it is enabled and returned.
             * 
             * Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property.
             * 
             * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area
             * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced
             * input detection.
             * 
             * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If
             * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific
             * shape for it to use.
             * 
             * You can also provide an Input Configuration Object as the only argument to this method.
             * @param gameObject The Game Object to be enabled for input.
             * @param hitArea Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
             * @param hitAreaCallback The 'contains' function to invoke to check if the pointer is within the hit area.
             * @param dropZone Is this Game Object a drop zone or not? Default false.
             * @returns This Input Plugin.
             */
            enable(gameObject: Phaser.GameObjects.GameObject, hitArea?: Phaser.Types.Input.InputConfiguration | any, hitAreaCallback?: Phaser.Types.Input.HitAreaCallback, dropZone?: boolean): this;

            /**
             * Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects
             * it is currently above.
             * 
             * The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple
             * cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list.
             * @param pointer The Pointer to check against the Game Objects.
             * @returns An array of all the interactive Game Objects the Pointer was above.
             */
            hitTestPointer(pointer: Phaser.Input.Pointer): Phaser.GameObjects.GameObject[];

            /**
             * Returns the drag state of the given Pointer for this Input Plugin.
             * 
             * The state will be one of the following:
             * 
             * 0 = Not dragging anything
             * 1 = Primary button down and objects below, so collect a draglist
             * 2 = Pointer being checked if meets drag criteria
             * 3 = Pointer meets criteria, notify the draglist
             * 4 = Pointer actively dragging the draglist and has moved
             * 5 = Pointer actively dragging but has been released, notify draglist
             * @param pointer The Pointer to get the drag state for.
             * @returns The drag state of the given Pointer.
             */
            getDragState(pointer: Phaser.Input.Pointer): number;

            /**
             * Sets the drag state of the given Pointer for this Input Plugin.
             * 
             * The state must be one of the following values:
             * 
             * 0 = Not dragging anything
             * 1 = Primary button down and objects below, so collect a draglist
             * 2 = Pointer being checked if meets drag criteria
             * 3 = Pointer meets criteria, notify the draglist
             * 4 = Pointer actively dragging the draglist and has moved
             * 5 = Pointer actively dragging but has been released, notify draglist
             * @param pointer The Pointer to set the drag state for.
             * @param state The drag state value. An integer between 0 and 5.
             */
            setDragState(pointer: Phaser.Input.Pointer, state: number): void;

            /**
             * This method will force the given Game Object into the 'down' input state.
             * 
             * This will check to see if the Game Object is enabled for input, and if so,
             * it will emit the `GAMEOBJECT_POINTER_DOWN` event for it. If that doesn't change
             * the input state, it will then emit the `GAMEOBJECT_DOWN` event.
             * 
             * The Game Object is not checked against the Pointer to see if it can enter this state,
             * that is up to you to do before calling this method.
             * @param pointer The pointer to use when setting the state.
             * @param gameObject The Game Object to have its state set.
             */
            forceDownState(pointer: Phaser.Input.Pointer, gameObject: Phaser.GameObjects.GameObject): void;

            /**
             * This method will force the given Game Object into the 'up' input state.
             * 
             * This will check to see if the Game Object is enabled for input, and if so,
             * it will emit the `GAMEOBJECT_POINTER_UP` event for it. If that doesn't change
             * the input state, it will then emit the `GAMEOBJECT_UP` event.
             * 
             * The Game Object is not checked against the Pointer to see if it can enter this state,
             * that is up to you to do before calling this method.
             * @param pointer The pointer to use when setting the state.
             * @param gameObject The Game Object to have its state set.
             */
            forceUpState(pointer: Phaser.Input.Pointer, gameObject: Phaser.GameObjects.GameObject): void;

            /**
             * This method will force the given Game Object into the 'over' input state.
             * 
             * This will check to see if the Game Object is enabled for input, and if so,
             * it will emit the `GAMEOBJECT_POINTER_OVER` event for it. If that doesn't change
             * the input state, it will then emit the `GAMEOBJECT_OVER` event.
             * 
             * The Game Object is not checked against the Pointer to see if it can enter this state,
             * that is up to you to do before calling this method.
             * @param pointer The pointer to use when setting the state.
             * @param gameObject The Game Object to have its state set.
             */
            forceOverState(pointer: Phaser.Input.Pointer, gameObject: Phaser.GameObjects.GameObject): void;

            /**
             * This method will force the given Game Object into the 'out' input state.
             * 
             * This will check to see if the Game Object is enabled for input, and if so,
             * it will emit the `GAMEOBJECT_POINTER_OUT` event for it. If that doesn't change
             * the input state, it will then emit the `GAMEOBJECT_OUT` event.
             * 
             * The Game Object is not checked against the Pointer to see if it can enter this state,
             * that is up to you to do before calling this method.
             * @param pointer The pointer to use when setting the state.
             * @param gameObject The Game Object to have its state set.
             */
            forceOutState(pointer: Phaser.Input.Pointer, gameObject: Phaser.GameObjects.GameObject): void;

            /**
             * This method will force the given Game Object into the given input state.
             * @param pointer The pointer to use when setting the state.
             * @param gameObject The Game Object to have its state set.
             * @param gameObjectEvent The event to emit on the Game Object.
             * @param inputPluginEvent The event to emit on the Input Plugin.
             * @param setCursor Should the cursor be set to the Game Object's cursor? Default false.
             */
            forceState(pointer: Phaser.Input.Pointer, gameObject: Phaser.GameObjects.GameObject, gameObjectEvent: string, inputPluginEvent: string, setCursor?: boolean): void;

            /**
             * Sets the draggable state of the given array of Game Objects.
             * 
             * They can either be set to be draggable, or can have their draggable state removed by passing `false`.
             * 
             * A Game Object will not fire drag events unless it has been specifically enabled for drag.
             * @param gameObjects An array of Game Objects to change the draggable state on.
             * @param value Set to `true` if the Game Objects should be made draggable, `false` if they should be unset. Default true.
             * @returns This InputPlugin object.
             */
            setDraggable(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], value?: boolean): this;

            /**
             * Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle
             * pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them.
             * 
             * The following will create a sprite that is clickable on any pixel that has an alpha value >= 1.
             * 
             * ```javascript
             * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect());
             * ```
             * 
             * The following will create a sprite that is clickable on any pixel that has an alpha value >= 150.
             * 
             * ```javascript
             * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150));
             * ```
             * 
             * Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up,
             * dragstart, drag, etc.
             * 
             * As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from
             * the given coordinates and checking its color values. This is an expensive process, so should only be enabled on
             * Game Objects that really need it.
             * 
             * You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText,
             * Render Textures, Text, Tilemaps, Containers or Particles.
             * @param alphaTolerance The alpha level that the pixel should be above to be included as a successful interaction. Default 1.
             * @returns A Pixel Perfect Handler for use as a hitArea shape callback.
             */
            makePixelPerfect(alphaTolerance?: number): Function;

            /**
             * Sets the hit area for the given array of Game Objects.
             * 
             * A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle`
             * or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback.
             * 
             * If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible
             * to calculate.
             * 
             * The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if
             * those values fall within the area of the shape or not. All of the Phaser geometry objects provide this,
             * such as `Phaser.Geom.Rectangle.Contains`.
             * 
             * A hit area callback can be supplied to the `hitArea` parameter without using the `hitAreaCallback` parameter.
             * @param gameObjects An array of Game Objects to set the hit area on.
             * @param hitArea Either an input configuration object, a geometric shape that defines the hit area or a hit area callback. If not specified a Rectangle hit area will be used.
             * @param hitAreaCallback The 'contains' function to invoke to check if the pointer is within the hit area.
             * @returns This InputPlugin object.
             */
            setHitArea(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], hitArea?: Phaser.Types.Input.InputConfiguration | Phaser.Types.Input.HitAreaCallback | any, hitAreaCallback?: Phaser.Types.Input.HitAreaCallback): this;

            /**
             * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using
             * the given coordinates and radius to control its position and size.
             * @param gameObjects An array of Game Objects to set as having a circle hit area.
             * @param x The center of the circle.
             * @param y The center of the circle.
             * @param radius The radius of the circle.
             * @param callback The hit area callback. If undefined it uses Circle.Contains.
             * @returns This InputPlugin object.
             */
            setHitAreaCircle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, radius: number, callback?: Phaser.Types.Input.HitAreaCallback): this;

            /**
             * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using
             * the given coordinates and dimensions to control its position and size.
             * @param gameObjects An array of Game Objects to set as having an ellipse hit area.
             * @param x The center of the ellipse.
             * @param y The center of the ellipse.
             * @param width The width of the ellipse.
             * @param height The height of the ellipse.
             * @param callback The hit area callback. If undefined it uses Ellipse.Contains.
             * @returns This InputPlugin object.
             */
            setHitAreaEllipse(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): this;

            /**
             * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using
             * the Game Objects texture frame to define the position and size of the hit area.
             * @param gameObjects An array of Game Objects to set as having a Rectangle hit area based on their texture frame.
             * @param callback The hit area callback. If undefined it uses Rectangle.Contains.
             * @returns This InputPlugin object.
             */
            setHitAreaFromTexture(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], callback?: Phaser.Types.Input.HitAreaCallback): this;

            /**
             * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using
             * the given coordinates and dimensions to control its position and size.
             * @param gameObjects An array of Game Objects to set as having a rectangular hit area.
             * @param x The top-left of the rectangle.
             * @param y The top-left of the rectangle.
             * @param width The width of the rectangle.
             * @param height The height of the rectangle.
             * @param callback The hit area callback. If undefined it uses Rectangle.Contains.
             * @returns This InputPlugin object.
             */
            setHitAreaRectangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x: number, y: number, width: number, height: number, callback?: Phaser.Types.Input.HitAreaCallback): this;

            /**
             * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using
             * the given coordinates to control the position of its points.
             * @param gameObjects An array of Game Objects to set as having a triangular hit area.
             * @param x1 The x coordinate of the first point of the triangle.
             * @param y1 The y coordinate of the first point of the triangle.
             * @param x2 The x coordinate of the second point of the triangle.
             * @param y2 The y coordinate of the second point of the triangle.
             * @param x3 The x coordinate of the third point of the triangle.
             * @param y3 The y coordinate of the third point of the triangle.
             * @param callback The hit area callback. If undefined it uses Triangle.Contains.
             * @returns This InputPlugin object.
             */
            setHitAreaTriangle(gameObjects: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[], x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, callback?: Phaser.Types.Input.HitAreaCallback): this;

            /**
             * Creates an Input Debug Shape for the given Game Object.
             * 
             * The Game Object must have _already_ been enabled for input prior to calling this method.
             * 
             * This is intended to assist you during development and debugging.
             * 
             * Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input,
             * including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle.
             * 
             * Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work.
             * 
             * The Debug Shape is created and added to the display list and is then kept in sync with the Game Object
             * it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via
             * the Game Object property: `GameObject.input.hitAreaDebug`.
             * 
             * Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape,
             * before creating a new one. If you wish to remove the Debug Shape entirely, you should call the
             * method `InputPlugin.removeDebug`.
             * 
             * Note that the debug shape will only show the outline of the input area. If the input test is using a
             * pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that
             * doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not
             * work.
             * @param gameObject The Game Object to create the input debug shape for.
             * @param color The outline color of the debug shape. Default 0x00ff00.
             * @returns This Input Plugin.
             */
            enableDebug(gameObject: Phaser.GameObjects.GameObject, color?: number): this;

            /**
             * Removes an Input Debug Shape from the given Game Object.
             * 
             * The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`.
             * @param gameObject The Game Object to remove the input debug shape from.
             * @returns This Input Plugin.
             */
            removeDebug(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Sets the Pointers to always poll.
             * 
             * When a pointer is polled it runs a hit test to see which Game Objects are currently below it,
             * or being interacted with it, regardless if the Pointer has actually moved or not.
             * 
             * You should enable this if you want objects in your game to fire over / out events, and the objects
             * are constantly moving, but the pointer may not have. Polling every frame has additional computation
             * costs, especially if there are a large number of interactive objects in your game.undefined
             * @returns This InputPlugin object.
             */
            setPollAlways(): this;

            /**
             * Sets the Pointers to only poll when they are moved or updated.
             * 
             * When a pointer is polled it runs a hit test to see which Game Objects are currently below it,
             * or being interacted with it.undefined
             * @returns This InputPlugin object.
             */
            setPollOnMove(): this;

            /**
             * Sets the poll rate value. This is the amount of time that should have elapsed before a pointer
             * will be polled again. See the `setPollAlways` and `setPollOnMove` methods.
             * @param value The amount of time, in ms, that should elapsed before re-polling the pointers.
             * @returns This InputPlugin object.
             */
            setPollRate(value: number): this;

            /**
             * When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from
             * the top-most Scene in the Scene List. By default, if a Scene receives an input event it will then stop the event
             * from flowing down to any Scenes below it in the Scene list. To disable this behavior call this method with `false`.
             * @param value Set to `true` to stop processing input events on the Scene that receives it, or `false` to let the event continue down the Scene list.
             * @returns This InputPlugin object.
             */
            setGlobalTopOnly(value: boolean): this;

            /**
             * When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from
             * the top-most Game Objects in the Display List.
             * 
             * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one.
             * @param value `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test.
             * @returns This InputPlugin object.
             */
            setTopOnly(value: boolean): this;

            /**
             * Given an array of Game Objects and a Pointer, sort the array and return it,
             * so that the objects are in render order with the lowest at the bottom.
             * @param gameObjects An array of Game Objects to be sorted.
             * @param pointer The Pointer to check against the Game Objects.
             * @returns The sorted array of Game Objects.
             */
            sortGameObjects(gameObjects: Phaser.GameObjects.GameObject[], pointer: Phaser.Input.Pointer): Phaser.GameObjects.GameObject[];

            /**
             * Given an array of Drop Zone Game Objects, sort the array and return it,
             * so that the objects are in depth index order with the lowest at the bottom.
             * @param gameObjects An array of Game Objects to be sorted.
             * @returns The sorted array of Game Objects.
             */
            sortDropZones(gameObjects: Phaser.GameObjects.GameObject[]): Phaser.GameObjects.GameObject[];

            /**
             * This method should be called from within an input event handler, such as `pointerdown`.
             * 
             * When called, it stops the Input Manager from allowing _this specific event_ to be processed by any other Scene
             * not yet handled in the scene list.undefined
             * @returns This InputPlugin object.
             */
            stopPropagation(): this;

            /**
             * Adds new Pointer objects to the Input Manager.
             * 
             * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`.
             * 
             * You can create more either by calling this method, or by setting the `input.activePointers` property
             * in the Game Config, up to a maximum of 10 pointers.
             * 
             * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added
             * via this method.
             * @param quantity The number of new Pointers to create. A maximum of 10 is allowed in total. Default 1.
             * @returns An array containing all of the new Pointer objects that were created.
             */
            addPointer(quantity?: number): Phaser.Input.Pointer[];

            /**
             * Tells the Input system to set a custom cursor.
             * 
             * This cursor will be the default cursor used when interacting with the game canvas.
             * 
             * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.
             * 
             * Any valid CSS cursor value is allowed, including paths to image files, i.e.:
             * 
             * ```javascript
             * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer');
             * ```
             * 
             * Please read about the differences between browsers when it comes to the file formats and sizes they support:
             * 
             * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
             * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property
             * 
             * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support.
             * @param cursor The CSS to be used when setting the default cursor.
             * @returns This Input instance.
             */
            setDefaultCursor(cursor: string): this;

            /**
             * Loops through all of the Input Manager Pointer instances and calls `reset` on them.
             * 
             * Use this function if you find that input has been stolen from Phaser via a 3rd
             * party component, such as Vue, and you need to tell Phaser to reset the Pointer states.
             */
            resetPointers(): void;

            /**
             * The x coordinate of the ActivePointer based on the first camera in the camera list.
             * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch.
             */
            readonly x: number;

            /**
             * The y coordinate of the ActivePointer based on the first camera in the camera list.
             * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch.
             */
            readonly y: number;

            /**
             * Are any mouse or touch pointers currently over the game canvas?
             */
            readonly isOver: boolean;

            /**
             * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_.
             * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer`
             * which will always map to the most recently interacted pointer.
             */
            readonly mousePointer: Phaser.Input.Pointer;

            /**
             * The current active input Pointer.
             */
            readonly activePointer: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object. This is the first pointer created by Phaser and is available by default,
             * alongside the `mousePointer`.
             */
            readonly pointer1: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object.
             * This will be `undefined` by default unless you add a new Pointer using `addPointer`.
             */
            readonly pointer2: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object.
             * This will be `undefined` by default unless you add a new Pointer using `addPointer`.
             */
            readonly pointer3: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object.
             * This will be `undefined` by default unless you add a new Pointer using `addPointer`.
             */
            readonly pointer4: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object.
             * This will be `undefined` by default unless you add a new Pointer using `addPointer`.
             */
            readonly pointer5: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object.
             * This will be `undefined` by default unless you add a new Pointer using `addPointer`.
             */
            readonly pointer6: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object.
             * This will be `undefined` by default unless you add a new Pointer using `addPointer`.
             */
            readonly pointer7: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object.
             * This will be `undefined` by default unless you add a new Pointer using `addPointer`.
             */
            readonly pointer8: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object.
             * This will be `undefined` by default unless you add a new Pointer using `addPointer`.
             */
            readonly pointer9: Phaser.Input.Pointer;

            /**
             * A touch-based Pointer object.
             * This will be `undefined` by default unless you add a new Pointer using `addPointer`.
             */
            readonly pointer10: Phaser.Input.Pointer;

            /**
             * An instance of the Gamepad Plugin class, if enabled via the `input.gamepad` Scene or Game Config property.
             * Use this to access Gamepads connected to the browser and respond to gamepad buttons.
             */
            gamepad: Phaser.Input.Gamepad.GamepadPlugin | null;

            /**
             * An instance of the Keyboard Plugin class, if enabled via the `input.keyboard` Scene or Game Config property.
             * Use this to create Key objects and listen for keyboard specific events.
             */
            keyboard: Phaser.Input.Keyboard.KeyboardPlugin | null;

        }

        namespace InputPluginCache {
            /**
             * Static method called directly by the core internal plugins.
             * Key is a reference used to get the plugin from the input plugin cache.
             * Plugin is the object to instantiate to create the plugin.
             * Mapping is the property key used when the plugin is injected into the Input Plugin (e.g. `input`).
             * @param key A reference used to get this plugin from the plugin cache.
             * @param plugin The plugin to be stored. Should be the core object, not instantiated.
             * @param mapping If this plugin is to be injected into the Input Plugin, this is the property key used.
             * @param settingsKey The key in the Scene Settings to check to see if this plugin should install or not.
             * @param configKey The key in the Game Config to check to see if this plugin should install or not.
             */
            function register(key: string, plugin: Function, mapping: string, settingsKey: string, configKey: string): void;

            /**
             * Returns the input plugin object from the cache based on the given key.
             * @param key The key of the input plugin to get.
             * @returns The input plugin object.
             */
            function getPlugin(key: string): Phaser.Types.Input.InputPluginContainer;

            /**
             * Installs all of the registered Input Plugins into the given target.
             * @param target The target InputPlugin to install the plugins into.
             */
            function install(target: Phaser.Input.InputPlugin): void;

            /**
             * Removes an input plugin based on the given key.
             * @param key The key of the input plugin to remove.
             */
            function remove(key: string): void;

        }

        /**
         * A Pointer object encapsulates both mouse and touch input within Phaser.
         * 
         * By default, Phaser will create 2 pointers for your game to use. If you require more, i.e. for a multi-touch
         * game, then use the `InputPlugin.addPointer` method to do so, rather than instantiating this class directly,
         * otherwise it won't be managed by the input system.
         * 
         * You can reference the current active pointer via `InputPlugin.activePointer`. You can also use the properties
         * `InputPlugin.pointer1` through to `pointer10`, for each pointer you have enabled in your game.
         * 
         * The properties of this object are set by the Input Plugin during processing. This object is then sent in all
         * input related events that the Input Plugin emits, so you can reference properties from it directly in your
         * callbacks.
         */
        class Pointer {
            /**
             * 
             * @param manager A reference to the Input Manager.
             * @param id The internal ID of this Pointer.
             */
            constructor(manager: Phaser.Input.InputManager, id: number);

            /**
             * A reference to the Input Manager.
             */
            manager: Phaser.Input.InputManager;

            /**
             * The internal ID of this Pointer.
             */
            readonly id: number;

            /**
             * The most recent native DOM Event this Pointer has processed.
             */
            event: TouchEvent | MouseEvent | WheelEvent;

            /**
             * The DOM element the Pointer was pressed down on, taken from the DOM event.
             * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element.
             */
            readonly downElement: any;

            /**
             * The DOM element the Pointer was released on, taken from the DOM event.
             * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element.
             */
            readonly upElement: any;

            /**
             * The camera the Pointer interacted with during its last update.
             * 
             * A Pointer can only ever interact with one camera at once, which will be the top-most camera
             * in the list should multiple cameras be positioned on-top of each other.
             */
            camera: Phaser.Cameras.Scene2D.Camera;

            /**
             * A read-only property that indicates which button was pressed, or released, on the pointer
             * during the most recent event. It is only set during `up` and `down` events.
             * 
             * On Touch devices the value is always 0.
             * 
             * Users may change the configuration of buttons on their pointing device so that if an event's button property
             * is zero, it may not have been caused by the button that is physically left–most on the pointing device;
             * however, it should behave as if the left button was clicked in the standard button layout.
             */
            readonly button: number;

            /**
             * A bitmask representing which mouse buttons are currently held down. The possible values are:
             * 
             * 0: No button or un-initialized
             * 1: Left button
             * 2: Right button
             * 4: Wheel button or middle button
             * 8: 4th button (typically the "Browser Back" button)
             * 16: 5th button (typically the "Browser Forward" button)
             * 
             * For a mouse configured for left-handed use, the button actions are reversed.
             * In this case, the values are read from right to left.
             */
            buttons: number;

            /**
             * The position of the Pointer in screen space.
             */
            readonly position: Phaser.Math.Vector2;

            /**
             * The previous position of the Pointer in screen space.
             * 
             * The old x and y values are stored in here during the InputManager.transformPointer call.
             * 
             * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition.
             */
            readonly prevPosition: Phaser.Math.Vector2;

            /**
             * The current velocity of the Pointer, based on its current and previous positions.
             * 
             * This value is smoothed out each frame, according to the `motionFactor` property.
             * 
             * This property is updated whenever the Pointer moves, regardless of any button states. In other words,
             * it changes based on movement alone - a button doesn't have to be pressed first.
             */
            readonly velocity: Phaser.Math.Vector2;

            /**
             * The current angle the Pointer is moving, in radians, based on its previous and current position.
             * 
             * The angle is based on the old position facing to the current position.
             * 
             * This property is updated whenever the Pointer moves, regardless of any button states. In other words,
             * it changes based on movement alone - a button doesn't have to be pressed first.
             */
            readonly angle: number;

            /**
             * The distance the Pointer has moved, based on its previous and current position.
             * 
             * This value is smoothed out each frame, according to the `motionFactor` property.
             * 
             * This property is updated whenever the Pointer moves, regardless of any button states. In other words,
             * it changes based on movement alone - a button doesn't have to be pressed first.
             * 
             * If you need the total distance travelled since the primary button was pressed down,
             * then use the `Pointer.getDistance` method.
             */
            readonly distance: number;

            /**
             * The smoothing factor to apply to the Pointer position.
             * 
             * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions
             * then you can set this value to apply an automatic smoothing to the positions as they are recorded.
             * 
             * The default value of zero means 'no smoothing'.
             * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this
             * value directly, or by setting the `input.smoothFactor` property in the Game Config.
             * 
             * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position
             * is always precise, and not smoothed.
             */
            smoothFactor: number;

            /**
             * The factor applied to the motion smoothing each frame.
             * 
             * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity,
             * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current
             * position of the Pointer. 0.2 provides a good average but can be increased if you need a
             * quicker update and are working in a high performance environment. Never set this value to
             * zero.
             */
            motionFactor: number;

            /**
             * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.
             * 
             * If you wish to use this value _outside_ of an input event handler then you should update it first by calling
             * the `Pointer.updateWorldPoint` method.
             */
            worldX: number;

            /**
             * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.
             * 
             * If you wish to use this value _outside_ of an input event handler then you should update it first by calling
             * the `Pointer.updateWorldPoint` method.
             */
            worldY: number;

            /**
             * Time when this Pointer was most recently moved (regardless of the state of its buttons, if any).
             */
            moveTime: number;

            /**
             * X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.
             */
            downX: number;

            /**
             * Y coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.
             */
            downY: number;

            /**
             * The Event timestamp when the first button, or Touch input, was pressed. Used for dragging objects.
             */
            downTime: number;

            /**
             * X coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects.
             */
            upX: number;

            /**
             * Y coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects.
             */
            upY: number;

            /**
             * The Event timestamp when the final button, or Touch input, was released. Used for dragging objects.
             */
            upTime: number;

            /**
             * Is the primary button down? (usually button 0, the left mouse button)
             */
            primaryDown: boolean;

            /**
             * Is _any_ button on this pointer considered as being down?
             */
            isDown: boolean;

            /**
             * Did the previous input event come from a Touch input (true) or Mouse? (false)
             */
            wasTouch: boolean;

            /**
             * Did this Pointer get canceled by a touchcancel event?
             * 
             * Note: "canceled" is the American-English spelling of "cancelled". Please don't submit PRs correcting it!
             */
            wasCanceled: boolean;

            /**
             * If the mouse is locked, the horizontal relative movement of the Pointer in pixels since last frame.
             */
            movementX: number;

            /**
             * If the mouse is locked, the vertical relative movement of the Pointer in pixels since last frame.
             */
            movementY: number;

            /**
             * The identifier property of the Pointer as set by the DOM event when this Pointer is started.
             */
            identifier: number;

            /**
             * The pointerId property of the Pointer as set by the DOM event when this Pointer is started.
             * The browser can and will recycle this value.
             */
            pointerId: number;

            /**
             * An active Pointer is one that is currently pressed down on the display.
             * A Mouse is always considered as active.
             */
            active: boolean;

            /**
             * Is this pointer Pointer Locked?
             * 
             * Only a mouse pointer can be locked and it only becomes locked when requested via
             * the browsers Pointer Lock API.
             * 
             * You can request this by calling the `this.input.mouse.requestPointerLock()` method from
             * a `pointerdown` or `pointerup` event handler.
             */
            readonly locked: boolean;

            /**
             * The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.
             */
            deltaX: number;

            /**
             * The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device.
             * This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.
             */
            deltaY: number;

            /**
             * The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.
             */
            deltaZ: number;

            /**
             * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are
             * the result of a translation through the given Camera.
             * 
             * Note that the values will be automatically replaced the moment the Pointer is
             * updated by an input event, such as a mouse move, so should be used immediately.
             * @param camera The Camera which is being tested against.
             * @returns This Pointer object.
             */
            updateWorldPoint(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Takes a Camera and returns a Vector2 containing the translated position of this Pointer
             * within that Camera. This can be used to convert this Pointers position into camera space.
             * @param camera The Camera to use for the translation.
             * @param output A Vector2-like object in which to store the translated position.
             * @returns A Vector2 containing the translated coordinates of this Pointer, based on the given camera.
             */
            positionToCamera(camera: Phaser.Cameras.Scene2D.Camera, output?: Phaser.Math.Vector2 | object): Phaser.Math.Vector2 | object;

            /**
             * Checks to see if any buttons are being held down on this Pointer.undefined
             * @returns `true` if no buttons are being held down.
             */
            noButtonDown(): boolean;

            /**
             * Checks to see if the left button is being held down on this Pointer.undefined
             * @returns `true` if the left button is being held down.
             */
            leftButtonDown(): boolean;

            /**
             * Checks to see if the right button is being held down on this Pointer.undefined
             * @returns `true` if the right button is being held down.
             */
            rightButtonDown(): boolean;

            /**
             * Checks to see if the middle button is being held down on this Pointer.undefined
             * @returns `true` if the middle button is being held down.
             */
            middleButtonDown(): boolean;

            /**
             * Checks to see if the back button is being held down on this Pointer.undefined
             * @returns `true` if the back button is being held down.
             */
            backButtonDown(): boolean;

            /**
             * Checks to see if the forward button is being held down on this Pointer.undefined
             * @returns `true` if the forward button is being held down.
             */
            forwardButtonDown(): boolean;

            /**
             * Checks to see if the release of the left button was the most recent activity on this Pointer.undefined
             * @returns `true` if the release of the left button was the most recent activity on this Pointer.
             */
            leftButtonReleased(): boolean;

            /**
             * Checks to see if the release of the right button was the most recent activity on this Pointer.undefined
             * @returns `true` if the release of the right button was the most recent activity on this Pointer.
             */
            rightButtonReleased(): boolean;

            /**
             * Checks to see if the release of the middle button was the most recent activity on this Pointer.undefined
             * @returns `true` if the release of the middle button was the most recent activity on this Pointer.
             */
            middleButtonReleased(): boolean;

            /**
             * Checks to see if the release of the back button was the most recent activity on this Pointer.undefined
             * @returns `true` if the release of the back button was the most recent activity on this Pointer.
             */
            backButtonReleased(): boolean;

            /**
             * Checks to see if the release of the forward button was the most recent activity on this Pointer.undefined
             * @returns `true` if the release of the forward button was the most recent activity on this Pointer.
             */
            forwardButtonReleased(): boolean;

            /**
             * If the Pointer has a button pressed down at the time this method is called, it will return the
             * distance between the Pointer's `downX` and `downY` values and the current position.
             * 
             * If no button is held down, it will return the last recorded distance, based on where
             * the Pointer was when the button was released.
             * 
             * If you wish to get the distance being travelled currently, based on the velocity of the Pointer,
             * then see the `Pointer.distance` property.undefined
             * @returns The distance the Pointer moved.
             */
            getDistance(): number;

            /**
             * If the Pointer has a button pressed down at the time this method is called, it will return the
             * horizontal distance between the Pointer's `downX` value and the current `x` position.
             * 
             * If no button is held down, it will return the last recorded horizontal distance, based on where
             * the Pointer was when the button was released.undefined
             * @returns The horizontal distance the Pointer moved.
             */
            getDistanceX(): number;

            /**
             * If the Pointer has a button pressed down at the time this method is called, it will return the
             * vertical distance between the Pointer's `downY` value and the current `y` position.
             * 
             * If no button is held down, it will return the last recorded vertical distance, based on where
             * the Pointer was when the button was released.undefined
             * @returns The vertical distance the Pointer moved.
             */
            getDistanceY(): number;

            /**
             * If the Pointer has a button pressed down at the time this method is called, it will return the
             * duration since the button was pressed down.
             * 
             * If no button is held down, it will return the last recorded duration, based on the time
             * the last button on the Pointer was released.undefined
             * @returns The duration the Pointer was held down for in milliseconds.
             */
            getDuration(): number;

            /**
             * If the Pointer has a button pressed down at the time this method is called, it will return the
             * angle between the Pointer's `downX` and `downY` values and the current position.
             * 
             * If no button is held down, it will return the last recorded angle, based on where
             * the Pointer was when the button was released.
             * 
             * The angle is based on the old position facing to the current position.
             * 
             * If you wish to get the current angle, based on the velocity of the Pointer, then
             * see the `Pointer.angle` property.undefined
             * @returns The angle between the Pointer's coordinates in radians.
             */
            getAngle(): number;

            /**
             * Takes the previous and current Pointer positions and then generates an array of interpolated values between
             * the two. The array will be populated up to the size of the `steps` argument.
             * 
             * ```javascript
             * var points = pointer.getInterpolatedPosition(4);
             * 
             * // points[0] = { x: 0, y: 0 }
             * // points[1] = { x: 2, y: 1 }
             * // points[2] = { x: 3, y: 2 }
             * // points[3] = { x: 6, y: 3 }
             * ```
             * 
             * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer
             * events can often fire faster than the main browser loop, and this will help you avoid janky movement
             * especially if you have an object following a Pointer.
             * 
             * Note that if you provide an output array it will only be populated up to the number of steps provided.
             * It will not clear any previous data that may have existed beyond the range of the steps count.
             * 
             * Internally it uses the Smooth Step interpolation calculation.
             * @param steps The number of interpolation steps to use. Default 10.
             * @param out An array to store the results in. If not provided a new one will be created.
             * @returns An array of interpolated values.
             */
            getInterpolatedPosition(steps?: number, out?: any[]): any[];

            /**
             * Fully reset this Pointer back to its uninitialized state.
             */
            reset(): void;

            /**
             * Destroys this Pointer instance and resets its external references.
             */
            destroy(): void;

            /**
             * The x position of this Pointer.
             * The value is in screen space.
             * See `worldX` to get a camera converted position.
             */
            x: number;

            /**
             * The y position of this Pointer.
             * The value is in screen space.
             * See `worldY` to get a camera converted position.
             */
            y: number;

            /**
             * Time when this Pointer was most recently updated by a DOM Event.
             * This comes directly from the `event.timeStamp` property.
             * If no event has yet taken place, it will return zero.
             */
            readonly time: number;

        }

        /**
         * The mouse pointer button has been pressed down.
         */
        var MOUSE_DOWN: number;

        /**
         * The mouse pointer is being moved.
         */
        var MOUSE_MOVE: number;

        /**
         * The mouse pointer is released.
         */
        var MOUSE_UP: number;

        /**
         * A touch pointer has been started.
         */
        var TOUCH_START: number;

        /**
         * A touch pointer has been moved.
         */
        var TOUCH_MOVE: number;

        /**
         * A touch pointer has ended.
         */
        var TOUCH_END: number;

        /**
         * The pointer lock has changed.
         */
        var POINTER_LOCK_CHANGE: number;

        /**
         * A touch pointer has been cancelled by the browser.
         */
        var TOUCH_CANCEL: number;

        /**
         * The mouse wheel has changed.
         */
        var MOUSE_WHEEL: number;

        namespace Events {
            /**
             * The Input Plugin Boot Event.
             * 
             * This internal event is dispatched by the Input Plugin when it boots, signalling to all of its systems to create themselves.
             */
            const BOOT: string;

            /**
             * The Input Plugin Destroy Event.
             * 
             * This internal event is dispatched by the Input Plugin when it is destroyed, signalling to all of its systems to destroy themselves.
             */
            const DESTROY: string;

            /**
             * The Pointer Drag End Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer stops dragging a Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('dragend', listener)`.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_END]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_END} event instead.
             */
            const DRAG_END: string;

            /**
             * The Pointer Drag Enter Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object into a Drag Target.
             * 
             * Listen to this event from within a Scene using: `this.input.on('dragenter', listener)`.
             * 
             * A Pointer can only drag a single Game Object at once.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_ENTER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_ENTER} event instead.
             */
            const DRAG_ENTER: string;

            /**
             * The Pointer Drag Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves while dragging a Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('drag', listener)`.
             * 
             * A Pointer can only drag a single Game Object at once.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG} event instead.
             */
            const DRAG: string;

            /**
             * The Pointer Drag Leave Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object out of a Drag Target.
             * 
             * Listen to this event from within a Scene using: `this.input.on('dragleave', listener)`.
             * 
             * A Pointer can only drag a single Game Object at once.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_LEAVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_LEAVE} event instead.
             */
            const DRAG_LEAVE: string;

            /**
             * The Pointer Drag Over Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object over a Drag Target.
             * 
             * When the Game Object first enters the drag target it will emit a `dragenter` event. If it then moves while within
             * the drag target, it will emit this event instead.
             * 
             * Listen to this event from within a Scene using: `this.input.on('dragover', listener)`.
             * 
             * A Pointer can only drag a single Game Object at once.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_OVER} event instead.
             */
            const DRAG_OVER: string;

            /**
             * The Pointer Drag Start Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer starts to drag any Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('dragstart', listener)`.
             * 
             * A Pointer can only drag a single Game Object at once.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_START]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_START} event instead.
             */
            const DRAG_START: string;

            /**
             * The Pointer Drop Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drops a Game Object on a Drag Target.
             * 
             * Listen to this event from within a Scene using: `this.input.on('drop', listener)`.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DROP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DROP} event instead.
             */
            const DROP: string;

            /**
             * The Game Object Down Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down on _any_ interactive Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('gameobjectdown', listener)`.
             * 
             * To receive this event, the Game Objects must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN} event instead.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}
             * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}
             * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_DOWN: string;

            /**
             * The Game Object Drag End Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer stops dragging it.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('dragend', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive and enabled for drag.
             * See [GameObject.setInteractive](Phaser.GameObjects.GameObject#setInteractive) for more details.
             */
            const GAMEOBJECT_DRAG_END: string;

            /**
             * The Game Object Drag Enter Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer drags it into a drag target.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('dragenter', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive and enabled for drag.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             */
            const GAMEOBJECT_DRAG_ENTER: string;

            /**
             * The Game Object Drag Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer moves while dragging it.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('drag', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive and enabled for drag.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             */
            const GAMEOBJECT_DRAG: string;

            /**
             * The Game Object Drag Leave Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer drags it out of a drag target.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('dragleave', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive and enabled for drag.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             */
            const GAMEOBJECT_DRAG_LEAVE: string;

            /**
             * The Game Object Drag Over Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer drags it over a drag target.
             * 
             * When the Game Object first enters the drag target it will emit a `dragenter` event. If it then moves while within
             * the drag target, it will emit this event instead.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('dragover', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive and enabled for drag.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             */
            const GAMEOBJECT_DRAG_OVER: string;

            /**
             * The Game Object Drag Start Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer starts to drag it.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('dragstart', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive and enabled for drag.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * There are lots of useful drag related properties that are set within the Game Object when dragging occurs.
             * For example, `gameObject.input.dragStartX`, `dragStartY` and so on.
             */
            const GAMEOBJECT_DRAG_START: string;

            /**
             * The Game Object Drop Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer drops it on a Drag Target.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('drop', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive and enabled for drag.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             */
            const GAMEOBJECT_DROP: string;

            /**
             * The Game Object Move Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is moved across _any_ interactive Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('gameobjectmove', listener)`.
             * 
             * To receive this event, the Game Objects must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE} event instead.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}
             * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}
             * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_MOVE: string;

            /**
             * The Game Object Out Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of _any_ interactive Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('gameobjectout', listener)`.
             * 
             * To receive this event, the Game Objects must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT} event instead.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}
             * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}
             * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             * 
             * If the pointer leaves the game canvas itself, it will not trigger this event. To handle those cases,
             * please listen for the [GAME_OUT]{@linkcode Phaser.Input.Events#event:GAME_OUT} event.
             */
            const GAMEOBJECT_OUT: string;

            /**
             * The Game Object Over Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves over _any_ interactive Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('gameobjectover', listener)`.
             * 
             * To receive this event, the Game Objects must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER} event instead.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}
             * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}
             * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_OVER: string;

            /**
             * The Game Object Pointer Down Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer is pressed down on it.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('pointerdown', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}
             * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}
             * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_POINTER_DOWN: string;

            /**
             * The Game Object Pointer Move Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer is moved while over it.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('pointermove', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}
             * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}
             * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_POINTER_MOVE: string;

            /**
             * The Game Object Pointer Out Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer moves out of it.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('pointerout', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}
             * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}
             * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             * 
             * If the pointer leaves the game canvas itself, it will not trigger this event. To handle those cases,
             * please listen for the [GAME_OUT]{@linkcode Phaser.Input.Events#event:GAME_OUT} event.
             */
            const GAMEOBJECT_POINTER_OUT: string;

            /**
             * The Game Object Pointer Over Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer moves over it.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('pointerover', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}
             * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}
             * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_POINTER_OVER: string;

            /**
             * The Game Object Pointer Up Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer is released while over it.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('pointerup', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}
             * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}
             * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_POINTER_UP: string;

            /**
             * The Game Object Pointer Wheel Event.
             * 
             * This event is dispatched by an interactive Game Object if a pointer has its wheel moved while over it.
             * 
             * Listen to this event from a Game Object using: `gameObject.on('wheel', listener)`.
             * Note that the scope of the listener is automatically set to be the Game Object instance itself.
             * 
             * To receive this event, the Game Object must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}
             * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}
             * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_POINTER_WHEEL: string;

            /**
             * The Game Object Up Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released while over _any_ interactive Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('gameobjectup', listener)`.
             * 
             * To receive this event, the Game Objects must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP} event instead.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}
             * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}
             * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_UP: string;

            /**
             * The Game Object Wheel Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer has its wheel moved while over _any_ interactive Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('gameobjectwheel', listener)`.
             * 
             * To receive this event, the Game Objects must have been set as interactive.
             * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.
             * 
             * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL} event instead.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}
             * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}
             * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const GAMEOBJECT_WHEEL: string;

            /**
             * The Input Plugin Game Out Event.
             * 
             * This event is dispatched by the Input Plugin if the active pointer leaves the game canvas and is now
             * outside of it, elsewhere on the web page.
             * 
             * Listen to this event from within a Scene using: `this.input.on('gameout', listener)`.
             */
            const GAME_OUT: string;

            /**
             * The Input Plugin Game Over Event.
             * 
             * This event is dispatched by the Input Plugin if the active pointer enters the game canvas and is now
             * over it, having previously been elsewhere on the web page.
             * 
             * Listen to this event from within a Scene using: `this.input.on('gameover', listener)`.
             */
            const GAME_OVER: string;

            /**
             * The Input Manager Boot Event.
             * 
             * This internal event is dispatched by the Input Manager when it boots.
             */
            const MANAGER_BOOT: string;

            /**
             * The Input Manager Process Event.
             * 
             * This internal event is dispatched by the Input Manager when not using the legacy queue system,
             * and it wants the Input Plugins to update themselves.
             */
            const MANAGER_PROCESS: string;

            /**
             * The Input Manager Update Event.
             * 
             * This internal event is dispatched by the Input Manager as part of its update step.
             */
            const MANAGER_UPDATE: string;

            /**
             * The Input Manager Pointer Lock Change Event.
             * 
             * This event is dispatched by the Input Manager when it is processing a native Pointer Lock Change DOM Event.
             */
            const POINTERLOCK_CHANGE: string;

            /**
             * The Pointer Down Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down anywhere.
             * 
             * Listen to this event from within a Scene using: `this.input.on('pointerdown', listener)`.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}
             * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}
             * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const POINTER_DOWN: string;

            /**
             * The Pointer Down Outside Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down anywhere outside of the game canvas.
             * 
             * Listen to this event from within a Scene using: `this.input.on('pointerdownoutside', listener)`.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}
             * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}
             * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const POINTER_DOWN_OUTSIDE: string;

            /**
             * The Pointer Move Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is moved anywhere.
             * 
             * Listen to this event from within a Scene using: `this.input.on('pointermove', listener)`.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}
             * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}
             * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const POINTER_MOVE: string;

            /**
             * The Pointer Out Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of any interactive Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('pointerout', listener)`.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}
             * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}
             * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             * 
             * If the pointer leaves the game canvas itself, it will not trigger this event. To handle those cases,
             * please listen for the [GAME_OUT]{@linkcode Phaser.Input.Events#event:GAME_OUT} event.
             */
            const POINTER_OUT: string;

            /**
             * The Pointer Over Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves over any interactive Game Object.
             * 
             * Listen to this event from within a Scene using: `this.input.on('pointerover', listener)`.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}
             * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}
             * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const POINTER_OVER: string;

            /**
             * The Pointer Up Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released anywhere.
             * 
             * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}
             * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}
             * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const POINTER_UP: string;

            /**
             * The Pointer Up Outside Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released anywhere outside of the game canvas.
             * 
             * Listen to this event from within a Scene using: `this.input.on('pointerupoutside', listener)`.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}
             * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}
             * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const POINTER_UP_OUTSIDE: string;

            /**
             * The Pointer Wheel Input Event.
             * 
             * This event is dispatched by the Input Plugin belonging to a Scene if a pointer has its wheel updated.
             * 
             * Listen to this event from within a Scene using: `this.input.on('wheel', listener)`.
             * 
             * The event hierarchy is as follows:
             * 
             * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}
             * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}
             * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}
             * 
             * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop
             * the propagation of this event.
             */
            const POINTER_WHEEL: string;

            /**
             * The Input Plugin Pre-Update Event.
             * 
             * This internal event is dispatched by the Input Plugin at the start of its `preUpdate` method.
             * This hook is designed specifically for input plugins, but can also be listened to from user-land code.
             */
            const PRE_UPDATE: string;

            /**
             * The Input Plugin Shutdown Event.
             * 
             * This internal event is dispatched by the Input Plugin when it shuts down, signalling to all of its systems to shut themselves down.
             */
            const SHUTDOWN: string;

            /**
             * The Input Plugin Start Event.
             * 
             * This internal event is dispatched by the Input Plugin when it has finished setting-up,
             * signalling to all of its internal systems to start.
             */
            const START: string;

            /**
             * The Input Plugin Update Event.
             * 
             * This internal event is dispatched by the Input Plugin at the start of its `update` method.
             * This hook is designed specifically for input plugins, but can also be listened to from user-land code.
             */
            const UPDATE: string;

        }

        namespace Gamepad {
            /**
             * Represents a single axis on a Gamepad controller, such as one direction of an analog stick.
             * Each axis has a `value` property ranging from -1 to 1 (with 0 as dead center), and a
             * configurable `threshold` below which the value is treated as zero by `getValue()`. Axis
             * objects are created automatically by the Gamepad as they are needed.
             */
            class Axis {
                /**
                 * 
                 * @param pad A reference to the Gamepad that this Axis belongs to.
                 * @param index The index of this Axis.
                 */
                constructor(pad: Phaser.Input.Gamepad.Gamepad, index: number);

                /**
                 * A reference to the Gamepad that this Axis belongs to.
                 */
                pad: Phaser.Input.Gamepad.Gamepad;

                /**
                 * An event emitter to use to emit the axis events.
                 */
                events: Phaser.Events.EventEmitter;

                /**
                 * The index of this Axis.
                 */
                index: number;

                /**
                 * The raw axis value, between -1 and 1 with 0 being dead center.
                 * Use the method `getValue` to get a normalized value with the threshold applied.
                 */
                value: number;

                /**
                 * Movement tolerance threshold below which axis values are ignored in `getValue`.
                 */
                threshold: number;

                /**
                 * Returns the axis value after applying the dead zone threshold. If the absolute value
                 * of the axis is less than `threshold`, zero is returned instead, preventing minor stick
                 * drift from registering as intentional input. Otherwise the raw `value` is returned.undefined
                 * @returns The axis value, adjusted for the movement threshold.
                 */
                getValue(): number;

                /**
                 * Destroys this Axis instance and releases external references it holds.
                 */
                destroy(): void;

            }

            /**
             * Represents a single button on a Gamepad controller. Each Button has a `value` between 0 and 1
             * (supporting analog pressure for triggers) and a `pressed` boolean state. When the value exceeds
             * the configurable `threshold`, the button emits `BUTTON_DOWN` and `GAMEPAD_BUTTON_DOWN` events.
             * Button objects are created automatically by the Gamepad as they are needed.
             */
            class Button {
                /**
                 * 
                 * @param pad A reference to the Gamepad that this Button belongs to.
                 * @param index The index of this Button.
                 * @param isPressed Whether or not the button is already being pressed at creation time.  This prevents the Button from emitting spurious 'down' events at first update. Default false.
                 */
                constructor(pad: Phaser.Input.Gamepad.Gamepad, index: number, isPressed?: boolean);

                /**
                 * A reference to the Gamepad that this Button belongs to.
                 */
                pad: Phaser.Input.Gamepad.Gamepad;

                /**
                 * An event emitter to use to emit the button events.
                 */
                events: Phaser.Events.EventEmitter;

                /**
                 * The index of this Button.
                 */
                index: number;

                /**
                 * The current value of the button, between 0 (fully released) and 1 (fully pressed).
                 * For analog buttons like triggers, this reflects the pressure applied.
                 */
                value: number;

                /**
                 * The minimum value the button must reach before it is considered as being pressed.
                 * The value is between 0 and 1. The default of 1 requires the button to be fully pressed.
                 * For analog buttons such as triggers, you can lower this threshold to detect partial presses.
                 */
                threshold: number;

                /**
                 * Is the Button being pressed down or not?
                 */
                pressed: boolean;

                /**
                 * Destroys this Button instance and releases external references it holds.
                 */
                destroy(): void;

            }

            /**
             * Represents a single connected gamepad controller. Each Gamepad contains Button and Axis
             * objects that are automatically created and updated by the Gamepad Plugin. You can access
             * the directional sticks via the `leftStick` and `rightStick` Vector2 properties, individual
             * buttons via the `buttons` array, and axes via the `axes` array. Gamepads are typically
             * accessed through `this.input.gamepad.pad1` through `pad4` in a Scene.
             */
            class Gamepad extends Phaser.Events.EventEmitter {
                /**
                 * 
                 * @param manager A reference to the Gamepad Plugin.
                 * @param pad The Gamepad object, as extracted from GamepadEvent.
                 */
                constructor(manager: Phaser.Input.Gamepad.GamepadPlugin, pad: Phaser.Types.Input.Gamepad.Pad);

                /**
                 * A reference to the Gamepad Plugin.
                 */
                manager: Phaser.Input.Gamepad.GamepadPlugin;

                /**
                 * A reference to the native Gamepad object that is connected to the browser.
                 */
                pad: any;

                /**
                 * A string containing some information about the controller.
                 * 
                 * This is not strictly specified, but in Firefox it will contain three pieces of information
                 * separated by dashes (-): two 4-digit hexadecimal strings containing the USB vendor and
                 * product id of the controller, and the name of the controller as provided by the driver.
                 * In Chrome it will contain the name of the controller as provided by the driver,
                 * followed by vendor and product 4-digit hexadecimal strings.
                 */
                id: string;

                /**
                 * An integer that is unique for each Gamepad currently connected to the system.
                 * This can be used to distinguish multiple controllers.
                 * Note that disconnecting a device and then connecting a new device may reuse the previous index.
                 */
                index: number;

                /**
                 * An array of Gamepad Button objects, corresponding to the different buttons available on the Gamepad.
                 */
                buttons: Phaser.Input.Gamepad.Button[];

                /**
                 * An array of Gamepad Axis objects, corresponding to the different axes available on the Gamepad, if any.
                 */
                axes: Phaser.Input.Gamepad.Axis[];

                /**
                 * The Gamepad's Haptic Actuator (Vibration / Rumble support).
                 * This is highly experimental and only set if both present on the device,
                 * and exposed by both the hardware and browser.
                 */
                vibration: GamepadHapticActuator;

                /**
                 * A Vector2 containing the most recent values from the Gamepad's left axis stick.
                 * This is updated automatically as part of the Gamepad.update cycle.
                 * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property.
                 * The values are based on the Axis thresholds.
                 * If the Gamepad does not have a left axis stick, the values will always be zero.
                 */
                leftStick: Phaser.Math.Vector2;

                /**
                 * A Vector2 containing the most recent values from the Gamepad's right axis stick.
                 * This is updated automatically as part of the Gamepad.update cycle.
                 * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property.
                 * The values are based on the Axis thresholds.
                 * If the Gamepad does not have a right axis stick, the values will always be zero.
                 */
                rightStick: Phaser.Math.Vector2;

                /**
                 * Gets the total number of axis this Gamepad claims to support.undefined
                 * @returns The total number of axes this Gamepad claims to support.
                 */
                getAxisTotal(): number;

                /**
                 * Gets the value of an axis based on the given index.
                 * The index must be valid within the range of axes supported by this Gamepad.
                 * The return value will be a float between -1 and 1.
                 * @param index The index of the axes to get the value for.
                 * @returns The value of the axis, between -1 and 1.
                 */
                getAxisValue(index: number): number;

                /**
                 * Sets the threshold value of all axis on this Gamepad.
                 * The value is a float between 0 and 1 and is the amount below which the axis is considered as not having been moved.
                 * @param value A value between 0 and 1.
                 */
                setAxisThreshold(value: number): void;

                /**
                 * Gets the total number of buttons this Gamepad claims to have.undefined
                 * @returns The total number of buttons this Gamepad claims to have.
                 */
                getButtonTotal(): number;

                /**
                 * Gets the value of a button based on the given index.
                 * The index must be valid within the range of buttons supported by this Gamepad.
                 * 
                 * The return value will be either 0 or 1 for a digital button, or a float between 0 and 1
                 * for a pressure-sensitive analogue button, such as the shoulder buttons on a Dual Shock.
                 * @param index The index of the button to get the value for.
                 * @returns The value of the button, between 0 and 1.
                 */
                getButtonValue(index: number): number;

                /**
                 * Returns if the button is pressed down or not.
                 * The index must be valid within the range of buttons supported by this Gamepad.
                 * @param index The index of the button to get the value for.
                 * @returns `true` if the button is considered as being pressed down, otherwise `false`.
                 */
                isButtonDown(index: number): boolean;

                /**
                 * Destroys this Gamepad instance, its buttons and axes, and releases external references it holds.
                 */
                destroy(): void;

                /**
                 * Is this Gamepad currently connected or not?
                 */
                connected: boolean;

                /**
                 * A timestamp containing the most recent time this Gamepad was updated.
                 */
                timestamp: number;

                /**
                 * Is the Gamepad's Left button being pressed?
                 * If the Gamepad doesn't have this button it will always return false.
                 * This is the d-pad left button under standard Gamepad mapping.
                 */
                left: boolean;

                /**
                 * Is the Gamepad's Right button being pressed?
                 * If the Gamepad doesn't have this button it will always return false.
                 * This is the d-pad right button under standard Gamepad mapping.
                 */
                right: boolean;

                /**
                 * Is the Gamepad's Up button being pressed?
                 * If the Gamepad doesn't have this button it will always return false.
                 * This is the d-pad up button under standard Gamepad mapping.
                 */
                up: boolean;

                /**
                 * Is the Gamepad's Down button being pressed?
                 * If the Gamepad doesn't have this button it will always return false.
                 * This is the d-pad down button under standard Gamepad mapping.
                 */
                down: boolean;

                /**
                 * Is the Gamepad's bottom button in the right button cluster being pressed?
                 * If the Gamepad doesn't have this button it will always return false.
                 * On a Dual Shock controller it's the X button.
                 * On an XBox controller it's the A button.
                 */
                A: boolean;

                /**
                 * Is the Gamepad's top button in the right button cluster being pressed?
                 * If the Gamepad doesn't have this button it will always return false.
                 * On a Dual Shock controller it's the Triangle button.
                 * On an XBox controller it's the Y button.
                 */
                Y: boolean;

                /**
                 * Is the Gamepad's left button in the right button cluster being pressed?
                 * If the Gamepad doesn't have this button it will always return false.
                 * On a Dual Shock controller it's the Square button.
                 * On an XBox controller it's the X button.
                 */
                X: boolean;

                /**
                 * Is the Gamepad's right button in the right button cluster being pressed?
                 * If the Gamepad doesn't have this button it will always return false.
                 * On a Dual Shock controller it's the Circle button.
                 * On an XBox controller it's the B button.
                 */
                B: boolean;

                /**
                 * Returns the value of the Gamepad's top left shoulder button.
                 * If the Gamepad doesn't have this button it will always return zero.
                 * The value is a float between 0 and 1, corresponding to how depressed the button is.
                 * On a Dual Shock controller it's the L1 button.
                 * On an XBox controller it's the LB button.
                 */
                L1: number;

                /**
                 * Returns the value of the Gamepad's bottom left shoulder button.
                 * If the Gamepad doesn't have this button it will always return zero.
                 * The value is a float between 0 and 1, corresponding to how depressed the button is.
                 * On a Dual Shock controller it's the L2 button.
                 * On an XBox controller it's the LT button.
                 */
                L2: number;

                /**
                 * Returns the value of the Gamepad's top right shoulder button.
                 * If the Gamepad doesn't have this button it will always return zero.
                 * The value is a float between 0 and 1, corresponding to how depressed the button is.
                 * On a Dual Shock controller it's the R1 button.
                 * On an XBox controller it's the RB button.
                 */
                R1: number;

                /**
                 * Returns the value of the Gamepad's bottom right shoulder button.
                 * If the Gamepad doesn't have this button it will always return zero.
                 * The value is a float between 0 and 1, corresponding to how depressed the button is.
                 * On a Dual Shock controller it's the R2 button.
                 * On an XBox controller it's the RT button.
                 */
                R2: number;

            }

            /**
             * The Gamepad Plugin is an input plugin that belongs to the Scene-owned Input system.
             * 
             * Its role is to listen for native DOM Gamepad Events and then process them.
             * 
             * You do not need to create this class directly, the Input system will create an instance of it automatically.
             * 
             * You can access it from within a Scene using `this.input.gamepad`.
             * 
             * To listen for a gamepad being connected:
             * 
             * ```javascript
             * this.input.gamepad.once('connected', function (pad) {
             *     //   'pad' is a reference to the gamepad that was just connected
             * });
             * ```
             * 
             * Note that the browser may require you to press a button on a gamepad before it will allow you to access it,
             * this is for security reasons. However, it may also trust the page already, in which case you won't get the
             * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads
             * already connected.
             * 
             * Once you have received the connected event, or polled the gamepads and found them enabled, you can access
             * them via the built-in properties `GamepadPlugin.pad1` to `pad4`, for up to 4 game pads. With a reference
             * to the gamepads you can poll its buttons and axis sticks. See the properties and methods available on
             * the `Gamepad` class for more details.
             * 
             * As of September 2020 Chrome, and likely other browsers, will soon start to require that games requesting
             * access to the Gamepad API are running under SSL. They will actively block API access if they are not.
             * 
             * For more information about Gamepad support in browsers see the following resources:
             * 
             * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API
             * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
             * https://www.smashingmagazine.com/2015/11/gamepad-api-in-web-games/
             * http://html5gamepad.com/
             */
            class GamepadPlugin extends Phaser.Events.EventEmitter {
                /**
                 * 
                 * @param sceneInputPlugin A reference to the Scene Input Plugin that the GamepadPlugin belongs to.
                 */
                constructor(sceneInputPlugin: Phaser.Input.InputPlugin);

                /**
                 * A reference to the Scene that this Input Plugin is responsible for.
                 */
                scene: Phaser.Scene;

                /**
                 * A reference to the Scene Systems Settings.
                 */
                settings: Phaser.Types.Scenes.SettingsObject;

                /**
                 * A reference to the Scene Input Plugin that created this Gamepad Plugin.
                 */
                sceneInputPlugin: Phaser.Input.InputPlugin;

                /**
                 * A boolean that controls if the Gamepad Manager is enabled or not.
                 * Can be toggled on the fly.
                 */
                enabled: boolean;

                /**
                 * The Gamepad Event target, as defined in the Game Config.
                 * Typically the browser window, but can be any interactive DOM element.
                 */
                target: any;

                /**
                 * An array of the connected Gamepads.
                 */
                gamepads: Phaser.Input.Gamepad.Gamepad[];

                /**
                 * Checks to see if both this plugin and the Scene to which it belongs is active.undefined
                 * @returns `true` if the plugin and the Scene it belongs to is active.
                 */
                isActive(): boolean;

                /**
                 * Disconnects all current Gamepads.
                 */
                disconnectAll(): void;

                /**
                 * Returns an array of all currently connected Gamepads.undefined
                 * @returns An array of all currently connected Gamepads.
                 */
                getAll(): Phaser.Input.Gamepad.Gamepad[];

                /**
                 * Looks up a single Gamepad based on the given index value.
                 * @param index The index of the Gamepad to get.
                 * @returns The Gamepad matching the given index, or undefined if none were found.
                 */
                getPad(index: number): Phaser.Input.Gamepad.Gamepad;

                /**
                 * The total number of connected game pads.
                 */
                total: number;

                /**
                 * A reference to the first connected Gamepad.
                 * 
                 * This will be undefined if either no pads are connected, or the browser
                 * has not yet issued a gamepadconnected, which can happen even if a Gamepad
                 * is plugged in, but hasn't yet had any buttons pressed on it.
                 */
                pad1: Phaser.Input.Gamepad.Gamepad;

                /**
                 * A reference to the second connected Gamepad.
                 * 
                 * This will be undefined if either no pads are connected, or the browser
                 * has not yet issued a gamepadconnected, which can happen even if a Gamepad
                 * is plugged in, but hasn't yet had any buttons pressed on it.
                 */
                pad2: Phaser.Input.Gamepad.Gamepad;

                /**
                 * A reference to the third connected Gamepad.
                 * 
                 * This will be undefined if either no pads are connected, or the browser
                 * has not yet issued a gamepadconnected, which can happen even if a Gamepad
                 * is plugged in, but hasn't yet had any buttons pressed on it.
                 */
                pad3: Phaser.Input.Gamepad.Gamepad;

                /**
                 * A reference to the fourth connected Gamepad.
                 * 
                 * This will be undefined if either no pads are connected, or the browser
                 * has not yet issued a gamepadconnected, which can happen even if a Gamepad
                 * is plugged in, but hasn't yet had any buttons pressed on it.
                 */
                pad4: Phaser.Input.Gamepad.Gamepad;

            }

            namespace Configs {
                /**
                 * Button index constants for the Tatar SNES USB Controller gamepad
                 * (USB Gamepad, STANDARD GAMEPAD Vendor: 0079 Product: 0011).
                 * 
                 * Use these constants with Phaser's Gamepad input system to identify specific
                 * buttons on this controller by their standard gamepad API index. For example,
                 * pass `Phaser.Input.Gamepad.Configs.SNES_USB.B` as the button index when
                 * checking button state on a connected gamepad of this type.
                 */
                namespace SNES_USB {
                    /**
                     * D-Pad up
                     */
                    const UP: number;

                    /**
                     * D-Pad down
                     */
                    const DOWN: number;

                    /**
                     * D-Pad left
                     */
                    const LEFT: number;

                    /**
                     * D-Pad right
                     */
                    const RIGHT: number;

                    /**
                     * Select button
                     */
                    const SELECT: number;

                    /**
                     * Start button
                     */
                    const START: number;

                    /**
                     * B Button (Bottom)
                     */
                    const B: number;

                    /**
                     * A Button (Right)
                     */
                    const A: number;

                    /**
                     * Y Button (Left)
                     */
                    const Y: number;

                    /**
                     * X Button (Top)
                     */
                    const X: number;

                    /**
                     * Left shoulder button (L)
                     */
                    const LEFT_SHOULDER: number;

                    /**
                     * Right shoulder button (R)
                     */
                    const RIGHT_SHOULDER: number;

                }

                /**
                 * Button and axis index constants for the Sony PlayStation DualShock 4 (v2) wireless controller.
                 * 
                 * This configuration object maps human-readable names to the numeric button and axis indices
                 * reported by the browser Gamepad API when a DualShock 4 controller is connected. Use these
                 * constants with Phaser's `Gamepad` class to check button states and read analog stick values
                 * without relying on magic numbers in your game code.
                 */
                namespace DUALSHOCK_4 {
                    /**
                     * D-Pad up
                     */
                    const UP: number;

                    /**
                     * D-Pad down
                     */
                    const DOWN: number;

                    /**
                     * D-Pad left
                     */
                    const LEFT: number;

                    /**
                     * D-Pad right
                     */
                    const RIGHT: number;

                    /**
                     * Share button
                     */
                    const SHARE: number;

                    /**
                     * Options button
                     */
                    const OPTIONS: number;

                    /**
                     * PlayStation logo button
                     */
                    const PS: number;

                    /**
                     * Touchpad click
                     */
                    const TOUCHBAR: number;

                    /**
                     * Cross button (Bottom)
                     */
                    const X: number;

                    /**
                     * Circle button (Right)
                     */
                    const CIRCLE: number;

                    /**
                     * Square button (Left)
                     */
                    const SQUARE: number;

                    /**
                     * Triangle button (Top)
                     */
                    const TRIANGLE: number;

                    /**
                     * Left bumper (L1)
                     */
                    const L1: number;

                    /**
                     * Right bumper (R1)
                     */
                    const R1: number;

                    /**
                     * Left trigger (L2)
                     */
                    const L2: number;

                    /**
                     * Right trigger (R2)
                     */
                    const R2: number;

                    /**
                     * Left stick click (L3)
                     */
                    const L3: number;

                    /**
                     * Right stick click (R3)
                     */
                    const R3: number;

                    /**
                     * Left stick horizontal
                     */
                    const LEFT_STICK_H: number;

                    /**
                     * Left stick vertical
                     */
                    const LEFT_STICK_V: number;

                    /**
                     * Right stick horizontal
                     */
                    const RIGHT_STICK_H: number;

                    /**
                     * Right stick vertical
                     */
                    const RIGHT_STICK_V: number;

                }

                /**
                 * Button and axis index constants for the XBox 360 gamepad. Use these values
                 * with Phaser's Gamepad input system to identify specific buttons and analog
                 * sticks by name rather than raw index. For example, check
                 * `pad.buttons[Phaser.Input.Gamepad.Configs.XBOX_360.A]` to test the A button,
                 * or read `pad.axes[Phaser.Input.Gamepad.Configs.XBOX_360.LEFT_STICK_H]` for
                 * the left stick's horizontal axis value.
                 */
                namespace XBOX_360 {
                    /**
                     * D-Pad up
                     */
                    const UP: number;

                    /**
                     * D-Pad down
                     */
                    const DOWN: number;

                    /**
                     * D-Pad left
                     */
                    const LEFT: number;

                    /**
                     * D-Pad right
                     */
                    const RIGHT: number;

                    /**
                     * XBox menu button
                     */
                    const MENU: number;

                    /**
                     * A button (Bottom)
                     */
                    const A: number;

                    /**
                     * B button (Right)
                     */
                    const B: number;

                    /**
                     * X button (Left)
                     */
                    const X: number;

                    /**
                     * Y button (Top)
                     */
                    const Y: number;

                    /**
                     * Left Bumper
                     */
                    const LB: number;

                    /**
                     * Right Bumper
                     */
                    const RB: number;

                    /**
                     * Left Trigger
                     */
                    const LT: number;

                    /**
                     * Right Trigger
                     */
                    const RT: number;

                    /**
                     * Back / Change View button
                     */
                    const BACK: number;

                    /**
                     * Start button
                     */
                    const START: number;

                    /**
                     * Left Stick press
                     */
                    const LS: number;

                    /**
                     * Right Stick press
                     */
                    const RS: number;

                    /**
                     * Left Stick horizontal
                     */
                    const LEFT_STICK_H: number;

                    /**
                     * Left Stick vertical
                     */
                    const LEFT_STICK_V: number;

                    /**
                     * Right Stick horizontal
                     */
                    const RIGHT_STICK_H: number;

                    /**
                     * Right Stick vertical
                     */
                    const RIGHT_STICK_V: number;

                }

            }

            namespace Events {
                /**
                 * The Gamepad Button Down Event.
                 * 
                 * This event is dispatched by the Gamepad Plugin when a button has been pressed on any active Gamepad.
                 * 
                 * Listen to this event from within a Scene using: `this.input.gamepad.on('down', listener)`.
                 * 
                 * You can also listen for a DOWN event from a Gamepad instance. See the [GAMEPAD_BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_DOWN} event for details.
                 */
                const BUTTON_DOWN: string;

                /**
                 * The Gamepad Button Up Event.
                 * 
                 * This event is dispatched by the Gamepad Plugin when a button has been released on any active Gamepad.
                 * 
                 * Listen to this event from within a Scene using: `this.input.gamepad.on('up', listener)`.
                 * 
                 * You can also listen for an UP event from a Gamepad instance. See the [GAMEPAD_BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_UP} event for details.
                 */
                const BUTTON_UP: string;

                /**
                 * The Gamepad Connected Event.
                 * 
                 * This event is dispatched by the Gamepad Plugin when a Gamepad has been connected.
                 * 
                 * Listen to this event from within a Scene using: `this.input.gamepad.once('connected', listener)`.
                 * 
                 * Note that the browser may require you to press a button on a gamepad before it will allow you to access it,
                 * this is for security reasons. However, it may also trust the page already, in which case you won't get the
                 * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads
                 * already connected.
                 */
                const CONNECTED: string;

                /**
                 * The Gamepad Disconnected Event.
                 * 
                 * This event is dispatched by the Gamepad Plugin when a Gamepad has been disconnected.
                 * 
                 * Listen to this event from within a Scene using: `this.input.gamepad.once('disconnected', listener)`.
                 */
                const DISCONNECTED: string;

                /**
                 * The Gamepad Button Down Event.
                 * 
                 * This event is dispatched by a Gamepad instance when a button has been pressed on it.
                 * 
                 * Listen to this event from a Gamepad instance. One way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin:
                 * `this.input.gamepad.pad1.on('down', listener)`.
                 * 
                 * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'.
                 * 
                 * You can also listen for a DOWN event from the Gamepad Plugin. See the [BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_DOWN} event for details.
                 */
                const GAMEPAD_BUTTON_DOWN: string;

                /**
                 * The Gamepad Button Up Event.
                 * 
                 * This event is dispatched by a Gamepad instance when a button has been released on it.
                 * 
                 * Listen to this event from a Gamepad instance. One way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin:
                 * `this.input.gamepad.pad1.on('up', listener)`.
                 * 
                 * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'.
                 * 
                 * You can also listen for an UP event from the Gamepad Plugin. See the [BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_UP} event for details.
                 */
                const GAMEPAD_BUTTON_UP: string;

            }

        }

        namespace Keyboard {
            /**
             * The Keyboard Manager is a helper class that belongs to the global Input Manager.
             * 
             * Its role is to listen for native DOM Keyboard Events and then store them for further processing by the Keyboard Plugin.
             * 
             * You do not need to create this class directly, the Input Manager will create an instance of it automatically if keyboard
             * input has been enabled in the Game Config.
             */
            class KeyboardManager {
                /**
                 * 
                 * @param inputManager A reference to the Input Manager.
                 */
                constructor(inputManager: Phaser.Input.InputManager);

                /**
                 * A reference to the Input Manager.
                 */
                manager: Phaser.Input.InputManager;

                /**
                 * A flag that controls if the non-modified keys, matching those stored in the `captures` array,
                 * have `preventDefault` called on them or not.
                 * 
                 * A non-modified key is one that doesn't have a modifier key held down with it. The modifier keys are
                 * shift, control, alt and the meta key (Command on a Mac, the Windows Key on Windows).
                 * Therefore, if the user presses shift + r, it won't prevent this combination, because of the modifier.
                 * However, if the user presses just the r key on its own, it will have its event prevented.
                 * 
                 * If you wish to stop capturing the keys, for example switching out to a DOM based element, then
                 * you can toggle this property at run-time.
                 */
                preventDefault: boolean;

                /**
                 * An array of Key Code values that will automatically have `preventDefault` called on them,
                 * as long as the `KeyboardManager.preventDefault` boolean is set to `true`.
                 * 
                 * By default the array is empty.
                 * 
                 * The key must be non-modified when pressed in order to be captured.
                 * 
                 * A non-modified key is one that doesn't have a modifier key held down with it. The modifier keys are
                 * shift, control, alt and the meta key (Command on a Mac, the Windows Key on Windows).
                 * Therefore, if the user presses shift + r, it won't prevent this combination, because of the modifier.
                 * However, if the user presses just the r key on its own, it will have its event prevented.
                 * 
                 * If you wish to stop capturing the keys, for example switching out to a DOM based element, then
                 * you can toggle the `KeyboardManager.preventDefault` boolean at run-time.
                 * 
                 * If you need more specific control, you can create Key objects and set the flag on each of those instead.
                 * 
                 * This array can be populated via the Game Config by setting the `input.keyboard.capture` array, or you
                 * can call the `addCapture` method. See also `removeCapture` and `clearCaptures`.
                 */
                captures: number[];

                /**
                 * A boolean that controls if the Keyboard Manager is enabled or not.
                 * Can be toggled on the fly.
                 */
                enabled: boolean;

                /**
                 * The Keyboard Event target, as defined in the Game Config.
                 * Typically the window in which the game is rendering, but can be any interactive DOM element.
                 */
                target: any;

                /**
                 * The Key Down Event handler.
                 * This function is sent the native DOM KeyEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onKeyDown: Function;

                /**
                 * The Key Up Event handler.
                 * This function is sent the native DOM KeyEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onKeyUp: Function;

                /**
                 * Starts the Keyboard Event listeners running.
                 * This is called automatically and does not need to be manually invoked.
                 */
                startListeners(): void;

                /**
                 * Stops the Key Event listeners.
                 * This is called automatically and does not need to be manually invoked.
                 */
                stopListeners(): void;

                /**
                 * By default when a key is pressed Phaser will not stop the event from propagating up to the browser.
                 * There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.
                 * 
                 * This `addCapture` method enables consuming keyboard events for specific keys so they don't bubble up to the browser
                 * and cause the default browser behavior.
                 * 
                 * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent
                 * the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.
                 * 
                 * You can pass in a single key code value, or an array of key codes, or a string:
                 * 
                 * ```javascript
                 * this.input.keyboard.addCapture(62);
                 * ```
                 * 
                 * An array of key codes:
                 * 
                 * ```javascript
                 * this.input.keyboard.addCapture([ 62, 63, 64 ]);
                 * ```
                 * 
                 * Or a string:
                 * 
                 * ```javascript
                 * this.input.keyboard.addCapture('W,S,A,D');
                 * ```
                 * 
                 * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.
                 * 
                 * You can also provide an array mixing both strings and key code integers.
                 * 
                 * If there are active captures after calling this method, the `preventDefault` property is set to `true`.
                 * @param keycode The Key Codes to enable capture for, preventing them reaching the browser.
                 */
                addCapture(keycode: string | number | number[] | any[]): void;

                /**
                 * Removes an existing key capture.
                 * 
                 * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove
                 * the capture of a key, then it will remove it for any Scene in your game, not just the calling one.
                 * 
                 * You can pass in a single key code value, or an array of key codes, or a string:
                 * 
                 * ```javascript
                 * this.input.keyboard.removeCapture(62);
                 * ```
                 * 
                 * An array of key codes:
                 * 
                 * ```javascript
                 * this.input.keyboard.removeCapture([ 62, 63, 64 ]);
                 * ```
                 * 
                 * Or a string:
                 * 
                 * ```javascript
                 * this.input.keyboard.removeCapture('W,S,A,D');
                 * ```
                 * 
                 * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.
                 * 
                 * You can also provide an array mixing both strings and key code integers.
                 * 
                 * If there are no captures left after calling this method, the `preventDefault` property is set to `false`.
                 * @param keycode The Key Codes to disable capture for, allowing them reaching the browser again.
                 */
                removeCapture(keycode: string | number | number[] | any[]): void;

                /**
                 * Removes all keyboard captures and sets the `preventDefault` property to `false`.
                 */
                clearCaptures(): void;

                /**
                 * Destroys this Keyboard Manager instance.
                 */
                destroy(): void;

            }

            /**
             * The Keyboard Plugin is an input plugin that belongs to the Scene-owned Input system.
             * 
             * Its role is to listen for native DOM Keyboard Events and then process them.
             * 
             * You do not need to create this class directly, the Input system will create an instance of it automatically.
             * 
             * You can access it from within a Scene using `this.input.keyboard`. For example, you can do:
             * 
             * ```javascript
             * this.input.keyboard.on('keydown', callback, context);
             * ```
             * 
             * Or, to listen for a specific key:
             * 
             * ```javascript
             * this.input.keyboard.on('keydown-A', callback, context);
             * ```
             * 
             * You can also create Key objects, which you can then poll in your game loop:
             * 
             * ```javascript
             * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);
             * ```
             * 
             * If you have multiple parallel Scenes, each trying to get keyboard input, be sure to disable capture on them to stop them from
             * stealing input from another Scene in the list. You can do this with `this.input.keyboard.enabled = false` within the
             * Scene to stop all input, or `this.input.keyboard.preventDefault = false` to stop a Scene halting input on another Scene.
             * 
             * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.
             * See http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details
             * and use the site https://w3c.github.io/uievents/tools/key-event-viewer.html to test your n-key support in browser.
             * 
             * Also please be aware that certain browser extensions can disable or override Phaser keyboard handling.
             * For example the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.
             * And there are others. So, please check your extensions before opening Phaser issues about keys that don't work.
             */
            class KeyboardPlugin extends Phaser.Events.EventEmitter {
                /**
                 * 
                 * @param sceneInputPlugin A reference to the Scene Input Plugin that the KeyboardPlugin belongs to.
                 */
                constructor(sceneInputPlugin: Phaser.Input.InputPlugin);

                /**
                 * A reference to the core game, so we can listen for visibility events.
                 */
                game: Phaser.Game;

                /**
                 * A reference to the Scene that this Input Plugin is responsible for.
                 */
                scene: Phaser.Scene;

                /**
                 * A reference to the Scene Systems Settings.
                 */
                settings: Phaser.Types.Scenes.SettingsObject;

                /**
                 * A reference to the Scene Input Plugin that created this Keyboard Plugin.
                 */
                sceneInputPlugin: Phaser.Input.InputPlugin;

                /**
                 * A reference to the global Keyboard Manager.
                 */
                manager: Phaser.Input.Keyboard.KeyboardManager;

                /**
                 * A boolean that controls if this Keyboard Plugin is enabled or not.
                 * Can be toggled on the fly.
                 */
                enabled: boolean;

                /**
                 * An array of Key objects to process.
                 */
                keys: Phaser.Input.Keyboard.Key[];

                /**
                 * An array of KeyCombo objects to process.
                 */
                combos: Phaser.Input.Keyboard.KeyCombo[];

                /**
                 * Checks to see if both this plugin and the Scene to which it belongs is active.undefined
                 * @returns `true` if the plugin and the Scene it belongs to is active.
                 */
                isActive(): boolean;

                /**
                 * By default when a key is pressed Phaser will not stop the event from propagating up to the browser.
                 * There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.
                 * 
                 * This `addCapture` method enables consuming keyboard events for specific keys, so they don't bubble up the browser
                 * and cause the default behaviors.
                 * 
                 * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent
                 * the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.
                 * 
                 * You can pass a single key code value:
                 * 
                 * ```javascript
                 * this.input.keyboard.addCapture(62);
                 * ```
                 * 
                 * An array of key codes:
                 * 
                 * ```javascript
                 * this.input.keyboard.addCapture([ 62, 63, 64 ]);
                 * ```
                 * 
                 * Or, a comma-delimited string:
                 * 
                 * ```javascript
                 * this.input.keyboard.addCapture('W,S,A,D');
                 * ```
                 * 
                 * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.
                 * 
                 * You can also provide an array mixing both strings and key code integers.
                 * @param keycode The Key Codes to enable event capture for.
                 * @returns This KeyboardPlugin object.
                 */
                addCapture(keycode: string | number | number[] | any[]): this;

                /**
                 * Removes an existing key capture.
                 * 
                 * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove
                 * the capture of a key, then it will remove it for any Scene in your game, not just the calling one.
                 * 
                 * You can pass a single key code value:
                 * 
                 * ```javascript
                 * this.input.keyboard.removeCapture(62);
                 * ```
                 * 
                 * An array of key codes:
                 * 
                 * ```javascript
                 * this.input.keyboard.removeCapture([ 62, 63, 64 ]);
                 * ```
                 * 
                 * Or, a comma-delimited string:
                 * 
                 * ```javascript
                 * this.input.keyboard.removeCapture('W,S,A,D');
                 * ```
                 * 
                 * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.
                 * 
                 * You can also provide an array mixing both strings and key code integers.
                 * @param keycode The Key Codes to disable event capture for.
                 * @returns This KeyboardPlugin object.
                 */
                removeCapture(keycode: string | number | number[] | any[]): this;

                /**
                 * Returns an array that contains all of the keyboard captures currently enabled.undefined
                 * @returns An array of all the currently capturing key codes.
                 */
                getCaptures(): number[];

                /**
                 * Allows Phaser to prevent any key captures you may have defined from bubbling up the browser.
                 * You can use this to re-enable event capturing if you had paused it via `disableGlobalCapture`.undefined
                 * @returns This KeyboardPlugin object.
                 */
                enableGlobalCapture(): this;

                /**
                 * Disables Phaser from preventing any key captures you may have defined, without actually removing them.
                 * You can use this to temporarily disable event capturing if, for example, you swap to a DOM element.undefined
                 * @returns This KeyboardPlugin object.
                 */
                disableGlobalCapture(): this;

                /**
                 * Removes all keyboard captures.
                 * 
                 * Note that this is a global change. It will clear all event captures across your game, not just for this specific Scene.undefined
                 * @returns This KeyboardPlugin object.
                 */
                clearCaptures(): this;

                /**
                 * Creates and returns an object containing 6 hotkeys for Up, Down, Left and Right, and also Space Bar and Shift.undefined
                 * @returns An object containing the properties: `up`, `down`, `left`, `right`, `space` and `shift`.
                 */
                createCursorKeys(): Phaser.Types.Input.Keyboard.CursorKeys;

                /**
                 * A practical way to create an object containing user selected hotkeys.
                 * 
                 * For example:
                 * 
                 * ```javascript
                 * this.input.keyboard.addKeys({ 'up': Phaser.Input.Keyboard.KeyCodes.W, 'down': Phaser.Input.Keyboard.KeyCodes.S });
                 * ```
                 * 
                 * would return an object containing the properties (`up` and `down`) mapped to W and S {@link Phaser.Input.Keyboard.Key} objects.
                 * 
                 * You can also pass in a comma-separated string:
                 * 
                 * ```javascript
                 * this.input.keyboard.addKeys('W,S,A,D');
                 * ```
                 * 
                 * Which will return an object with the properties W, S, A and D mapped to the relevant Key objects.
                 * 
                 * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.
                 * @param keys An object containing Key Codes, or a comma-separated string.
                 * @param enableCapture Automatically call `preventDefault` on the native DOM browser event for the key codes being added. Default true.
                 * @param emitOnRepeat Controls if the Key will continuously emit a 'down' event while being held down (true), or emit the event just once (false, the default). Default false.
                 * @returns An object containing Key objects mapped to the input properties.
                 */
                addKeys(keys: object | string, enableCapture?: boolean, emitOnRepeat?: boolean): object;

                /**
                 * Adds a Key object to this Keyboard Plugin.
                 * 
                 * The given argument can be either an existing Key object, a string, such as `A` or `SPACE`, or a key code value.
                 * 
                 * If a Key object is given, and one already exists matching the same key code, the existing one is replaced with the new one.
                 * @param key Either a Key object, a string, such as `A` or `SPACE`, or a key code value.
                 * @param enableCapture Automatically call `preventDefault` on the native DOM browser event for the key codes being added. Default true.
                 * @param emitOnRepeat Controls if the Key will continuously emit a 'down' event while being held down (true), or emit the event just once (false, the default). Default false.
                 * @returns The newly created Key object, or a reference to it if it already existed in the keys array.
                 */
                addKey(key: Phaser.Input.Keyboard.Key | string | number, enableCapture?: boolean, emitOnRepeat?: boolean): Phaser.Input.Keyboard.Key;

                /**
                 * Removes a Key object from this Keyboard Plugin.
                 * 
                 * The given argument can be either a Key object, a string, such as `A` or `SPACE`, or a key code value.
                 * @param key Either a Key object, a string, such as `A` or `SPACE`, or a key code value.
                 * @param destroy Call `Key.destroy` on the removed Key object? Default false.
                 * @param removeCapture Remove this Key from being captured? Only applies if set to capture when created. Default false.
                 * @returns This KeyboardPlugin object.
                 */
                removeKey(key: Phaser.Input.Keyboard.Key | string | number, destroy?: boolean, removeCapture?: boolean): this;

                /**
                 * Removes all Key objects created by _this_ Keyboard Plugin.
                 * @param destroy Call `Key.destroy` on each removed Key object? Default false.
                 * @param removeCapture Remove all key captures for Key objects owned by this plugin? Default false.
                 * @returns This KeyboardPlugin object.
                 */
                removeAllKeys(destroy?: boolean, removeCapture?: boolean): this;

                /**
                 * Creates a new KeyCombo.
                 * 
                 * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them
                 * it will emit a `keycombomatch` event from this Keyboard Plugin.
                 * 
                 * The keys to be listened for can be defined as:
                 * 
                 * A string (i.e. 'ATARI')
                 * An array of either integers (key codes) or strings, or a mixture of both
                 * An array of objects (such as Key objects) with a public 'keyCode' property
                 * 
                 * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)
                 * you could pass the following array of key codes:
                 * 
                 * ```javascript
                 * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });
                 * 
                 * this.input.keyboard.on('keycombomatch', function (event) {
                 *     console.log('Konami Code entered!');
                 * });
                 * ```
                 * 
                 * Or, to listen for the user entering the word PHASER:
                 * 
                 * ```javascript
                 * this.input.keyboard.createCombo('PHASER');
                 * ```
                 * @param keys The keys that comprise this combo.
                 * @param config A Key Combo configuration object.
                 * @returns The new KeyCombo object.
                 */
                createCombo(keys: string | number[] | object[], config?: Phaser.Types.Input.Keyboard.KeyComboConfig): Phaser.Input.Keyboard.KeyCombo;

                /**
                 * Checks if the given Key object is currently being held down.
                 * 
                 * The difference between this method and checking the `Key.isDown` property directly is that you can provide
                 * a duration to this method. For example, if you wanted a key press to fire a bullet, but you only wanted
                 * it to be able to fire every 100ms, then you can call this method with a `duration` of 100 and it
                 * will only return `true` every 100ms.
                 * 
                 * If the Keyboard Plugin has been disabled, this method will always return `false`.
                 * @param key A Key object.
                 * @param duration The duration which must have elapsed before this Key is considered as being down. Default 0.
                 * @returns `true` if the Key is down within the duration specified, otherwise `false`.
                 */
                checkDown(key: Phaser.Input.Keyboard.Key, duration?: number): boolean;

                /**
                 * Resets all Key objects created by _this_ Keyboard Plugin back to their default un-pressed states.
                 * This can only reset keys created via the `addKey`, `addKeys` or `createCursorKeys` methods.
                 * If you have created a Key object directly you'll need to reset it yourself.
                 * 
                 * This method is called automatically when the Keyboard Plugin shuts down, but can be
                 * invoked directly at any time you require.undefined
                 * @returns This KeyboardPlugin object.
                 */
                resetKeys(): this;

            }

            /**
             * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them
             * it will emit a `keycombomatch` event from the Keyboard Manager.
             * 
             * The keys to be listened for can be defined as:
             * 
             * A string (i.e. 'ATARI')
             * An array of either integers (key codes) or strings, or a mixture of both
             * An array of objects (such as Key objects) with a public 'keyCode' property
             * 
             * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)
             * you could pass the following array of key codes:
             * 
             * ```javascript
             * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });
             * 
             * this.input.keyboard.on('keycombomatch', function (event) {
             *     console.log('Konami Code entered!');
             * });
             * ```
             * 
             * Or, to listen for the user entering the word PHASER:
             * 
             * ```javascript
             * this.input.keyboard.createCombo('PHASER');
             * ```
             */
            class KeyCombo {
                /**
                 * 
                 * @param keyboardPlugin A reference to the Keyboard Plugin.
                 * @param keys The keys that comprise this combo.
                 * @param config A Key Combo configuration object.
                 */
                constructor(keyboardPlugin: Phaser.Input.Keyboard.KeyboardPlugin, keys: string | number[] | object[], config?: Phaser.Types.Input.Keyboard.KeyComboConfig);

                /**
                 * A reference to the Keyboard Plugin
                 */
                manager: Phaser.Input.Keyboard.KeyboardPlugin;

                /**
                 * A flag that controls if this Key Combo is actively processing keys or not.
                 */
                enabled: boolean;

                /**
                 * An array of the keycodes that comprise this combo.
                 */
                keyCodes: any[];

                /**
                 * The current keyCode the combo is waiting for.
                 */
                current: number;

                /**
                 * The current index of the key being waited for in the `keyCodes` array.
                 */
                index: number;

                /**
                 * The length of this combo (in keycodes)
                 */
                size: number;

                /**
                 * The time the previous key in the combo was matched.
                 */
                timeLastMatched: number;

                /**
                 * Has this Key Combo been matched yet?
                 */
                matched: boolean;

                /**
                 * The time the entire combo was matched.
                 */
                timeMatched: number;

                /**
                 * If the user presses an incorrect key, the combo sequence will be reset to the beginning.
                 */
                resetOnWrongKey: boolean;

                /**
                 * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled.
                 */
                maxKeyDelay: number;

                /**
                 * If the combo has previously been matched and the user presses the first key of the combo again, the combo will reset.
                 */
                resetOnMatch: boolean;

                /**
                 * If the combo matches successfully, this KeyCombo instance will automatically destroy itself.
                 */
                deleteOnMatch: boolean;

                /**
                 * How far complete is this combo? A value between 0 and 1.
                 */
                readonly progress: number;

                /**
                 * Destroys this Key Combo and all of its references.
                 */
                destroy(): void;

            }

            namespace Events {
                /**
                 * The Global Key Down Event.
                 * 
                 * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down.
                 * 
                 * Listen to this event from within a Scene using: `this.input.keyboard.on('keydown', listener)`.
                 * 
                 * You can also listen for a specific key being pressed. See [Keyboard.Events.KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_DOWN} for details.
                 * 
                 * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details.
                 * 
                 * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.
                 * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details.
                 * 
                 * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling.
                 * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.
                 * There are others. So, please check your extensions if you find you have specific keys that don't work.
                 */
                const ANY_KEY_DOWN: string;

                /**
                 * The Global Key Up Event.
                 * 
                 * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released.
                 * 
                 * Listen to this event from within a Scene using: `this.input.keyboard.on('keyup', listener)`.
                 * 
                 * You can also listen for a specific key being released. See [Keyboard.Events.KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_UP} for details.
                 * 
                 * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details.
                 */
                const ANY_KEY_UP: string;

                /**
                 * The Key Combo Match Event.
                 * 
                 * This event is dispatched by the Keyboard Plugin when a [Key Combo]{@link Phaser.Input.Keyboard.KeyCombo} is matched.
                 * 
                 * Listen for this event from the Key Plugin after a combo has been created:
                 * 
                 * ```javascript
                 * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });
                 * 
                 * this.input.keyboard.on('keycombomatch', function (event) {
                 *     console.log('Konami Code entered!');
                 * });
                 * ```
                 */
                const COMBO_MATCH: string;

                /**
                 * The Key Down Event.
                 * 
                 * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is pressed.
                 * 
                 * Listen for this event from the Key object instance directly:
                 * 
                 * ```javascript
                 * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);
                 * 
                 * spaceBar.on('down', listener)
                 * ```
                 * 
                 * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details.
                 */
                const DOWN: string;

                /**
                 * The Key Down Event.
                 * 
                 * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down.
                 * 
                 * Unlike the `ANY_KEY_DOWN` event, this one has a special dynamic event name. For example, to listen for the `A` key being pressed
                 * use the following from within a Scene: `this.input.keyboard.on('keydown-A', listener)`. You can replace the `-A` part of the event
                 * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar:
                 * `this.input.keyboard.on('keydown-SPACE', listener)`.
                 * 
                 * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details.
                 * 
                 * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details.
                 * 
                 * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.
                 * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details.
                 * 
                 * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling.
                 * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.
                 * There are others. So, please check your extensions if you find you have specific keys that don't work.
                 */
                const KEY_DOWN: string;

                /**
                 * The Key Up Event.
                 * 
                 * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released.
                 * 
                 * Unlike the `ANY_KEY_UP` event, this one has a special dynamic event name. For example, to listen for the `A` key being released
                 * use the following from within a Scene: `this.input.keyboard.on('keyup-A', listener)`. You can replace the `-A` part of the event
                 * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar:
                 * `this.input.keyboard.on('keyup-SPACE', listener)`.
                 * 
                 * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details.
                 * 
                 * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details.
                 */
                const KEY_UP: string;

                /**
                 * The Key Up Event.
                 * 
                 * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is released.
                 * 
                 * Listen for this event from the Key object instance directly:
                 * 
                 * ```javascript
                 * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);
                 * 
                 * spaceBar.on('up', listener)
                 * ```
                 * 
                 * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details.
                 */
                const UP: string;

            }

            /**
             * Returns `true` if the Key was pressed down within the `duration` value given, based on the current
             * game clock time. Or `false` if it either isn't down, or was pressed down longer ago than the given duration.
             * @param key The Key object to test.
             * @param duration The duration, in ms, within which the key must have been pressed down. Default 50.
             * @returns `true` if the Key was pressed down within `duration` ms ago, otherwise `false`.
             */
            function DownDuration(key: Phaser.Input.Keyboard.Key, duration?: number): boolean;

            /**
             * The justDown value allows you to test if this Key has just been pressed down or not.
             * 
             * When you check this value it will return `true` if the Key is down, otherwise `false`.
             * 
             * You can only call justDown once per key press. It will only return `true` once, until the Key is released and pressed down again.
             * This allows you to use it in situations where you want to check if this key is down without using an event, such as in a core game loop.
             * @param key The Key to check to see if it's just down or not.
             * @returns `true` if the Key was just pressed, otherwise `false`.
             */
            function JustDown(key: Phaser.Input.Keyboard.Key): boolean;

            /**
             * The justUp value allows you to test if this Key has just been released or not.
             * 
             * When you check this value it will return `true` if the Key is up, otherwise `false`.
             * 
             * You can only call JustUp once per key release. It will only return `true` once, until the Key is pressed down and released again.
             * This allows you to use it in situations where you want to check if this key is up without using an event, such as in a core game loop.
             * @param key The Key to check to see if it's just up or not.
             * @returns `true` if the Key was just released, otherwise `false`.
             */
            function JustUp(key: Phaser.Input.Keyboard.Key): boolean;

            /**
             * Represents a single key on the keyboard. Key objects are created by the Keyboard Plugin
             * via `addKey()` and track the state of a specific key, including whether it is currently
             * held down, the duration it has been held, timestamps for press and release events, and
             * repeat counts. You can poll Key objects directly in your game loop using properties like
             * `isDown` and `isUp`, or listen for events via the `on` method. The keyCode must be an
             * integer corresponding to a `Phaser.Input.Keyboard.KeyCodes` value.
             */
            class Key extends Phaser.Events.EventEmitter {
                /**
                 * 
                 * @param plugin The Keyboard Plugin instance that owns this Key object.
                 * @param keyCode The keycode of this key.
                 */
                constructor(plugin: Phaser.Input.Keyboard.KeyboardPlugin, keyCode: number);

                /**
                 * The Keyboard Plugin instance that owns this Key object.
                 */
                plugin: Phaser.Input.Keyboard.KeyboardPlugin;

                /**
                 * The keycode of this key.
                 */
                keyCode: number;

                /**
                 * The original DOM event.
                 */
                originalEvent: KeyboardEvent;

                /**
                 * Can this Key be processed?
                 */
                enabled: boolean;

                /**
                 * The "down" state of the key. This will remain `true` for as long as the keyboard thinks this key is held down.
                 */
                isDown: boolean;

                /**
                 * The "up" state of the key. This will remain `true` for as long as the keyboard thinks this key is up.
                 */
                isUp: boolean;

                /**
                 * The down state of the ALT key, if pressed at the same time as this key.
                 */
                altKey: boolean;

                /**
                 * The down state of the CTRL key, if pressed at the same time as this key.
                 */
                ctrlKey: boolean;

                /**
                 * The down state of the SHIFT key, if pressed at the same time as this key.
                 */
                shiftKey: boolean;

                /**
                 * The down state of the Meta key, if pressed at the same time as this key.
                 * On a Mac the Meta Key is the Command key. On Windows keyboards, it's the Windows key.
                 */
                metaKey: boolean;

                /**
                 * The location of the modifier key. 0 for standard (or unknown), 1 for left, 2 for right, 3 for numpad.
                 */
                location: number;

                /**
                 * The timestamp when the key was last pressed down.
                 */
                timeDown: number;

                /**
                 * The number of milliseconds this key was held down for in the previous down - up sequence.
                 * This value isn't updated every game step, only when the Key changes state.
                 * To get the current duration use the `getDuration` method.
                 */
                duration: number;

                /**
                 * The timestamp when the key was last released.
                 */
                timeUp: number;

                /**
                 * When a key is held down should it continuously fire the `down` event each time it repeats?
                 * 
                 * By default it will emit the `down` event just once, but if you wish to receive the event
                 * for each repeat as well, enable this property.
                 */
                emitOnRepeat: boolean;

                /**
                 * If a key is held down this holds the number of times the key has 'repeated'.
                 */
                repeats: number;

                /**
                 * Controls if this Key will continuously emit a `down` event while being held down (true),
                 * or emit the event just once, on first press, and then skip future events (false).
                 * @param value Emit `down` events on repeated key down actions, or just once?
                 * @returns This Key instance.
                 */
                setEmitOnRepeat(value: boolean): this;

                /**
                 * Processes the Key Down action for this Key.
                 * Called automatically by the Keyboard Plugin.
                 * @param event The native DOM Keyboard event.
                 */
                onDown(event: KeyboardEvent): void;

                /**
                 * Processes the Key Up action for this Key.
                 * Called automatically by the Keyboard Plugin.
                 * @param event The native DOM Keyboard event.
                 */
                onUp(event: KeyboardEvent): void;

                /**
                 * Resets this Key object back to its default un-pressed state.
                 * 
                 * As of version 3.60.0 it no longer resets the `enabled` or `preventDefault` flags.undefined
                 * @returns This Key instance.
                 */
                reset(): this;

                /**
                 * Returns the duration, in ms, that the Key has been held down for.
                 * 
                 * If the key is not currently down it will return zero.
                 * 
                 * To get the duration the Key was held down for in the previous up-down cycle,
                 * use the `Key.duration` property value instead.undefined
                 * @returns The duration, in ms, that the Key has been held down for if currently down.
                 */
                getDuration(): number;

                /**
                 * Removes any bound event handlers and removes local references.
                 */
                destroy(): void;

            }

            /**
             * A mapping of keyboard key names to their corresponding browser key codes, as reported by
             * `KeyboardEvent.keyCode`. Use these constants with `Phaser.Input.Keyboard.KeyboardPlugin`
             * methods such as `addKey` and `addKeys`, or when checking the state of `Phaser.Input.Keyboard.Key`
             * objects, to avoid hard-coding numeric values in your game code.
             * 
             * Some entries include browser-specific variants (e.g. `SEMICOLON_FIREFOX`) to handle historical
             * differences in key code reporting across browsers.
             */
            namespace KeyCodes {
                /**
                 * The BACKSPACE key.
                 */
                var BACKSPACE: number;

                /**
                 * The TAB key.
                 */
                var TAB: number;

                /**
                 * The ENTER key.
                 */
                var ENTER: number;

                /**
                 * The SHIFT key.
                 */
                var SHIFT: number;

                /**
                 * The CTRL key.
                 */
                var CTRL: number;

                /**
                 * The ALT key.
                 */
                var ALT: number;

                /**
                 * The PAUSE key.
                 */
                var PAUSE: number;

                /**
                 * The CAPS_LOCK key.
                 */
                var CAPS_LOCK: number;

                /**
                 * The ESC key.
                 */
                var ESC: number;

                /**
                 * The SPACE key.
                 */
                var SPACE: number;

                /**
                 * The PAGE_UP key.
                 */
                var PAGE_UP: number;

                /**
                 * The PAGE_DOWN key.
                 */
                var PAGE_DOWN: number;

                /**
                 * The END key.
                 */
                var END: number;

                /**
                 * The HOME key.
                 */
                var HOME: number;

                /**
                 * The LEFT key.
                 */
                var LEFT: number;

                /**
                 * The UP key.
                 */
                var UP: number;

                /**
                 * The RIGHT key.
                 */
                var RIGHT: number;

                /**
                 * The DOWN key.
                 */
                var DOWN: number;

                /**
                 * The PRINT_SCREEN key.
                 */
                var PRINT_SCREEN: number;

                /**
                 * The INSERT key.
                 */
                var INSERT: number;

                /**
                 * The DELETE key.
                 */
                var DELETE: number;

                /**
                 * The ZERO key.
                 */
                var ZERO: number;

                /**
                 * The ONE key.
                 */
                var ONE: number;

                /**
                 * The TWO key.
                 */
                var TWO: number;

                /**
                 * The THREE key.
                 */
                var THREE: number;

                /**
                 * The FOUR key.
                 */
                var FOUR: number;

                /**
                 * The FIVE key.
                 */
                var FIVE: number;

                /**
                 * The SIX key.
                 */
                var SIX: number;

                /**
                 * The SEVEN key.
                 */
                var SEVEN: number;

                /**
                 * The EIGHT key.
                 */
                var EIGHT: number;

                /**
                 * The NINE key.
                 */
                var NINE: number;

                /**
                 * The numeric keypad 0 key.
                 */
                var NUMPAD_ZERO: number;

                /**
                 * The numeric keypad 1 key.
                 */
                var NUMPAD_ONE: number;

                /**
                 * The numeric keypad 2 key.
                 */
                var NUMPAD_TWO: number;

                /**
                 * The numeric keypad 3 key.
                 */
                var NUMPAD_THREE: number;

                /**
                 * The numeric keypad 4 key.
                 */
                var NUMPAD_FOUR: number;

                /**
                 * The numeric keypad 5 key.
                 */
                var NUMPAD_FIVE: number;

                /**
                 * The numeric keypad 6 key.
                 */
                var NUMPAD_SIX: number;

                /**
                 * The numeric keypad 7 key.
                 */
                var NUMPAD_SEVEN: number;

                /**
                 * The numeric keypad 8 key.
                 */
                var NUMPAD_EIGHT: number;

                /**
                 * The numeric keypad 9 key.
                 */
                var NUMPAD_NINE: number;

                /**
                 * The Numpad Addition (+) key.
                 */
                var NUMPAD_ADD: number;

                /**
                 * The Numpad Subtraction (-) key.
                 */
                var NUMPAD_SUBTRACT: number;

                /**
                 * The A key.
                 */
                var A: number;

                /**
                 * The B key.
                 */
                var B: number;

                /**
                 * The C key.
                 */
                var C: number;

                /**
                 * The D key.
                 */
                var D: number;

                /**
                 * The E key.
                 */
                var E: number;

                /**
                 * The F key.
                 */
                var F: number;

                /**
                 * The G key.
                 */
                var G: number;

                /**
                 * The H key.
                 */
                var H: number;

                /**
                 * The I key.
                 */
                var I: number;

                /**
                 * The J key.
                 */
                var J: number;

                /**
                 * The K key.
                 */
                var K: number;

                /**
                 * The L key.
                 */
                var L: number;

                /**
                 * The M key.
                 */
                var M: number;

                /**
                 * The N key.
                 */
                var N: number;

                /**
                 * The O key.
                 */
                var O: number;

                /**
                 * The P key.
                 */
                var P: number;

                /**
                 * The Q key.
                 */
                var Q: number;

                /**
                 * The R key.
                 */
                var R: number;

                /**
                 * The S key.
                 */
                var S: number;

                /**
                 * The T key.
                 */
                var T: number;

                /**
                 * The U key.
                 */
                var U: number;

                /**
                 * The V key.
                 */
                var V: number;

                /**
                 * The W key.
                 */
                var W: number;

                /**
                 * The X key.
                 */
                var X: number;

                /**
                 * The Y key.
                 */
                var Y: number;

                /**
                 * The Z key.
                 */
                var Z: number;

                /**
                 * The F1 key.
                 */
                var F1: number;

                /**
                 * The F2 key.
                 */
                var F2: number;

                /**
                 * The F3 key.
                 */
                var F3: number;

                /**
                 * The F4 key.
                 */
                var F4: number;

                /**
                 * The F5 key.
                 */
                var F5: number;

                /**
                 * The F6 key.
                 */
                var F6: number;

                /**
                 * The F7 key.
                 */
                var F7: number;

                /**
                 * The F8 key.
                 */
                var F8: number;

                /**
                 * The F9 key.
                 */
                var F9: number;

                /**
                 * The F10 key.
                 */
                var F10: number;

                /**
                 * The F11 key.
                 */
                var F11: number;

                /**
                 * The F12 key.
                 */
                var F12: number;

                /**
                 * The SEMICOLON key.
                 */
                var SEMICOLON: number;

                /**
                 * The PLUS key.
                 */
                var PLUS: number;

                /**
                 * The COMMA key.
                 */
                var COMMA: number;

                /**
                 * The MINUS key.
                 */
                var MINUS: number;

                /**
                 * The PERIOD key.
                 */
                var PERIOD: number;

                /**
                 * The FORWARD_SLASH key.
                 */
                var FORWARD_SLASH: number;

                /**
                 * The BACK_SLASH key.
                 */
                var BACK_SLASH: number;

                /**
                 * The QUOTES key.
                 */
                var QUOTES: number;

                /**
                 * The BACKTICK key.
                 */
                var BACKTICK: number;

                /**
                 * The OPEN_BRACKET key.
                 */
                var OPEN_BRACKET: number;

                /**
                 * The CLOSED_BRACKET key.
                 */
                var CLOSED_BRACKET: number;

                /**
                 * The Firefox-specific alternate key code for the SEMICOLON (;) key. Firefox historically
                 * reported key code 59 for this key, whereas other browsers use 186 (see `SEMICOLON`).
                 */
                var SEMICOLON_FIREFOX: number;

                /**
                 * The COLON (:) key.
                 */
                var COLON: number;

                /**
                 * The Firefox on Windows-specific alternate key code for the less-than sign (<) key.
                 */
                var COMMA_FIREFOX_WINDOWS: number;

                /**
                 * The Firefox-specific alternate key code for the greater-than sign (>) key.
                 */
                var COMMA_FIREFOX: number;

                /**
                 * The Firefox-specific alternate key code for the right bracket (]) key. Firefox historically
                 * reported key code 174 for this key, whereas other browsers use 221 (see `CLOSED_BRACKET`).
                 */
                var BRACKET_RIGHT_FIREFOX: number;

                /**
                 * The Firefox-specific alternate key code for the left bracket ([) key. Firefox historically
                 * reported key code 175 for this key, whereas other browsers use 219 (see `OPEN_BRACKET`).
                 */
                var BRACKET_LEFT_FIREFOX: number;

            }

            /**
             * Returns `true` if the Key was released within the `duration` value given, based on the current
             * game clock time. Or returns `false` if it either isn't up, or was released longer ago than the given duration.
             * @param key The Key object to test.
             * @param duration The duration, in ms, within which the key must have been released. Default 50.
             * @returns `true` if the Key was released within `duration` ms ago, otherwise `false`.
             */
            function UpDuration(key: Phaser.Input.Keyboard.Key, duration?: number): boolean;

        }

        namespace Mouse {
            /**
             * The Mouse Manager is a helper class that belongs to the Input Manager.
             * 
             * Its role is to listen for native DOM Mouse Events and then pass them onto the Input Manager for further processing.
             * 
             * You do not need to create this class directly, the Input Manager will create an instance of it automatically.
             */
            class MouseManager {
                /**
                 * 
                 * @param inputManager A reference to the Input Manager.
                 */
                constructor(inputManager: Phaser.Input.InputManager);

                /**
                 * A reference to the Input Manager.
                 */
                manager: Phaser.Input.InputManager;

                /**
                 * If `true` the DOM `mousedown` event will have `preventDefault` set.
                 */
                preventDefaultDown: boolean;

                /**
                 * If `true` the DOM `mouseup` event will have `preventDefault` set.
                 */
                preventDefaultUp: boolean;

                /**
                 * If `true` the DOM `mousemove` event will have `preventDefault` set.
                 */
                preventDefaultMove: boolean;

                /**
                 * If `true` the DOM `wheel` event will have `preventDefault` set.
                 */
                preventDefaultWheel: boolean;

                /**
                 * A boolean that controls if the Mouse Manager is enabled or not.
                 * Can be toggled on the fly.
                 */
                enabled: boolean;

                /**
                 * The Mouse target, as defined in the Game Config.
                 * Typically the canvas to which the game is rendering, but can be any interactive DOM element.
                 */
                target: any;

                /**
                 * If the mouse has been pointer locked successfully this will be set to true.
                 */
                locked: boolean;

                /**
                 * The Mouse Move Event handler.
                 * This function is sent the native DOM MouseEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onMouseMove: Function;

                /**
                 * The Mouse Down Event handler.
                 * This function is sent the native DOM MouseEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onMouseDown: Function;

                /**
                 * The Mouse Up Event handler.
                 * This function is sent the native DOM MouseEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onMouseUp: Function;

                /**
                 * The Mouse Down Event handler specifically for events on the Window.
                 * This function is sent the native DOM MouseEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onMouseDownWindow: Function;

                /**
                 * The Mouse Up Event handler specifically for events on the Window.
                 * This function is sent the native DOM MouseEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onMouseUpWindow: Function;

                /**
                 * The Mouse Over Event handler.
                 * This function is sent the native DOM MouseEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onMouseOver: Function;

                /**
                 * The Mouse Out Event handler.
                 * This function is sent the native DOM MouseEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onMouseOut: Function;

                /**
                 * The Mouse Wheel Event handler.
                 * This function is sent the native DOM MouseEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onMouseWheel: Function;

                /**
                 * Internal pointerLockChange handler.
                 * This function is sent the native DOM MouseEvent.
                 * Initially empty and bound in the `startListeners` method.
                 */
                pointerLockChange: Function;

                /**
                 * Are the event listeners hooked into `window.top` or `window`?
                 * 
                 * This is set during the `boot` sequence. If the browser does not have access to `window.top`,
                 * such as in cross-origin iframe environments, this property gets set to `false` and the events
                 * are hooked into `window` instead.
                 */
                readonly isTop: boolean;

                /**
                 * Attempts to disable the context menu from appearing if you right-click on the game canvas, or specified input target.
                 * 
                 * Works by listening for the `contextmenu` event and prevent defaulting it.
                 * 
                 * Use this if you need to enable right-button mouse support in your game, and the context
                 * menu keeps getting in the way.undefined
                 * @returns This Mouse Manager instance.
                 */
                disableContextMenu(): this;

                /**
                 * If the browser supports it, you can request that the pointer be locked to the browser window.
                 * 
                 * This is classically known as 'FPS controls', where the pointer can't leave the browser until
                 * the user presses an exit key.
                 * 
                 * If the browser successfully enters a locked state, a `POINTER_LOCK_CHANGE_EVENT` will be dispatched,
                 * from the games Input Manager, with an `isPointerLocked` property.
                 * 
                 * It is important to note that pointer lock can only be enabled after an 'engagement gesture',
                 * see: https://w3c.github.io/pointerlock/#dfn-engagement-gesture.
                 * 
                 * Note for Firefox: There is a bug in certain Firefox releases that cause native DOM events like
                 * `mousemove` to fire continuously when in pointer lock mode. You can get around this by setting
                 * `this.preventDefaultMove` to `false` in this class. You may also need to do the same for
                 * `preventDefaultDown` and/or `preventDefaultUp`. Please test combinations of these if you encounter
                 * the error.
                 */
                requestPointerLock(): void;

                /**
                 * If the browser supports pointer lock, this will request that the pointer lock is released. If
                 * the browser successfully exits the locked state, a 'POINTER_LOCK_CHANGE_EVENT' will be
                 * dispatched - from the game's input manager - with an `isPointerLocked` property.
                 */
                releasePointerLock(): void;

                /**
                 * Starts the Mouse Event listeners running.
                 * This is called automatically and does not need to be manually invoked.
                 */
                startListeners(): void;

                /**
                 * Stops the Mouse Event listeners.
                 * This is called automatically and does not need to be manually invoked.
                 */
                stopListeners(): void;

                /**
                 * Destroys this Mouse Manager instance.
                 */
                destroy(): void;

            }

        }

        namespace Touch {
            /**
             * The Touch Manager is a helper class that belongs to the Input Manager.
             * 
             * Its role is to listen for native DOM Touch Events and then pass them onto the Input Manager for further processing.
             * 
             * You do not need to create this class directly, the Input Manager will create an instance of it automatically.
             */
            class TouchManager {
                /**
                 * 
                 * @param inputManager A reference to the Input Manager.
                 */
                constructor(inputManager: Phaser.Input.InputManager);

                /**
                 * A reference to the Input Manager.
                 */
                manager: Phaser.Input.InputManager;

                /**
                 * If true the DOM events will have event.preventDefault applied to them, if false they will propagate fully.
                 */
                capture: boolean;

                /**
                 * A boolean that controls if the Touch Manager is enabled or not.
                 * Can be toggled on the fly.
                 */
                enabled: boolean;

                /**
                 * The Touch Event target, as defined in the Game Config.
                 * Typically the canvas to which the game is rendering, but can be any interactive DOM element.
                 */
                target: any;

                /**
                 * The Touch Start event handler function.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onTouchStart: Function;

                /**
                 * The Touch Start event handler function specifically for events on the Window.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onTouchStartWindow: Function;

                /**
                 * The Touch Move event handler function.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onTouchMove: Function;

                /**
                 * The Touch End event handler function.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onTouchEnd: Function;

                /**
                 * The Touch End event handler function specifically for events on the Window.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onTouchEndWindow: Function;

                /**
                 * The Touch Cancel event handler function.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onTouchCancel: Function;

                /**
                 * The Touch Cancel event handler function specifically for events on the Window.
                 * Initially empty and bound in the `startListeners` method.
                 */
                onTouchCancelWindow: Function;

                /**
                 * Are the event listeners hooked into `window.top` or `window`?
                 * 
                 * This is set during the `boot` sequence. If the browser does not have access to `window.top`,
                 * such as in cross-origin iframe environments, this property gets set to `false` and the events
                 * are hooked into `window` instead.
                 */
                readonly isTop: boolean;

                /**
                 * Attempts to disable the context menu from appearing if you touch-hold on the browser.
                 * 
                 * Works by listening for the `contextmenu` event and calling `preventDefault()` on it.
                 * 
                 * Use this if you need to disable the OS context menu on mobile.undefined
                 * @returns This Touch Manager instance.
                 */
                disableContextMenu(): this;

                /**
                 * Starts the Touch Event listeners running as long as an input target is set.
                 * 
                 * This method is called automatically if Touch Input is enabled in the game config,
                 * which it is by default. However, you can call it manually should you need to
                 * delay input capturing until later in the game.
                 */
                startListeners(): void;

                /**
                 * Stops the Touch Event listeners.
                 * This is called automatically and does not need to be manually invoked.
                 */
                stopListeners(): void;

                /**
                 * Destroys this Touch Manager instance.
                 */
                destroy(): void;

            }

        }

    }

    namespace Loader {
        /**
         * The base File class used by all File Types that the Loader can support. It manages the lifecycle
         * of a single file from queue to download to processing to completion, handling XHR configuration,
         * URL resolution, progress tracking, and error states. You should not create an instance of a File
         * directly, but should extend it with your own class, setting a custom type and overriding the
         * `onProcess` method to handle the loaded data. See `Phaser.Loader.FileTypes` for built-in file
         * type examples.
         */
        class File {
            /**
             * 
             * @param loader The Loader that is going to load this File.
             * @param fileConfig The file configuration object, as created by the file type.
             */
            constructor(loader: Phaser.Loader.LoaderPlugin, fileConfig: Phaser.Types.Loader.FileConfig);

            /**
             * A reference to the Loader that is going to load this file.
             */
            loader: Phaser.Loader.LoaderPlugin;

            /**
             * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.
             */
            cache: Phaser.Cache.BaseCache | Phaser.Textures.TextureManager;

            /**
             * The file type string (image, json, etc) for sorting within the Loader.
             */
            type: string;

            /**
             * Unique cache key (unique within its file type)
             */
            key: string;

            /**
             * The URL of the file, not including baseURL.
             * 
             * Automatically has Loader.path prepended to it if a string.
             * 
             * Can also be a JavaScript Object, such as the results of parsing JSON data.
             */
            url: object | string;

            /**
             * The final URL this file will load from, including baseURL and path.
             * Set automatically when the Loader calls 'load' on this file.
             */
            src: string;

            /**
             * The merged XHRSettings for this file.
             */
            xhrSettings: Phaser.Types.Loader.XHRSettingsObject;

            /**
             * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.
             */
            xhrLoader: XMLHttpRequest | null;

            /**
             * The current state of the file. One of the FILE_CONST values.
             */
            state: number;

            /**
             * The total size of this file.
             * Set by onProgress and only if loading via XHR.
             */
            bytesTotal: number;

            /**
             * Updated as the file loads.
             * Only set if loading via XHR.
             */
            bytesLoaded: number;

            /**
             * A percentage value between 0 and 1 indicating how much of this file has loaded.
             * Only set if loading via XHR.
             */
            percentComplete: number;

            /**
             * For CORS based loading.
             * If this is undefined then the File will check LoaderPlugin.crossOrigin and use that (if set)
             */
            crossOrigin: string | undefined;

            /**
             * The processed file data, stored here after the file has loaded.
             */
            data: any;

            /**
             * A config object that can be used by file types to store transitional data.
             */
            config: any;

            /**
             * If this is a multipart file, i.e. an atlas and its json together, then this is a reference
             * to the parent MultiFile. Set and used internally by the Loader or specific file types.
             */
            multiFile: Phaser.Loader.MultiFile | null;

            /**
             * Does this file have an associated linked file? Such as an image and a normal map.
             * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't
             * actually bound by data, where-as a linkFile is.
             */
            linkFile: Phaser.Loader.File | null;

            /**
             * Does this File contain a data URI?
             */
            base64: boolean;

            /**
             * The counter for the number of times to retry loading this file before it fails.
             * 
             * You can set this property value in the FileConfig object. If not present,
             * this property is read from the `LoaderPlugin.maxRetries` property when
             * this File instance is created.
             * 
             * You can set this value via the Game Config, or you can adjust the `LoaderPlugin` property
             * at any point after the Loader has started. However, it will not apply to files
             * that have already been added to the Loader, only those added after this value
             * is changed.
             */
            retryAttempts: number;

            /**
             * Links this File with another, so they depend upon each other for loading and processing.
             * @param fileB The file to link to this one.
             */
            setLink(fileB: Phaser.Loader.File): void;

            /**
             * Clears the `onload`, `onerror`, and `onprogress` event handlers from the XHRLoader instance
             * this file is using, preventing stale callbacks from firing after the load has completed or errored.
             */
            resetXHR(): void;

            /**
             * Called by the Loader, starts the actual file downloading.
             * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.
             * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.
             */
            load(): void;

            /**
             * Called when the file finishes loading, is sent a DOM ProgressEvent.
             * @param xhr The XMLHttpRequest that caused this onload event.
             * @param event The DOM ProgressEvent that resulted from this load.
             */
            onLoad(xhr: XMLHttpRequest, event: ProgressEvent): void;

            /**
             * Called by the XHRLoader if it was given a File with base64 data to load.
             * @param xhr The FakeXHR object containing the decoded base64 data.
             */
            onBase64Load(xhr: XMLHttpRequest): void;

            /**
             * Called if the file errors while loading. Resets the XHR state, then either decrements
             * `retryAttempts` and retries the load, or signals failure to the Loader via `nextFile`
             * if no retry attempts remain.
             * @param xhr The XMLHttpRequest that caused this onerror event.
             * @param event The DOM ProgressEvent that resulted from this error.
             */
            onError(xhr: XMLHttpRequest, event: ProgressEvent): void;

            /**
             * Called during the file load progress. Is sent a DOM ProgressEvent.
             * @param event The DOM ProgressEvent.
             */
            onProgress(event: ProgressEvent): void;

            /**
             * Usually overridden by the FileTypes and is called by Loader.nextFile.
             * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.
             */
            onProcess(): void;

            /**
             * Called when the File has completed processing.
             * Checks on the state of its multifile, if set.
             */
            onProcessComplete(): void;

            /**
             * Called when the File has completed processing but it generated an error.
             * Checks on the state of its multifile, if set.
             */
            onProcessError(): void;

            /**
             * Checks if a key matching the one used by this file exists in the target Cache or not.
             * This is called automatically by the LoaderPlugin to decide if the file can be safely
             * loaded or will conflict.undefined
             * @returns `true` if adding this file will cause a conflict, otherwise `false`.
             */
            hasCacheConflict(): boolean;

            /**
             * Adds this file to its target cache upon successful loading and processing.
             * This method is often overridden by specific file types.
             */
            addToCache(): void;

            /**
             * Called once the file has been added to its cache and is now ready for deletion from the Loader.
             * It will emit a `filecomplete` event from the LoaderPlugin.
             */
            pendingDestroy(): void;

            /**
             * Destroy this File and any references it holds.
             */
            destroy(): void;

            /**
             * Static method for creating an object URL using the URL API and setting it as the image 'src' attribute.
             * If the URL API is not supported (usually on old browsers) it falls back to creating a Base64 encoded URL using FileReader.
             * @param image Image object which 'src' attribute should be set to object URL.
             * @param blob A Blob object to create an object URL for.
             * @param defaultType Default mime type used if blob type is not available.
             */
            static createObjectURL(image: HTMLImageElement, blob: Blob, defaultType: string): void;

            /**
             * Static method for releasing an existing object URL which was previously created
             * by calling {@link Phaser.Loader.File.createObjectURL} method.
             * @param image Image object which 'src' attribute should be revoked.
             */
            static revokeObjectURL(image: HTMLImageElement): void;

        }

        /**
         * The FileTypesManager is a static object containing a registry of file type loader functions.
         * 
         * Each file type (such as `image`, `audio`, `tilemapTiledJSON`, etc.) registers itself here
         * via the `register` method. When a LoaderPlugin is instantiated, it calls `install` to copy
         * all registered file type methods onto itself, making them available as `this.load.image()`,
         * `this.load.audio()`, and so on within a Scene.
         */
        namespace FileTypesManager {
            /**
             * Static method called when a LoaderPlugin is created.
             * 
             * Loops through the local types object and injects all of them as
             * properties into the LoaderPlugin instance.
             * @param loader The LoaderPlugin to install the types into.
             */
            function install(loader: Phaser.Loader.LoaderPlugin): void;

            /**
             * Static method called directly by the File Types.
             * 
             * The key is a reference to the function used to load the files via the Loader, i.e. `image`.
             * @param key The key that will be used as the method name in the LoaderPlugin.
             * @param factoryFunction The function that will be called when LoaderPlugin.key is invoked.
             */
            function register(key: string, factoryFunction: Function): void;

            /**
             * Removes all associated file types.
             */
            function destroy(): void;

        }

        /**
         * Given a File and a baseURL value, this returns the URL the File will use to download from.
         * 
         * If the file has no URL, `false` is returned. If the file URL is already absolute (i.e. it
         * begins with `blob:`, `data:`, `capacitor://`, `file://`, `http://`, `https://`, or `//`),
         * it is returned as-is. Otherwise, the baseURL is prepended to the file URL to form a
         * complete URL.
         * @param file The File object whose URL will be resolved.
         * @param baseURL A default base URL to prepend when the file URL is relative.
         * @returns The resolved URL the File will use to download from, or `false` if the file has no URL.
         */
        function GetURL(file: Phaser.Loader.File, baseURL: string): string;

        /**
         * The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.
         * You typically interact with it via `this.load` in your Scene. Scenes can have a `preload` method, which is always
         * called before the Scenes `create` method, allowing you to preload assets that the Scene may need.
         * 
         * If you call any `this.load` methods from outside of `Scene.preload` then you need to start the Loader going
         * yourself by calling `Loader.start()`. It's only automatically started during the Scene preload.
         * 
         * The Loader uses a combination of tag loading (eg. Audio elements) and XHR and provides progress and completion events.
         * Files are loaded in parallel by default. The amount of concurrent connections can be controlled in your Game Configuration.
         * 
         * Once the Loader has started loading you are still able to add files to it. These can be injected as a result of a loader
         * event, the type of file being loaded (such as a pack file) or other external events. As long as the Loader hasn't finished
         * simply adding a new file to it, while running, will ensure it's added into the current queue.
         * 
         * Every Scene has its own instance of the Loader and they are bound to the Scene in which they are created. However,
         * assets loaded by the Loader are placed into global game-level caches. For example, loading an XML file will place that
         * file inside `Game.cache.xml`, which is accessible from every Scene in your game, no matter who was responsible
         * for loading it. The same is true of Textures. A texture loaded in one Scene is instantly available to all other Scenes
         * in your game.
         * 
         * The Loader works by using custom File Types. These are stored in the FileTypesManager, which injects them into the Loader
         * when it's instantiated. You can create your own custom file types by extending either the File or MultiFile classes.
         * See those files for more details.
         */
        class LoaderPlugin extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param scene The Scene which owns this Loader instance.
             */
            constructor(scene: Phaser.Scene);

            /**
             * The Scene which owns this Loader instance.
             */
            scene: Phaser.Scene;

            /**
             * A reference to the Scene Systems.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * A reference to the global Cache Manager.
             */
            cacheManager: Phaser.Cache.CacheManager;

            /**
             * A reference to the global Texture Manager.
             */
            textureManager: Phaser.Textures.TextureManager;

            /**
             * A reference to the global Scene Manager.
             */
            protected sceneManager: Phaser.Scenes.SceneManager;

            /**
             * An optional prefix that is automatically prepended to the start of every file key.
             * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`.
             * You can set this directly, or call `Loader.setPrefix()`. It will then affect every file added to the Loader
             * from that point on. It does _not_ change any file already in the load queue.
             */
            prefix: string;

            /**
             * The value of `path`, if set, is placed before any _relative_ file path given. For example:
             * 
             * ```javascript
             * this.load.path = "images/sprites/";
             * this.load.image("ball", "ball.png");
             * this.load.image("tree", "level1/oaktree.png");
             * this.load.image("boom", "http://server.com/explode.png");
             * ```
             * 
             * Would load the `ball` file from `images/sprites/ball.png` and the tree from
             * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL
             * given as it's an absolute URL.
             * 
             * Please note that the path is added before the filename but *after* the baseURL (if set.)
             * 
             * If you set this property directly then it _must_ end with a "/". Alternatively, call `setPath()` and it'll do it for you.
             */
            path: string;

            /**
             * If you want to append a URL before the path of any asset you can set this here.
             * 
             * Useful if allowing the asset base url to be configured outside of the game code.
             * 
             * If you set this property directly then it _must_ end with a "/". Alternatively, call `setBaseURL()` and it'll do it for you.
             */
            baseURL: string;

            /**
             * The number of concurrent / parallel resources to try and fetch at once.
             * 
             * Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all.
             * 
             * The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts.
             */
            maxParallelDownloads: number;

            /**
             * XHR-specific global settings (can be overridden on a per-file basis)
             */
            xhr: Phaser.Types.Loader.XHRSettingsObject;

            /**
             * The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.
             */
            crossOrigin: string;

            /**
             * Optional load type for image files. `XHR` is the default. Set to `HTMLImageElement` to load images using the Image tag instead.
             */
            imageLoadType: string;

            /**
             * An array of all schemes that the Loader considers as being 'local'.
             * 
             * This is populated by the `Phaser.Core.Config#loaderLocalScheme` game configuration setting and defaults to
             * `[ 'file://', 'capacitor://' ]`. Additional local schemes can be added to this array as needed.
             */
            localSchemes: string[];

            /**
             * The total number of files to load. It may not always be accurate because you may add to the Loader during the process
             * of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static.
             */
            totalToLoad: number;

            /**
             * The progress of the current load queue, as a float value between 0 and 1.
             * This is updated automatically as files complete loading.
             * Note that it is possible for this value to go down again if you add content to the current load queue during a load.
             */
            progress: number;

            /**
             * Files are placed in this Set when they're added to the Loader via `addFile`.
             * 
             * They are moved to the `inflight` Set when they start loading, and assuming a successful
             * load, to the `queue` Set for further processing.
             * 
             * By the end of the load process this Set will be empty.
             */
            list: Set<Phaser.Loader.File>;

            /**
             * Files are stored in this Set while they're in the process of being loaded.
             * 
             * Upon a successful load they are moved to the `queue` Set.
             * 
             * By the end of the load process this Set will be empty.
             */
            inflight: Set<Phaser.Loader.File>;

            /**
             * Files are stored in this Set while they're being processed.
             * 
             * If the process is successful they are moved to their final destination, which could be
             * a Cache or the Texture Manager.
             * 
             * At the end of the load process this Set will be empty.
             */
            queue: Set<Phaser.Loader.File>;

            /**
             * The total number of files that failed to load during the most recent load.
             * This value is reset when you call `Loader.start`.
             */
            totalFailed: number;

            /**
             * The total number of files that successfully loaded during the most recent load.
             * This value is reset when you call `Loader.start`.
             */
            totalComplete: number;

            /**
             * The current state of the Loader.
             */
            readonly state: number;

            /**
             * The number of times to retry loading a single file before it fails.
             * 
             * This property is read by the `File` object when it is created and set to
             * the internal property of the same name. It's not used by the Loader itself.
             * 
             * You can set this value via the Game Config, or you can adjust this property
             * at any point after the Loader has started. However, it will not apply to files
             * that have already been added to the Loader, only those added after this value
             * is changed.
             */
            maxRetries: number;

            /**
             * If you want to append a URL before the path of any asset you can set this here.
             * 
             * Useful if allowing the asset base url to be configured outside of the game code.
             * 
             * Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any
             * file _already_ being loaded. To reset it, call this method with no arguments.
             * @param url The URL to use. Leave empty to reset.
             * @returns This Loader object.
             */
            setBaseURL(url?: string): this;

            /**
             * The value of `path`, if set, is placed before any _relative_ file path given. For example:
             * 
             * ```javascript
             * this.load.setPath("images/sprites/");
             * this.load.image("ball", "ball.png");
             * this.load.image("tree", "level1/oaktree.png");
             * this.load.image("boom", "http://server.com/explode.png");
             * ```
             * 
             * Would load the `ball` file from `images/sprites/ball.png` and the tree from
             * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL
             * given as it's an absolute URL.
             * 
             * Please note that the path is added before the filename but *after* the baseURL (if set.)
             * 
             * Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any
             * file _already_ in the load queue. To reset it, call this method with no arguments.
             * @param path The path to use. Leave empty to reset.
             * @returns This Loader object.
             */
            setPath(path?: string): this;

            /**
             * An optional prefix that is automatically prepended to the start of every file key.
             * 
             * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`.
             * 
             * Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any
             * file _already_ in the load queue. To reset it, call this method with no arguments.
             * @param prefix The prefix to use. Leave empty to reset.
             * @returns This Loader object.
             */
            setPrefix(prefix?: string): this;

            /**
             * Sets the Cross Origin Resource Sharing value used when loading files.
             * 
             * Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config.
             * 
             * Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have
             * their own CORs setting. To reset it, call this method with no arguments.
             * 
             * For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
             * @param crossOrigin The value to use for the `crossOrigin` property in the load request.
             * @returns This Loader object.
             */
            setCORS(crossOrigin?: string): this;

            /**
             * Adds a file, or array of files, into the load queue.
             * 
             * The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key
             * used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache.
             * If allowed it will then add the file into the pending list, ready for the load to start. Or, if the load has already
             * started, ready for the next batch of files to be pulled from the list to the inflight queue.
             * 
             * You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`.
             * However you can call this as long as the file given to it is well formed.
             * @param file The file, or array of files, to be added to the load queue.
             */
            addFile(file: Phaser.Loader.File | Phaser.Loader.File[]): void;

            /**
             * Checks the key and type of the given file to see if it will conflict with anything already
             * in a Cache, the Texture Manager, or the list or inflight queues.
             * @param file The file to check the key of.
             * @returns `true` if adding this file will cause a cache or queue conflict, otherwise `false`.
             */
            keyExists(file: Phaser.Loader.File): boolean;

            /**
             * Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call
             * this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the
             * pack data. However, if you've got the data prepared you can pass it to this method.
             * 
             * You can also provide an optional key. If you do then it will only add the entries from that part of the pack into
             * to the load queue. If not specified it will add all entries it finds. For more details about the pack file format
             * see the `LoaderPlugin.pack` method.
             * @param pack The Pack File data to be parsed and have each entry in it added to the load queue.
             * @param packKey An optional key to use from the pack file data.
             * @returns `true` if any files were added to the queue, otherwise `false`.
             */
            addPack(pack: any, packKey?: string): boolean;

            /**
             * Remove the resources listed in an Asset Pack.
             * 
             * This removes Animations from the Animation Manager, Textures from the Texture Manager, and all other assets from their respective caches.
             * It doesn't remove the Pack itself from the JSON cache, if it exists there.
             * If the Pack includes another Pack, its resources will be removed too.
             * @param packKey The key of an Asset Pack in the JSON cache, or a Pack File data.
             * @param dataKey A key in the Pack data, if you want to process only a section of it.
             */
            removePack(packKey: string | object, dataKey?: string): void;

            /**
             * Is the Loader actively loading, or processing loaded files?undefined
             * @returns `true` if the Loader is busy loading or processing, otherwise `false`.
             */
            isLoading(): boolean;

            /**
             * Is the Loader ready to start a new load?undefined
             * @returns `true` if the Loader is ready to start a new load, otherwise `false`.
             */
            isReady(): boolean;

            /**
             * Starts the Loader running. This will reset the progress and totals and then emit a `start` event.
             * If there is nothing in the queue the Loader will immediately complete, otherwise it will start
             * loading the first batch of files.
             * 
             * The Loader is started automatically if the queue is populated within your Scenes `preload` method.
             * 
             * However, outside of this, you need to call this method to start it.
             * 
             * If the Loader is already running this method will simply return.
             */
            start(): void;

            /**
             * Called automatically during the load process.
             * It updates the `progress` value and then emits a progress event, which you can use to
             * display a loading bar in your game.
             */
            updateProgress(): void;

            /**
             * Called automatically once per game step while the Loader is in the LOADING state.
             * Checks whether there is capacity in the inflight queue and, if so, calls `checkLoadQueue`
             * to move more files from the pending list into active loading.
             */
            update(): void;

            /**
             * An internal method called automatically by the XHRLoader belonging to a File.
             * 
             * This method will remove the given file from the inflight Set and update the load progress.
             * If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue.
             * @param file The File that just finished loading, or errored during load.
             * @param success `true` if the file loaded successfully, otherwise `false`.
             */
            nextFile(file: Phaser.Loader.File, success: boolean): void;

            /**
             * An internal method that is called automatically by the File when it has finished processing.
             * 
             * If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called.
             * 
             * It is then removed from the queue. If there are no more files to load `loadComplete` is called.
             * @param file The file that has finished processing.
             */
            fileProcessComplete(file: Phaser.Loader.File): void;

            /**
             * Called at the end when the load queue is exhausted and all files have either loaded or errored.
             * By this point every loaded file will now be in its associated cache and ready for use.
             * 
             * Also clears down the Sets, puts progress to 1 and clears the deletion queue.
             */
            loadComplete(): void;

            /**
             * Adds a File into the pending-deletion queue.
             * @param file The File to be queued for deletion when the Loader completes.
             */
            flagForRemoval(file: Phaser.Loader.File): void;

            /**
             * Converts the given JavaScript object into JSON and triggers a browser download so you can save it locally.
             * 
             * The data must be a plain JavaScript object that can be serialized via `JSON.stringify`. Do not pass a pre-stringified JSON string.
             * @param data The JSON data, ready parsed.
             * @param filename The name to save the JSON file as. Default file.json.
             * @returns This Loader plugin.
             */
            saveJSON(data: any, filename?: string): this;

            /**
             * Causes the browser to save the given data as a file to its default Downloads folder.
             * 
             * Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href
             * to be an ObjectURL based on the given data, and then invokes a click event.
             * @param data The data to be saved. Will be passed through URL.createObjectURL.
             * @param filename The filename to save the file as. Default file.json.
             * @param filetype The file type to use when saving the file. Defaults to JSON. Default application/json.
             * @returns This Loader plugin.
             */
            save(data: any, filename?: string, filetype?: string): this;

            /**
             * Resets the Loader.
             * 
             * This will clear all lists and reset the base URL, path and prefix.
             * 
             * Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted.
             */
            reset(): void;

            /**
             * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.animation('baddieAnims', 'files/BaddieAnims.json');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the JSON Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.animation({
             *     key: 'baddieAnims',
             *     url: 'files/BaddieAnims.json'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.
             * 
             * Once the file has finished loading it will automatically be passed to the global Animation Manager's `fromJSON` method.
             * This will parse all of the JSON data and create animation data from it. This process happens at the very end
             * of the Loader, once every other file in the load queue has finished. The reason for this is to allow you to load
             * both animation data and the images it relies upon in the same load call.
             * 
             * Once the animation data has been parsed you will be able to play animations using that data.
             * Please see the Animation Manager `fromJSON` method for more details about the format and playback.
             * 
             * You can also access the raw animation data from its Cache using its key:
             * 
             * ```javascript
             * this.load.animation('baddieAnims', 'files/BaddieAnims.json');
             * // and later in your game ...
             * var data = this.cache.json.get('baddieAnims');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and
             * this is what you would use to retrieve the text from the JSON Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data"
             * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,
             * rather than the whole file. For example, if your JSON data had a structure like this:
             * 
             * ```json
             * {
             *     "level1": {
             *         "baddies": {
             *             "aliens": {},
             *             "boss": {}
             *         }
             *     },
             *     "level2": {},
             *     "level3": {}
             * }
             * ```
             * 
             * And if you only wanted to create animations from the `boss` data, then you could pass `level1.baddies.boss` as the `dataKey`.
             * 
             * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
             * @param dataKey When the Animation JSON file loads only this property will be stored in the Cache and used to create animation data.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            animation(key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig | Phaser.Types.Loader.FileTypes.JSONFileConfig[], url?: string, dataKey?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Aseprite is a powerful animated sprite editor and pixel art tool.
             * 
             * You can find more details at https://www.aseprite.org/
             * 
             * Adds a JSON based Aseprite Animation, or array of animations, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.aseprite('gladiator', 'images/Gladiator.png', 'images/Gladiator.json');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * To export a compatible JSON file in Aseprite, please do the following:
             * 
             * 1. Go to "File - Export Sprite Sheet"
             * 
             * 2. On the **Layout** tab:
             * 2a. Set the "Sheet type" to "Packed"
             * 2b. Set the "Constraints" to "None"
             * 2c. Check the "Merge Duplicates" checkbox
             * 
             * 3. On the **Sprite** tab:
             * 3a. Set "Layers" to "Visible layers"
             * 3b. Set "Frames" to "All frames", unless you only wish to export a sub-set of tags
             * 
             * 4. On the **Borders** tab:
             * 4a. Check the "Trim Sprite" and "Trim Cells" options
             * 4b. Ensure "Border Padding", "Spacing" and "Inner Padding" are all > 0 (1 is usually enough)
             * 
             * 5. On the **Output** tab:
             * 5a. Check "Output File", give your image a name and make sure you choose "png files" as the file type
             * 5b. Check "JSON Data" and give your json file a name
             * 5c. The JSON Data type can be either a Hash or Array, Phaser doesn't mind.
             * 5d. Make sure "Tags" is checked in the Meta options
             * 5e. In the "Item Filename" input box, make sure it says just "{frame}" and nothing more.
             * 
             * 6. Click export
             * 
             * This was tested with Aseprite 1.2.25.
             * 
             * This will export a png and json file which you can load using the Aseprite Loader.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.aseprite({
             *     key: 'gladiator',
             *     textureURL: 'images/Gladiator.png',
             *     atlasURL: 'images/Gladiator.json'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.AsepriteFileConfig` for more details.
             * 
             * Instead of passing a URL for the JSON data you can also pass in a well formed JSON object instead.
             * 
             * Once loaded, you can call this method from within a Scene with the 'atlas' key:
             * 
             * ```javascript
             * this.anims.createFromAseprite('paladin');
             * ```
             * 
             * Any animations defined in the JSON will now be available to use in Phaser and you play them
             * via their Tag name. For example, if you have an animation called 'War Cry' on your Aseprite timeline,
             * you can play it in Phaser using that Tag name:
             * 
             * ```javascript
             * this.add.sprite(400, 300).play('War Cry');
             * ```
             * 
             * When calling this method you can optionally provide an array of tag names, and only those animations
             * will be created. For example:
             * 
             * ```javascript
             * this.anims.createFromAseprite('paladin', [ 'step', 'War Cry', 'Magnum Break' ]);
             * ```
             * 
             * This will only create the 3 animations defined. Note that the tag names are case-sensitive.
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Aseprite File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
             * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
             * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
             * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            aseprite(key: string | Phaser.Types.Loader.FileTypes.AsepriteFileConfig | Phaser.Types.Loader.FileTypes.AsepriteFileConfig[], textureURL?: string | string[], atlasURL?: object | string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a JSON based Texture Atlas, or array of atlases, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * Phaser expects the atlas data to be provided in a JSON file, using either the JSON Hash or JSON Array format.
             * 
             * These files are created by software such as:
             * 
             * * [Texture Packer](https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm)
             * * [Shoebox](https://renderhjs.net/shoebox/)
             * * [Gamma Texture Packer](https://gammafp.com/tool/atlas-packer/)
             * * [Adobe Flash / Animate](https://www.adobe.com/uk/products/animate.html)
             * * [Free Texture Packer](http://free-tex-packer.com/)
             * * [Leshy SpriteSheet Tool](https://www.leshylabs.com/apps/sstool/)
             * 
             * If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader
             * instead of this one.
             * 
             * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.atlas({
             *     key: 'mainmenu',
             *     textureURL: 'images/MainMenu.png',
             *     atlasURL: 'images/MainMenu.json'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig` for more details.
             * 
             * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.
             * 
             * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:
             * 
             * ```javascript
             * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');
             * // and later in your game ...
             * this.add.image(x, y, 'mainmenu', 'background');
             * ```
             * 
             * To get a list of all available frames within an atlas please consult your Texture Atlas software.
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
             * then you can specify it by providing an array as the `url` where the second element is the normal map:
             * 
             * ```javascript
             * this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json');
             * ```
             * 
             * Or, if you are using a config object use the `normalMap` property:
             * 
             * ```javascript
             * this.load.atlas({
             *     key: 'mainmenu',
             *     textureURL: 'images/MainMenu.png',
             *     normalMap: 'images/MainMenu-n.png',
             *     atlasURL: 'images/MainMenu.json'
             * });
             * ```
             * 
             * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORS and XHR Settings.
             * Normal maps are a WebGL only feature.
             * 
             * Note: The ability to load this type of file will only be available if the Atlas JSON File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
             * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
             * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
             * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            atlas(key: string | Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig | Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[], textureURL?: string | string[], atlasURL?: object | string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an XML based Texture Atlas, or array of atlases, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * Phaser expects the atlas data to be provided in an XML file format.
             * These files are created by software such as Shoebox and Adobe Flash / Animate.
             * 
             * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.atlasXML({
             *     key: 'mainmenu',
             *     textureURL: 'images/MainMenu.png',
             *     atlasURL: 'images/MainMenu.xml'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig` for more details.
             * 
             * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:
             * 
             * ```javascript
             * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');
             * // and later in your game ...
             * this.add.image(x, y, 'mainmenu', 'background');
             * ```
             * 
             * To get a list of all available frames within an atlas please consult your Texture Atlas software.
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
             * then you can specify it by providing an array as the `url` where the second element is the normal map:
             * 
             * ```javascript
             * this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml');
             * ```
             * 
             * Or, if you are using a config object use the `normalMap` property:
             * 
             * ```javascript
             * this.load.atlasXML({
             *     key: 'mainmenu',
             *     textureURL: 'images/MainMenu.png',
             *     normalMap: 'images/MainMenu-n.png',
             *     atlasURL: 'images/MainMenu.xml'
             * });
             * ```
             * 
             * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORS and XHR Settings.
             * Normal maps are a WebGL only feature.
             * 
             * Note: The ability to load this type of file will only be available if the Atlas XML File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
             * @param atlasURL The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `<key>.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml".
             * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
             * @param atlasXhrSettings An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            atlasXML(key: string | Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig | Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig[], textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.audio('title', [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]);
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Audio Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Audio Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.audio({
             *     key: 'title',
             *     url: [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.AudioFileConfig` for more details.
             * 
             * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.
             * 
             * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.
             * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on
             * browser support.
             * 
             * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.
             * 
             * Note: The ability to load this type of file will only be available if the Audio File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param urls The absolute or relative URL to load the audio files from.
             * @param config An object containing an `instances` property for HTML5Audio. Defaults to 1.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            audio(key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig | Phaser.Types.Loader.FileTypes.AudioFileConfig[], urls?: string | string[] | Phaser.Types.Loader.FileTypes.AudioFileURLConfig | Phaser.Types.Loader.FileTypes.AudioFileURLConfig[], config?: any, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.audioSprite('kyobi', 'kyobi.json', [
             *         'kyobi.ogg',
             *         'kyobi.mp3',
             *         'kyobi.m4a'
             *     ]);
             * }
             * ```
             * 
             * Audio Sprites are a combination of audio files and a JSON configuration.
             * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite
             * 
             * If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio
             * files automatically based on its content. To do this exclude the audio URLs from the load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.audioSprite('kyobi', 'kyobi.json');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Audio Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Audio Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.audioSprite({
             *     key: 'kyobi',
             *     jsonURL: 'audio/Kyobi.json',
             *     audioURL: [
             *         'audio/Kyobi.ogg',
             *         'audio/Kyobi.mp3',
             *         'audio/Kyobi.m4a'
             *     ]
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig` for more details.
             * 
             * Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead.
             * 
             * Once the audio has finished loading you can use it create an Audio Sprite by referencing its key:
             * 
             * ```javascript
             * this.load.audioSprite('kyobi', 'kyobi.json');
             * // and later in your game ...
             * var music = this.sound.addAudioSprite('kyobi');
             * music.play('title');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this file's
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the audio sprite from the Audio Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.
             * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on
             * browser support.
             * 
             * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.
             * 
             * Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or an array of objects.
             * @param jsonURL The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.
             * @param audioURL The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file.
             * @param audioConfig The audio configuration options.
             * @param audioXhrSettings An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings.
             * @param jsonXhrSettings An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader.
             */
            audioSprite(key: string | Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig | Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig[], jsonURL: string, audioURL?: string | string[], audioConfig?: any, audioXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, jsonXhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Binary file, or array of Binary files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.binary('doom', 'files/Doom.wad');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Binary Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Binary Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Binary Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.binary({
             *     key: 'doom',
             *     url: 'files/Doom.wad',
             *     dataType: Uint8Array
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.BinaryFileConfig` for more details.
             * 
             * Once the file has finished loading you can access it from its Cache using its key:
             * 
             * ```javascript
             * this.load.binary('doom', 'files/Doom.wad');
             * // and later in your game ...
             * var data = this.cache.binary.get('doom');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Data` the final key will be `LEVEL1.Data` and
             * this is what you would use to retrieve the text from the Binary Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "doom"
             * and no URL is given then the Loader will set the URL to be "doom.bin". It will always add `.bin` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Binary File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.bin`, i.e. if `key` was "alien" then the URL will be "alien.bin".
             * @param dataType Optional type to cast the binary file to once loaded. For example, `Uint8Array`.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            binary(key: string | Phaser.Types.Loader.FileTypes.BinaryFileConfig | Phaser.Types.Loader.FileTypes.BinaryFileConfig[], url?: string, dataType?: any, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an XML based Bitmap Font, or array of fonts, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * Phaser expects the font data to be provided in an XML file format.
             * These files are created by software such as the [Angelcode Bitmap Font Generator](http://www.angelcode.com/products/bmfont/),
             * [Littera](http://kvazars.com/littera/) or [Glyph Designer](https://71squared.com/glyphdesigner)
             * 
             * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.bitmapFont({
             *     key: 'goldenFont',
             *     textureURL: 'images/GoldFont.png',
             *     fontDataURL: 'images/GoldFont.xml'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.BitmapFontFileConfig` for more details.
             * 
             * Once the bitmap font has finished loading you can use the key of it when creating a Bitmap Text Game Object:
             * 
             * ```javascript
             * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');
             * // and later in your game ...
             * this.add.bitmapText(x, y, 'goldenFont', 'Hello World');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use when creating a Bitmap Text object.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
             * then you can specify it by providing an array as the `url` where the second element is the normal map:
             * 
             * ```javascript
             * this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml');
             * ```
             * 
             * Or, if you are using a config object use the `normalMap` property:
             * 
             * ```javascript
             * this.load.bitmapFont({
             *     key: 'goldenFont',
             *     textureURL: 'images/GoldFont.png',
             *     normalMap: 'images/GoldFont-n.png',
             *     fontDataURL: 'images/GoldFont.xml'
             * });
             * ```
             * 
             * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
             * Normal maps are a WebGL only feature.
             * 
             * Note: The ability to load this type of file will only be available if the Bitmap Font File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param textureURL The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
             * @param fontDataURL The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `<key>.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml".
             * @param textureXhrSettings An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings.
             * @param fontDataXhrSettings An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            bitmapFont(key: string | Phaser.Types.Loader.FileTypes.BitmapFontFileConfig | Phaser.Types.Loader.FileTypes.BitmapFontFileConfig[], textureURL?: string | string[], fontDataURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, fontDataXhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a CSS file, or array of CSS files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.css('headers', 'styles/headers.css');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String and not already in-use by another file in the Loader.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.css({
             *     key: 'headers',
             *     url: 'styles/headers.css'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.CSSFileConfig` for more details.
             * 
             * Once the file has finished loading it will automatically be converted into a style DOM element
             * via `document.createElement('style')`. It will have its `defer` property set to false and then the
             * resulting element will be appended to `document.head`. The CSS styles are then applied to the current document.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.css". It will always add `.css` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the CSS File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.css`, i.e. if `key` was "alien" then the URL will be "alien.css".
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            css(key: string | Phaser.Types.Loader.FileTypes.CSSFileConfig | Phaser.Types.Loader.FileTypes.CSSFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Compressed Texture file to the current load queue. This feature is WebGL only.
             * 
             * This method takes a key and a configuration object, which lists the different formats
             * and files associated with them.
             * 
             * The texture format object should be ordered in GPU priority order, with IMG as the last entry.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * preload ()
             * {
             *     this.load.texture('yourPic', {
             *         ASTC: { type: 'PVR', textureURL: 'pic-astc-4x4.pvr' },
             *         PVRTC: { type: 'PVR', textureURL: 'pic-pvrtc-4bpp-rgba.pvr' },
             *         S3TC: { type: 'PVR', textureURL: 'pic-dxt5.pvr' },
             *         IMG: { textureURL: 'pic.png' }
             *     });
             * ```
             * 
             * If you wish to load a texture atlas, provide the `atlasURL` property:
             * 
             * ```javascript
             * preload ()
             * {
             *     const path = 'assets/compressed';
             * 
             *     this.load.texture('yourAtlas', {
             *         'ASTC': { type: 'PVR', textureURL: `${path}/textures-astc-4x4.pvr`, atlasURL: `${path}/textures.json` },
             *         'PVRTC': { type: 'PVR', textureURL: `${path}/textures-pvrtc-4bpp-rgba.pvr`, atlasURL: `${path}/textures-pvrtc-4bpp-rgba.json` },
             *         'S3TC': { type: 'PVR', textureURL: `${path}/textures-dxt5.pvr`, atlasURL: `${path}/textures-dxt5.json` },
             *         'IMG': { textureURL: `${path}/textures.png`, atlasURL: `${path}/textures.json` }
             *     });
             * }
             * ```
             * 
             * If you wish to load a Multi Atlas, as exported from Texture Packer Pro, use the `multiAtlasURL` property instead:
             * 
             * ```javascript
             * preload ()
             * {
             *     const path = 'assets/compressed';
             * 
             *     this.load.texture('yourAtlas', {
             *         'ASTC': { type: 'PVR', multiAtlasURL: `${path}/textures.json`, multiPath: `${path}` },
             *         'PVRTC': { type: 'PVR', multiAtlasURL: `${path}/textures-pvrtc-4bpp-rgba.json`, multiPath: `${path}` },
             *         'S3TC': { type: 'PVR', multiAtlasURL: `${path}/textures-dxt5.json`, multiPath: `${path}` },
             *         'IMG': { multiAtlasURL: `${path}/textures.json`, multiPath: `${path}` }
             *     });
             * }
             * ```
             * 
             * When loading a Multi Atlas you do not need to specify the `textureURL` property as it will be read from the JSON file.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.texture({
             *     key: 'yourPic',
             *     url: {
             *         ASTC: { type: 'PVR', textureURL: 'pic-astc-4x4.pvr' },
             *         PVRTC: { type: 'PVR', textureURL: 'pic-pvrtc-4bpp-rgba.pvr' },
             *         S3TC: { type: 'PVR', textureURL: 'pic-dxt5.pvr' },
             *         IMG: { textureURL: 'pic.png' }
             *    }
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.CompressedTextureFileConfig` for more details.
             * 
             * The number of formats you provide to this function is up to you, but you should ensure you
             * cover the primary platforms where appropriate.
             * 
             * The 'IMG' entry is a fallback to a JPG or PNG, should the browser be unable to load any of the other
             * formats presented to this function. You should really always include this, although it is optional.
             * 
             * Phaser supports loading both the PVR and KTX container formats. Within those, it can parse
             * the following texture compression formats:
             * 
             * ETC
             * ETC1
             * ATC
             * ASTC
             * BPTC
             * RGTC
             * PVRTC
             * S3TC
             * S3TCSRGB
             * 
             * For more information about the benefits of compressed textures please see the
             * following articles:
             * 
             * Texture Compression in 2020 (https://aras-p.info/blog/2020/12/08/Texture-Compression-in-2020/)
             * Compressed GPU Texture Formats (https://themaister.net/blog/2020/08/12/compressed-gpu-texture-formats-a-review-and-compute-shader-decoders-part-1/)
             * 
             * To create compressed texture files use a 3rd party application such as:
             * 
             * Texture Packer (https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?utm_source=ad&utm_medium=banner&utm_campaign=phaser-2018-10-16)
             * PVRTexTool (https://developer.imaginationtech.com/pvrtextool/) - available for Windows, macOS and Linux.
             * ASTC Encoder (https://github.com/ARM-software/astc-encoder)
             * 
             * Compressed textures will appear darker than normal textures. This is because
             * the Web uses sRGB colorspace, but compressed textures are sampled as linear
             * colorspace. You must adjust your textures to be lighter before compression.
             * See https://imagemagick.org/Usage/color_basics/#srgb for more details.
             * You can do this with ImageMagick (https://imagemagick.org/index.php) using
             * the following command:
             * 
             * `magick input.png -set colorspace RGB -colorspace sRGB output.png`
             * 
             * You must ensure that compressed textures meet the following standards for use
             * in WebGL and Phaser:
             * 
             * - PVRTC must have a power-of-two width and height.
             * - MIPMaps, if present, must have a power-of-two width and height.
             * - S3TC, S3TCSRGB, RGTC, and BPTC must have width and height divisible by 4.
             * - ASTC must have a Channel Type of Unsigned Normalized Bytes (UNorm). In fact, all compressed textures should be UNorm, but ASTC presents many other options.
             * 
             * If in doubt, a power-of-two resolution is always a safe bet.
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this file's
             * key. For example, if the prefix was `LEVEL1.` and the key was `Data` the final key will be `LEVEL1.Data` and
             * this is what you would use to retrieve the text from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * Unlike other file loaders in Phaser, the URLs must include the file extension.
             * 
             * Note: The ability to load this type of file will only be available if the Compressed Texture File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The compressed texture configuration object. Not required if passing a config object as the `key` parameter.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            texture(key: string | Phaser.Types.Loader.FileTypes.CompressedTextureFileConfig | Phaser.Types.Loader.FileTypes.CompressedTextureFileConfig[], url?: Phaser.Types.Loader.FileTypes.CompressedTextureFileConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Font file, or array of Font files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.font('Nokia', 'assets/nokia.ttf', 'truetype');
             * }
             * ```
             * 
             * If the font file is open type, you can specify the format:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.font('Nokia', 'assets/nokia.otf', 'opentype');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String and not already in-use by another file in the Loader.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.font({
             *     key: 'Nokia',
             *     url: 'assets/nokia.ttf',
             *     format: 'truetype',
             *     descriptors: { style: 'normal', weight: '400' }
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.FontFileConfig` for more details.
             * 
             * See the MDN documentation at https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace#descriptors for details about the descriptors.
             * 
             * When this file is handled by the Loader, it will create a new Font Face DOM element for it and add it to the document.
             * 
             * You should use the same key given for the font in your Text objects, such as:
             * 
             * ```javascript
             * this.add.text(x, y, 'Hello World', { fontFamily: 'Nokia', fontSize: 48 });
             * ```
             * 
             * See https://developer.mozilla.org/en-US/docs/Web/API/FontFace for more details.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.ttf". It will always add `.ttf` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Font File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.ttf`, i.e. if `key` was "alien" then the URL will be "alien.ttf".
             * @param format The font type. Should be a string, like 'truetype' or 'opentype'. Default 'truetype'.
             * @param descriptors An optional object containing font descriptors for the Font Face. See https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace#descriptors for more details.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            font(key: string | Phaser.Types.Loader.FileTypes.FontFileConfig | Phaser.Types.Loader.FileTypes.FontFileConfig[], url?: string, format?: string, descriptors?: object, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a GLSL file, or array of GLSL files, to the current load queue.
             * In Phaser 3 GLSL files are just plain Text files containing source code.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.glsl('plasma', 'shaders/Plasma.glsl');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Shader Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Shader Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Shader Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.glsl({
             *     key: 'plasma',
             *     url: 'shaders/Plasma.glsl'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.GLSLFileConfig` for more details.
             * 
             * Once the file has finished loading you can access it from its Cache using its key:
             * 
             * ```javascript
             * this.load.glsl('plasma', 'shaders/Plasma.glsl');
             * // and later in your game ...
             * var data = this.cache.shader.get('plasma');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this file's
             * key. For example, if the prefix was `FX.` and the key was `Plasma` the final key will be `FX.Plasma` and
             * this is what you would use to retrieve the text from the Shader Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "plasma"
             * and no URL is given then the Loader will set the URL to be "plasma.glsl". It will always add `.glsl` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the GLSL File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.glsl`, i.e. if `key` was "alien" then the URL will be "alien.glsl".
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            glsl(key: string | Phaser.Types.Loader.FileTypes.GLSLFileConfig | Phaser.Types.Loader.FileTypes.GLSLFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an HTML file, or array of HTML files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.html('story', 'files/LoginForm.html');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global HTML Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the HTML Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the HTML Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.html({
             *     key: 'login',
             *     url: 'files/LoginForm.html'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLFileConfig` for more details.
             * 
             * Once the file has finished loading you can access it from its Cache using its key:
             * 
             * ```javascript
             * this.load.html('login', 'files/LoginForm.html');
             * // and later in your game ...
             * var data = this.cache.html.get('login');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
             * this is what you would use to retrieve the html from the HTML Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "story"
             * and no URL is given then the Loader will set the URL to be "story.html". It will always add `.html` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the HTML File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.html`, i.e. if `key` was "alien" then the URL will be "alien.html".
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            html(key: string | Phaser.Types.Loader.FileTypes.HTMLFileConfig | Phaser.Types.Loader.FileTypes.HTMLFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an HTML File, or array of HTML Files, to the current load queue. When the files are loaded they
             * will be rendered to textures and stored in the Texture Manager.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.htmlTexture({
             *     key: 'instructions',
             *     url: 'content/intro.html',
             *     width: 256,
             *     height: 512
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig` for more details.
             * 
             * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:
             * 
             * ```javascript
             * this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);
             * // and later in your game ...
             * this.add.image(x, y, 'instructions');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.html". It will always add `.html` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * The width and height are the size of the texture to which the HTML will be rendered. It's not possible to determine these
             * automatically, so you will need to provide them, either as arguments or in the file config object.
             * When the HTML file has loaded a new SVG element is created with a size and viewbox set to the width and height given.
             * The SVG file has a body tag added to it, with the HTML file contents included. It then calls `window.Blob` on the SVG,
             * and if successful is added to the Texture Manager, otherwise it fails processing. The overall quality of the rendered
             * HTML depends on your browser, and some of them may not even support the svg / blob process used. Be aware that there are
             * limitations on what HTML can be inside an SVG. You can find out more details in this
             * [Mozilla MDN entry](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas).
             * 
             * Note: The ability to load this type of file will only be available if the HTMLTextureFile File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.html`, i.e. if `key` was "alien" then the URL will be "alien.html".
             * @param width The width of the texture the HTML will be rendered to. Default 512.
             * @param height The height of the texture the HTML will be rendered to. Default 512.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            htmlTexture(key: string | Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig | Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig[], url?: string, width?: number, height?: number, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an Image, or array of Images, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.image('logo', 'images/phaserLogo.png');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
             * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback
             * of animated gifs to Canvas elements.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.image({
             *     key: 'logo',
             *     url: 'images/AtariLogo.png'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.
             * 
             * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:
             * 
             * ```javascript
             * this.load.image('logo', 'images/AtariLogo.png');
             * // and later in your game ...
             * this.add.image(x, y, 'logo');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
             * then you can specify it by providing an array as the `url` where the second element is the normal map:
             * 
             * ```javascript
             * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);
             * ```
             * 
             * Or, if you are using a config object use the `normalMap` property:
             * 
             * ```javascript
             * this.load.image({
             *     key: 'logo',
             *     url: 'images/AtariLogo.png',
             *     normalMap: 'images/AtariLogo-n.png'
             * });
             * ```
             * 
             * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORS and XHR Settings.
             * Normal maps are a WebGL only feature.
             * 
             * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.
             * However, you can set `loader.imageLoadType: "HTMLImageElement"` in the Game Configuration and instead, the Loader will load all images
             * via the Image tag instead.
             * 
             * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            image(key: string | Phaser.Types.Loader.FileTypes.ImageFileConfig | Phaser.Types.Loader.FileTypes.ImageFileConfig[], url?: string | string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a JSON file, or array of JSON files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.json('wavedata', 'files/AlienWaveData.json');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the JSON Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.json({
             *     key: 'wavedata',
             *     url: 'files/AlienWaveData.json'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.
             * 
             * Once the file has finished loading you can access it from its Cache using its key:
             * 
             * ```javascript
             * this.load.json('wavedata', 'files/AlienWaveData.json');
             * // and later in your game ...
             * var data = this.cache.json.get('wavedata');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and
             * this is what you would use to retrieve the text from the JSON Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data"
             * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,
             * rather than the whole file. For example, if your JSON data had a structure like this:
             * 
             * ```json
             * {
             *     "level1": {
             *         "baddies": {
             *             "aliens": {},
             *             "boss": {}
             *         }
             *     },
             *     "level2": {},
             *     "level3": {}
             * }
             * ```
             * 
             * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss` as the `dataKey`.
             * 
             * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object.
             * @param dataKey When the JSON file loads only this property will be stored in the Cache.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            json(key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig | Phaser.Types.Loader.FileTypes.JSONFileConfig[], url?: object | string, dataKey?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.multiatlas('level1', 'images/Level1.json');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * Phaser expects the atlas data to be provided in a JSON file as exported from the application Texture Packer,
             * version 4.6.3 or above, where you have made sure to use the Phaser 3 Export option.
             * 
             * The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and
             * extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps,
             * Phaser will load those as well.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.multiatlas({
             *     key: 'level1',
             *     atlasURL: 'images/Level1.json'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig` for more details.
             * 
             * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.
             * 
             * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:
             * 
             * ```javascript
             * this.load.multiatlas('level1', 'images/Level1.json');
             * // and later in your game ...
             * this.add.image(x, y, 'level1', 'background');
             * ```
             * 
             * To get a list of all available frames within an atlas please consult your Texture Atlas software.
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.json". It will always add `.json` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Multi Atlas File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
             * @param path Optional path to use when loading the textures defined in the atlas data.
             * @param baseURL Optional Base URL to use when loading the textures defined in the atlas data.
             * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            multiatlas(key: string | Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig | Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig[], atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an array of Script files to the current load queue.
             * 
             * The difference between this and the `ScriptFile` file type is that you give an array of scripts to this method,
             * and the scripts are then processed _exactly_ in that order. This allows you to load a bunch of scripts that
             * may have dependencies on each other without worrying about the async nature of traditional script loading.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.scripts('PostProcess', [
             *         'libs/shaders/CopyShader.js',
             *         'libs/postprocessing/EffectComposer.js',
             *         'libs/postprocessing/RenderPass.js',
             *         'libs/postprocessing/MaskPass.js',
             *         'libs/postprocessing/ShaderPass.js',
             *         'libs/postprocessing/AfterimagePass.js'
             *    ]);
             * }
             * ```
             * 
             * In the code above the script files will all be loaded in parallel but only processed (i.e. invoked) in the exact
             * order given in the array.
             * 
             * The files are **not** loaded right away. They are added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the files are queued
             * it means you cannot use the files immediately after calling this method, but must wait for the files to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String and not already in-use by another file in the Loader.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.scripts({
             *     key: 'PostProcess',
             *     url: [
             *         'libs/shaders/CopyShader.js',
             *         'libs/postprocessing/EffectComposer.js',
             *         'libs/postprocessing/RenderPass.js',
             *         'libs/postprocessing/MaskPass.js',
             *         'libs/postprocessing/ShaderPass.js',
             *         'libs/postprocessing/AfterimagePass.js'
             *        ]
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.MultiScriptFileConfig` for more details.
             * 
             * Once all the files have finished loading they will automatically be converted into a script element
             * via `document.createElement('script')`. They will have their language set to JavaScript, `defer` set to
             * false and then the resulting element will be appended to `document.head`. Any code then in the
             * script will be executed. This is done in the exact order the files are specified in the url array.
             * 
             * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.
             * 
             * Note: The ability to load this type of file will only be available if the MultiScript File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.
             * @param extension The default file extension to use if no url is provided. Default 'js'.
             * @param xhrSettings Extra XHR Settings specifically for these files.
             * @returns The Loader instance.
             */
            scripts(key: string | Phaser.Types.Loader.FileTypes.MultiScriptFileConfig | Phaser.Types.Loader.FileTypes.MultiScriptFileConfig[], url?: string[], extension?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Phaser Compact Texture Atlas, or array of them, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.atlasPCT('level1', 'images/Level1.pct');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * Phaser expects the atlas data to be provided in the Phaser Compact Texture format (PCT). This is a compact
             * line-oriented text format that is typically 90-95% smaller than equivalent JSON atlas descriptors while remaining
             * trivially parsable at runtime. A single `.pct` file can describe one or multiple atlas pages (texture images).
             * See the Phaser Compact Texture Atlas Format Specification for a full description of the format.
             * 
             * The way it works internally is that you provide a URL to the PCT data file. Phaser loads this file, decodes it,
             * extracts which texture files it needs to load from its page records, and queues each referenced image. When all
             * images have loaded, the atlas is assembled as a single multi-source Texture in the Texture Manager, and the
             * decoded PCT data is stored in the Atlas Cache under the same key.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.atlasPCT({
             *     key: 'level1',
             *     atlasURL: 'images/Level1.pct'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.PCTAtlasFileConfig` for more details.
             * 
             * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:
             * 
             * ```javascript
             * this.load.atlasPCT('level1', 'images/Level1.pct');
             * // and later in your game ...
             * this.add.image(x, y, 'level1', 'background');
             * ```
             * 
             * The decoded PCT data (including page, folder and frame metadata) is also available from the Atlas Cache:
             * 
             * ```javascript
             * var data = this.cache.atlas.get('level1');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.pct". It will always add `.pct` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the PCT Atlas File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param atlasURL The absolute or relative URL to load the PCT data file from. If undefined or `null` it will be set to `<key>.pct`, i.e. if `key` was "alien" then the URL will be "alien.pct".
             * @param path Optional path to use when loading the textures defined in the PCT data.
             * @param baseURL Optional Base URL to use when loading the textures defined in the PCT data.
             * @param atlasXhrSettings An XHR Settings configuration object for the PCT data file. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            atlasPCT(key: string | Phaser.Types.Loader.FileTypes.PCTAtlasFileConfig | Phaser.Types.Loader.FileTypes.PCTAtlasFileConfig[], atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a JSON File Pack, or array of packs, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.pack('level1', 'data/Level1Files.json');
             * }
             * ```
             * 
             * A File Pack is a JSON file (or object) that contains details about other files that should be added into the Loader.
             * Here is a small example:
             * 
             * ```json
             * {
             *    "test1": {
             *        "files": [
             *            {
             *                "type": "image",
             *                "key": "taikodrummaster",
             *                "url": "assets/pics/taikodrummaster.jpg"
             *            },
             *            {
             *                "type": "image",
             *                "key": "sukasuka-chtholly",
             *                "url": "assets/pics/sukasuka-chtholly.png"
             *            }
             *        ]
             *    },
             *    "meta": {
             *        "generated": "1401380327373",
             *        "app": "Phaser 3 Asset Packer",
             *        "url": "https://phaser.io",
             *        "version": "1.0",
             *        "copyright": "Photon Storm Ltd. 2018"
             *    }
             * }
             * ```
             * 
             * The pack can be split into sections. In the example above you'll see a section called `test1`. You can tell
             * the `load.pack` method to parse only a particular section of a pack. The pack is stored in the JSON Cache,
             * so you can pass it to the Loader to process additional sections as needed in your game, or you can just load
             * them all at once without specifying anything.
             * 
             * The pack file can contain an entry for any type of file that Phaser can load. The object structures exactly
             * match that of the file type configs, and all properties available within the file type configs can be used
             * in the pack file too. An entry's `type` is the name of the Loader method that will load it, e.g., 'image'.
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the JSON Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.pack({
             *     key: 'level1',
             *     url: 'data/Level1Files.json'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.PackFileConfig` for more details.
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and
             * this is what you would use to retrieve the text from the JSON Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data"
             * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,
             * rather than the whole file. For example, if your JSON data had a structure like this:
             * 
             * ```json
             * {
             *     "level1": {
             *         "baddies": {
             *             "aliens": {},
             *             "boss": {}
             *         }
             *     },
             *     "level2": {},
             *     "level3": {}
             * }
             * ```
             * 
             * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss` as the `dataKey`.
             * 
             * Note: The ability to load this type of file will only be available if the Pack File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
             * @param dataKey When the JSON file loads only this property will be stored in the Cache.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            pack(key: string | Phaser.Types.Loader.FileTypes.PackFileConfig | Phaser.Types.Loader.FileTypes.PackFileConfig[], url?: string, dataKey?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Plugin Script file, or array of plugin files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.plugin('modplayer', 'plugins/ModPlayer.js');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String and not already in-use by another file in the Loader.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.plugin({
             *     key: 'modplayer',
             *     url: 'plugins/ModPlayer.js'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.PluginFileConfig` for more details.
             * 
             * Once the file has finished loading it will automatically be converted into a script element
             * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to
             * false and then the resulting element will be appended to `document.head`. Any code then in the
             * script will be executed. It will then be passed to the Phaser PluginCache.register method.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Plugin File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.js`, i.e. if `key` was "alien" then the URL will be "alien.js". Or, a plugin function.
             * @param start Automatically start the plugin after loading?
             * @param mapping If this plugin is to be injected into the Scene, this is the property key used.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            plugin(key: string | Phaser.Types.Loader.FileTypes.PluginFileConfig | Phaser.Types.Loader.FileTypes.PluginFileConfig[], url?: string | Function, start?: boolean, mapping?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they
             * will be rendered to bitmap textures and stored in the Texture Manager.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.svg('morty', 'images/Morty.svg');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.svg({
             *     key: 'morty',
             *     url: 'images/Morty.svg'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.SVGFileConfig` for more details.
             * 
             * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:
             * 
             * ```javascript
             * this.load.svg('morty', 'images/Morty.svg');
             * // and later in your game ...
             * this.add.image(x, y, 'morty');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.svg". It will always add `.svg` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture
             * at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down
             * or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize
             * the SVG to:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 });
             * }
             * ```
             * 
             * Or when using a configuration object:
             * 
             * ```javascript
             * this.load.svg({
             *     key: 'morty',
             *     url: 'images/Morty.svg',
             *     svgConfig: {
             *         width: 300,
             *         height: 600
             *     }
             * });
             * ```
             * 
             * Alternatively, you can just provide a scale factor instead:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 });
             * }
             * ```
             * 
             * Or when using a configuration object:
             * 
             * ```javascript
             * this.load.svg({
             *     key: 'morty',
             *     url: 'images/Morty.svg',
             *     svgConfig: {
             *         scale: 2.5
             *     }
             * });
             * ```
             * 
             * If scale, width and height values are all given, the scale has priority and the width and height values are ignored.
             * 
             * Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg".
             * @param svgConfig The svg size configuration object.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            svg(key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig | Phaser.Types.Loader.FileTypes.SVGFileConfig[], url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an external Scene file, or array of Scene files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.sceneFile('Level1', 'src/Level1.js');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Scene Manager upon a successful load.
             * 
             * For a Scene File it's vitally important that the key matches the class name in the JavaScript file.
             * 
             * For example here is the source file:
             * 
             * ```javascript
             * class ExternalScene extends Phaser.Scene {
             * 
             *     constructor ()
             *     {
             *         super('myScene');
             *     }
             * 
             * }
             * ```
             * 
             * Because the class is called `ExternalScene` that is the exact same key you must use when loading it:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.sceneFile('ExternalScene', 'src/yourScene.js');
             * }
             * ```
             * 
             * The key that is used within the Scene Manager can either be set to the same, or you can override it in the Scene
             * constructor, as we've done in the example above, where the Scene key was changed to `myScene`.
             * 
             * The key should be unique both in terms of files being loaded and Scenes already present in the Scene Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Scene Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.sceneFile({
             *     key: 'Level1',
             *     url: 'src/Level1.js'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.SceneFileConfig` for more details.
             * 
             * Once the file has finished loading it will be added to the Scene Manager.
             * 
             * ```javascript
             * this.load.sceneFile('Level1', 'src/Level1.js');
             * // and later in your game ...
             * this.scene.start('Level1');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `WORLD1.` and the key was `Story` the final key will be `WORLD1.Story` and
             * this is what you would use to retrieve the text from the Scene Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "story"
             * and no URL is given then the Loader will set the URL to be "story.js". It will always add `.js` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Scene File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.js`, i.e. if `key` was "alien" then the URL will be "alien.js".
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            sceneFile(key: string | Phaser.Types.Loader.FileTypes.SceneFileConfig | Phaser.Types.Loader.FileTypes.SceneFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Scene Plugin Script file, or array of plugin files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.scenePlugin('ModPlayer', 'plugins/ModPlayer.js', 'modPlayer', 'mods');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String and not already in-use by another file in the Loader.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.scenePlugin({
             *     key: 'modplayer',
             *     url: 'plugins/ModPlayer.js'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.ScenePluginFileConfig` for more details.
             * 
             * Once the file has finished loading it will automatically be converted into a script element
             * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to
             * false and then the resulting element will be appended to `document.head`. Any code then in the
             * script will be executed. The plugin class is then retrieved from the global `window` object using
             * the file key and installed into the Scene via the Plugin Manager using `installScenePlugin`.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.js`, i.e. if `key` was "alien" then the URL will be "alien.js". Or, set to a plugin function.
             * @param systemKey If this plugin is to be added to Scene.Systems, this is the property key for it.
             * @param sceneKey If this plugin is to be added to the Scene, this is the property key for it.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            scenePlugin(key: string | Phaser.Types.Loader.FileTypes.ScenePluginFileConfig | Phaser.Types.Loader.FileTypes.ScenePluginFileConfig[], url?: string | Function, systemKey?: string, sceneKey?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Script file, or array of Script files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.script('aliens', 'lib/aliens.js');
             * }
             * ```
             * 
             * If the script file contains a module, then you should specify that using the 'type' parameter:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.script('aliens', 'lib/aliens.js', 'module');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String and not already in-use by another file in the Loader.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.script({
             *     key: 'aliens',
             *     url: 'lib/aliens.js',
             *     type: 'script' // or 'module'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.ScriptFileConfig` for more details.
             * 
             * Once the file has finished loading it will automatically be converted into a script element
             * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to
             * false and then the resulting element will be appended to `document.head`. Any code then in the
             * script will be executed.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.js`, i.e. if `key` was "alien" then the URL will be "alien.js".
             * @param type The script type. Should be either 'script' for classic JavaScript, or 'module' if the file contains an exported module. Default 'script'.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            script(key: string | Phaser.Types.Loader.FileTypes.ScriptFileConfig | Phaser.Types.Loader.FileTypes.ScriptFileConfig[], url?: string, type?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Sprite Sheet Image, or array of Sprite Sheet Images, to the current load queue.
             * 
             * The term 'Sprite Sheet' in Phaser means a fixed-size sheet. Where every frame in the sheet is the exact same size,
             * and you reference those frames using numbers, not frame names. This is not the same thing as a Texture Atlas, where
             * the frames are packed in a way where they take up the least amount of space, and are referenced by their names,
             * not numbers. Some articles and software use the term 'Sprite Sheet' to mean Texture Atlas, so please be aware of
             * what sort of file you're actually trying to load.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
             * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback
             * of animated gifs to Canvas elements.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.spritesheet({
             *     key: 'bot',
             *     url: 'images/robot.png',
             *     frameConfig: {
             *         frameWidth: 32,
             *         frameHeight: 38,
             *         startFrame: 0,
             *         endFrame: 8
             *     }
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig` for more details.
             * 
             * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:
             * 
             * ```javascript
             * this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });
             * // and later in your game ...
             * this.add.image(x, y, 'bot', 0);
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `PLAYER.` and the key was `Running` the final key will be `PLAYER.Running` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
             * then you can specify it by providing an array as the `url` where the second element is the normal map:
             * 
             * ```javascript
             * this.load.spritesheet('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ], { frameWidth: 256, frameHeight: 80 });
             * ```
             * 
             * Or, if you are using a config object use the `normalMap` property:
             * 
             * ```javascript
             * this.load.spritesheet({
             *     key: 'logo',
             *     url: 'images/AtariLogo.png',
             *     normalMap: 'images/AtariLogo-n.png',
             *     frameConfig: {
             *         frameWidth: 256,
             *         frameHeight: 80
             *     }
             * });
             * ```
             * 
             * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORS and XHR Settings.
             * Normal maps are a WebGL only feature.
             * 
             * Note: The ability to load this type of file will only be available if the Sprite Sheet File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
             * @param frameConfig The frame configuration object. At a minimum it should have a `frameWidth` property.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            spritesheet(key: string | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig[], url?: string, frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Text file, or array of Text files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.text('story', 'files/IntroStory.txt');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Text Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Text Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.text({
             *     key: 'story',
             *     url: 'files/IntroStory.txt'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.
             * 
             * Once the file has finished loading you can access it from its Cache using its key:
             * 
             * ```javascript
             * this.load.text('story', 'files/IntroStory.txt');
             * // and later in your game ...
             * var data = this.cache.text.get('story');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
             * this is what you would use to retrieve the text from the Text Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "story"
             * and no URL is given then the Loader will set the URL to be "story.txt". It will always add `.txt` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt".
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            text(key: string | Phaser.Types.Loader.FileTypes.TextFileConfig | Phaser.Types.Loader.FileTypes.TextFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a CSV Tilemap file, or array of CSV files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.tilemapCSV('level1', 'maps/Level1.csv');
             * }
             * ```
             * 
             * Tilemap CSV data can be created in a text editor, or a 3rd party app that exports as CSV.
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Tilemap Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.tilemapCSV({
             *     key: 'level1',
             *     url: 'maps/Level1.csv'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig` for more details.
             * 
             * Once the file has finished loading you can access it from its Cache using its key:
             * 
             * ```javascript
             * this.load.tilemapCSV('level1', 'maps/Level1.csv');
             * // and later in your game ...
             * var map = this.make.tilemap({ key: 'level1' });
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
             * this is what you would use to retrieve the text from the Tilemap Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "level"
             * and no URL is given then the Loader will set the URL to be "level.csv". It will always add `.csv` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Tilemap CSV File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.csv`, i.e. if `key` was "alien" then the URL will be "alien.csv".
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            tilemapCSV(key: string | Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig | Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds an Impact.js Tilemap file, or array of map files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.tilemapImpact('level1', 'maps/Level1.json');
             * }
             * ```
             * 
             * Impact Tilemap data is created by the Impact.js Map Editor called Weltmeister.
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Tilemap Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.tilemapImpact({
             *     key: 'level1',
             *     url: 'maps/Level1.json'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig` for more details.
             * 
             * Once the file has finished loading you can access it from its Cache using its key:
             * 
             * ```javascript
             * this.load.tilemapImpact('level1', 'maps/Level1.json');
             * // and later in your game ...
             * var map = this.make.tilemap({ key: 'level1' });
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
             * this is what you would use to retrieve the text from the Tilemap Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "level"
             * and no URL is given then the Loader will set the URL to be "level.json". It will always add `.json` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Tilemap Impact File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            tilemapImpact(key: string | Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig | Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Tiled JSON Tilemap file, or array of map files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.tilemapTiledJSON('level1', 'maps/Level1.json');
             * }
             * ```
             * 
             * The Tilemap data is created using the Tiled Map Editor and selecting JSON as the export format.
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Tilemap Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.tilemapTiledJSON({
             *     key: 'level1',
             *     url: 'maps/Level1.json'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig` for more details.
             * 
             * Once the file has finished loading you can access it from its Cache using its key:
             * 
             * ```javascript
             * this.load.tilemapTiledJSON('level1', 'maps/Level1.json');
             * // and later in your game ...
             * var map = this.make.tilemap({ key: 'level1' });
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
             * this is what you would use to retrieve the map from the Tilemap Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "level"
             * and no URL is given then the Loader will set the URL to be "level.json". It will always add `.json` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the Tilemap JSON File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            tilemapTiledJSON(key: string | Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig | Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[], url?: object | string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.meta');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
             * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.
             * 
             * Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity.
             * 
             * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
             * 
             * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Texture Manager first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.unityAtlas({
             *     key: 'mainmenu',
             *     textureURL: 'images/MainMenu.png',
             *     atlasURL: 'images/MainMenu.meta'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig` for more details.
             * 
             * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:
             * 
             * ```javascript
             * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.meta');
             * // and later in your game ...
             * this.add.image(x, y, 'mainmenu', 'background');
             * ```
             * 
             * To get a list of all available frames within an atlas please consult your Texture Atlas software.
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
             * this is what you would use to retrieve the image from the Texture Manager.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
             * and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
             * then you can specify it by providing an array as the `url` where the second element is the normal map:
             * 
             * ```javascript
             * this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.meta');
             * ```
             * 
             * Or, if you are using a config object use the `normalMap` property:
             * 
             * ```javascript
             * this.load.unityAtlas({
             *     key: 'mainmenu',
             *     textureURL: 'images/MainMenu.png',
             *     normalMap: 'images/MainMenu-n.png',
             *     atlasURL: 'images/MainMenu.meta'
             * });
             * ```
             * 
             * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
             * Normal maps are a WebGL only feature.
             * 
             * Note: The ability to load this type of file will only be available if the Unity Atlas File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
             * @param atlasURL The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `<key>.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt".
             * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
             * @param atlasXhrSettings An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            unityAtlas(key: string | Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig | Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig[], textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

            /**
             * Adds a Video file, or array of video files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.video('intro', [ 'video/level1.mp4', 'video/level1.webm', 'video/level1.mov' ]);
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global Video Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the Video Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the Video Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.video({
             *     key: 'intro',
             *     url: [ 'video/level1.mp4', 'video/level1.webm', 'video/level1.mov' ],
             *     noAudio: true
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.VideoFileConfig` for more details.
             * 
             * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.
             * 
             * Due to different browsers supporting different video file types you should usually provide your video files in a variety of formats.
             * mp4, mov and webm are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on
             * browser support, starting with the first in the array and progressing to the end.
             * 
             * Unlike most asset-types, videos do not _need_ to be preloaded. You can create a Video Game Object and then call its `loadURL` method,
             * to load a video at run-time, rather than in advance.
             * 
             * Note: The ability to load this type of file will only be available if the Video File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param urls The absolute or relative URL to load the video files from.
             * @param noAudio Does the video have an audio track? If not you can enable auto-playing on it. Default false.
             * @returns The Loader instance.
             */
            video(key: string | Phaser.Types.Loader.FileTypes.VideoFileConfig | Phaser.Types.Loader.FileTypes.VideoFileConfig[], urls?: string | string[] | Phaser.Types.Loader.FileTypes.VideoFileURLConfig | Phaser.Types.Loader.FileTypes.VideoFileURLConfig[], noAudio?: boolean): this;

            /**
             * Adds an XML file, or array of XML files, to the current load queue.
             * 
             * You can call this method from within your Scene's `preload`, along with any other files you wish to load:
             * 
             * ```javascript
             * function preload ()
             * {
             *     this.load.xml('wavedata', 'files/AlienWaveData.xml');
             * }
             * ```
             * 
             * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
             * or if it's already running, when the next free load slot becomes available. This happens automatically if you
             * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
             * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
             * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
             * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
             * loaded.
             * 
             * The key must be a unique String. It is used to add the file to the global XML Cache upon a successful load.
             * The key should be unique both in terms of files being loaded and files already present in the XML Cache.
             * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
             * then remove it from the XML Cache first, before loading a new one.
             * 
             * Instead of passing arguments you can pass a configuration object, such as:
             * 
             * ```javascript
             * this.load.xml({
             *     key: 'wavedata',
             *     url: 'files/AlienWaveData.xml'
             * });
             * ```
             * 
             * See the documentation for `Phaser.Types.Loader.FileTypes.XMLFileConfig` for more details.
             * 
             * Once the file has finished loading you can access it from its Cache using its key:
             * 
             * ```javascript
             * this.load.xml('wavedata', 'files/AlienWaveData.xml');
             * // and later in your game ...
             * var data = this.cache.xml.get('wavedata');
             * ```
             * 
             * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
             * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and
             * this is what you would use to retrieve the text from the XML Cache.
             * 
             * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
             * 
             * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data"
             * and no URL is given then the Loader will set the URL to be "data.xml". It will always add `.xml` as the extension, although
             * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.
             * 
             * Note: The ability to load this type of file will only be available if the XML File type has been built into Phaser.
             * It is available in the default build but can be excluded from custom builds.
             * @param key The key to use for this file, or a file configuration object, or array of them.
             * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml".
             * @param xhrSettings An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.
             * @returns The Loader instance.
             */
            xml(key: string | Phaser.Types.Loader.FileTypes.XMLFileConfig | Phaser.Types.Loader.FileTypes.XMLFileConfig[], url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): this;

        }

        /**
         * Takes two XHRSettings Objects and creates a new XHRSettings object from them.
         * 
         * The new object is seeded by the values given in the global settings, but any setting in
         * the local object overrides the global ones.
         * @param global The global XHRSettings object.
         * @param local The local XHRSettings object.
         * @returns A newly formed XHRSettings object.
         */
        function MergeXHRSettings(global: Phaser.Types.Loader.XHRSettingsObject, local: Phaser.Types.Loader.XHRSettingsObject): Phaser.Types.Loader.XHRSettingsObject;

        /**
         * A MultiFile is a composite file that groups two or more individual File objects as children and
         * coordinates their loading and processing as a single unit. When all child files have loaded, the
         * MultiFile's `addToCache` method is called to combine the results (e.g., associating a texture
         * image with its JSON atlas data). It is commonly extended as a base class for file types such as
         * AtlasJSON, BitmapFont, and AudioSprite. You should not create an instance directly, but extend
         * it and override `addToCache`.
         */
        class MultiFile {
            /**
             * 
             * @param loader The Loader that is going to load this File.
             * @param type The file type string for sorting within the Loader.
             * @param key The key of the file within the loader.
             * @param files An array of Files that make-up this MultiFile.
             */
            constructor(loader: Phaser.Loader.LoaderPlugin, type: string, key: string, files: Phaser.Loader.File[]);

            /**
             * A reference to the Loader that is going to load this file.
             */
            loader: Phaser.Loader.LoaderPlugin;

            /**
             * The file type string for sorting within the Loader.
             */
            type: string;

            /**
             * Unique cache key (unique within its file type).
             */
            key: string;

            /**
             * Array of files that make up this MultiFile.
             */
            files: Phaser.Loader.File[];

            /**
             * The current state of the file. One of the FILE_CONST values.
             */
            state: number;

            /**
             * The completion status of this MultiFile.
             */
            complete: boolean;

            /**
             * The number of child files still pending completion. Starts at the total number of child
             * files and is decremented each time a child file finishes loading. When it reaches zero,
             * all children have finished and the MultiFile may be processed.
             */
            pending: number;

            /**
             * The number of files that failed to load.
             */
            failed: number;

            /**
             * A storage container for transient data that the loading files need.
             */
            config: any;

            /**
             * A reference to the Loaders baseURL at the time this MultiFile was created.
             * Used to populate child-files.
             */
            baseURL: string;

            /**
             * A reference to the Loaders path at the time this MultiFile was created.
             * Used to populate child-files.
             */
            path: string;

            /**
             * A reference to the Loaders prefix at the time this MultiFile was created.
             * Used to populate child-files.
             */
            prefix: string;

            /**
             * Checks if this MultiFile is ready to process its children or not.undefined
             * @returns `true` if all children of this MultiFile have loaded, otherwise `false`.
             */
            isReadyToProcess(): boolean;

            /**
             * Adds another child to this MultiFile, increases the pending count and resets the completion status.
             * @param file The File to add to this MultiFile.
             * @returns This MultiFile instance.
             */
            addToMultiFile(file: Phaser.Loader.File): Phaser.Loader.MultiFile;

            /**
             * Called by each File when it finishes loading.
             * @param file The File that has completed processing.
             */
            onFileComplete(file: Phaser.Loader.File): void;

            /**
             * Called by each File that fails to load.
             * @param file The File that has failed to load.
             */
            onFileFailed(file: Phaser.Loader.File): void;

            /**
             * Called once all children of this MultiFile have been added to their caches and the
             * MultiFile is now ready for deletion from the Loader.
             * 
             * It will emit a `filecomplete` event from the LoaderPlugin.
             */
            pendingDestroy(): void;

            /**
             * Destroy this Multi File and any references it holds.
             */
            destroy(): void;

        }

        /**
         * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings
         * and starts the download of it. It uses the File's own XHRSettings and merges them
         * with the global XHRSettings object to set the xhr values before download.
         * @param file The File to download.
         * @param globalXHRSettings The global XHRSettings object.
         * @returns The XHR object. For base64 files, `file.onBase64Load` is called directly and this function returns `undefined`.
         */
        function XHRLoader(file: Phaser.Loader.File, globalXHRSettings: Phaser.Types.Loader.XHRSettingsObject): XMLHttpRequest;

        /**
         * Creates an XHRSettings Object with default values.
         * 
         * The XHRSettings object is used by the Phaser Loader when making XMLHttpRequest calls
         * to fetch external assets such as images, audio, JSON, and other files. You can pass a
         * custom XHRSettings object to individual file load calls (e.g., `this.load.image`) to
         * override the default request configuration on a per-file basis, or set global defaults
         * via the Loader's `xhr` property. This is useful when loading from servers that require
         * authentication credentials, custom headers, a specific MIME type override, or a
         * non-default response type.
         * @param responseType The responseType, such as 'text'. Default ''.
         * @param async Should the XHR request use async or not? Default true.
         * @param user Optional username for the XHR request. Default ''.
         * @param password Optional password for the XHR request. Default ''.
         * @param timeout Optional XHR timeout value, in milliseconds. A value of 0 disables the timeout. Default 0.
         * @param withCredentials Optional XHR withCredentials value. Default false.
         * @returns The XHRSettings object as used by the Loader.
         */
        function XHRSettings(responseType?: XMLHttpRequestResponseType, async?: boolean, user?: string, password?: string, timeout?: number, withCredentials?: boolean): Phaser.Types.Loader.XHRSettingsObject;

        /**
         * The Loader is idle.
         */
        var LOADER_IDLE: number;

        /**
         * The Loader is actively loading.
         */
        var LOADER_LOADING: number;

        /**
         * The Loader is processing files it has loaded.
         */
        var LOADER_PROCESSING: number;

        /**
         * The Loader has completed loading and processing.
         */
        var LOADER_COMPLETE: number;

        /**
         * The Loader is shutting down.
         */
        var LOADER_SHUTDOWN: number;

        /**
         * The Loader has been destroyed.
         */
        var LOADER_DESTROYED: number;

        /**
         * File is in the load queue but not yet started.
         */
        var FILE_PENDING: number;

        /**
         * File has started loading by the loader (onLoad called).
         */
        var FILE_LOADING: number;

        /**
         * File has loaded successfully, awaiting processing.
         */
        var FILE_LOADED: number;

        /**
         * File failed to load.
         */
        var FILE_FAILED: number;

        /**
         * File is being processed (onProcess callback).
         */
        var FILE_PROCESSING: number;

        /**
         * The file encountered an error during processing.
         */
        var FILE_ERRORED: number;

        /**
         * File has finished processing.
         */
        var FILE_COMPLETE: number;

        /**
         * File has been destroyed.
         */
        var FILE_DESTROYED: number;

        /**
         * File was populated from local data and doesn't need an HTTP request.
         */
        var FILE_POPULATED: number;

        /**
         * File is pending destruction.
         */
        var FILE_PENDING_DESTROY: number;

        namespace Events {
            /**
             * The Loader Plugin Add File Event.
             * 
             * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.
             * 
             * Listen to it from a Scene using: `this.load.on('addfile', listener)`.
             * 
             * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.
             */
            const ADD: string;

            /**
             * The Loader Plugin Complete Event.
             * 
             * This event is dispatched when the Loader has fully processed everything in the load queue.
             * By this point every loaded file will now be in its associated cache and ready for use.
             * 
             * Listen to it from a Scene using: `this.load.on('complete', listener)`.
             */
            const COMPLETE: string;

            /**
             * The File Load Complete Event.
             * 
             * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading.
             * 
             * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.
             * 
             * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.
             * 
             * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.
             */
            const FILE_COMPLETE: string;

            /**
             * The File Load Complete Event.
             * 
             * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.
             * 
             * It uses a special dynamic event name constructed from the key and type of the file.
             * 
             * For example, if you have loaded an `image` with a key of `monster`, you can listen for it
             * using the following:
             * 
             * ```javascript
             * this.load.on('filecomplete-image-monster', function (key, type, data) {
             *     // Your handler code
             * });
             * ```
             * 
             * Or, if you have loaded a texture `atlas` with a key of `Level1`:
             * 
             * ```javascript
             * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) {
             *     // Your handler code
             * });
             * ```
             * 
             * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:
             * 
             * ```javascript
             * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {
             *     // Your handler code
             * });
             * ```
             * 
             * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.
             * 
             * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.
             */
            const FILE_KEY_COMPLETE: string;

            /**
             * The File Load Error Event.
             * 
             * This event is dispatched by the Loader Plugin when a file fails to load.
             * 
             * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.
             */
            const FILE_LOAD_ERROR: string;

            /**
             * The File Load Event.
             * 
             * This event is dispatched by the Loader Plugin when a file finishes loading,
             * but _before_ it is processed and added to the internal Phaser caches.
             * 
             * Listen to it from a Scene using: `this.load.on('load', listener)`.
             */
            const FILE_LOAD: string;

            /**
             * The File Load Progress Event.
             * 
             * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and
             * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.
             * 
             * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.
             */
            const FILE_PROGRESS: string;

            /**
             * The Loader Plugin Post Process Event.
             * 
             * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.
             * It is dispatched before the internal lists are cleared and each File is destroyed.
             * 
             * Use this hook to perform any last minute processing of files that can only happen once the
             * Loader has completed, but prior to it emitting the `complete` event.
             * 
             * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.
             */
            const POST_PROCESS: string;

            /**
             * The Loader Plugin Progress Event.
             * 
             * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.
             * 
             * Listen to it from a Scene using: `this.load.on('progress', listener)`.
             */
            const PROGRESS: string;

            /**
             * The Loader Plugin Start Event.
             * 
             * This event is dispatched when the Loader starts running. At this point load progress is zero.
             * 
             * This event is dispatched even if there aren't any files in the load queue.
             * 
             * Listen to it from a Scene using: `this.load.on('start', listener)`.
             */
            const START: string;

        }

        namespace FileTypes {
            /**
             * A single Animation JSON File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#animation method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#animation.
             */
            class AnimationJSONFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 * @param dataKey When the JSON file loads only this property will be stored in the Cache.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method controls what extra work this File does with its loaded data.
                 */
                onProcess(): void;

                /**
                 * Called at the end of the load process, after the Loader has finished all files in its queue.
                 */
                onLoadComplete(): void;

            }

            /**
             * A single Aseprite Animation File suitable for loading by the Loader.
             * 
             * Aseprite is an animated sprite editor and pixel art tool. This file type handles loading both
             * the Aseprite sprite sheet image and its accompanying JSON data file, which contains frame and
             * animation tag information. Once loaded, the texture and animation data are added to the Texture
             * Manager and can be used to create animations via `AnimationManager.createFromAseprite`.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#aseprite method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#aseprite.
             */
            class AsepriteFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
                 * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
                 * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
                 * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AsepriteFileConfig, textureURL?: string | string[], atlasURL?: object | string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A single JSON based Texture Atlas File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#atlas method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlas.
             * 
             * {@link https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm|Texture Packer - How to create sprite sheets for Phaser}
             */
            class AtlasJSONFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
                 * @param atlasURL The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
                 * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
                 * @param atlasXhrSettings An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig, textureURL?: string | string[], atlasURL?: object | string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * An XML-based Texture Atlas File that coordinates the loading of both a texture image and its associated XML data
             * file as a single unit. Both files must load successfully before the atlas is registered with the Texture Manager.
             * Once registered, individual frames defined in the XML can be used as textures for Game Objects throughout your game.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#atlasXML method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlasXML.
             */
            class AtlasXMLFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
                 * @param atlasURL The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `<key>.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml".
                 * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
                 * @param atlasXhrSettings An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Checks whether both the image and XML data files have finished loading, and if so, registers the texture atlas
                 * with the Texture Manager. An optional normal map (the third file in the set) is also passed through if present.
                 * Sets `complete` to `true` once the atlas has been added.
                 */
                addToCache(): void;

            }

            /**
             * A single Audio File suitable for loading by the Loader via the Web Audio API.
             * 
             * This file type loads audio data as an ArrayBuffer over XHR and then decodes it into an AudioBuffer
             * using the Web Audio API's `decodeAudioData` method. The resulting AudioBuffer is stored in the
             * Phaser Audio Cache, ready for use by the Sound Manager.
             * 
             * If the device does not support the Web Audio API, or if Web Audio has been disabled in the game
             * configuration, an `HTML5AudioFile` will be created instead. You do not need to choose between them
             * manually — use `Phaser.Loader.LoaderPlugin#audio` and Phaser will select the correct file type
             * automatically based on device capabilities.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio.
             */
            class AudioFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param urlConfig The absolute or relative URL to load this file from in a config object.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 * @param audioContext The AudioContext this file will use to process itself.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: Phaser.Types.Loader.FileTypes.AudioFileURLConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, audioContext?: AudioContext);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method decodes the raw audio ArrayBuffer loaded via XHR using the Web Audio API's
                 * `decodeAudioData` method. On success, the resulting AudioBuffer is stored in `this.data`
                 * and `onProcessComplete` is called to advance the load queue. On failure, an error is logged
                 * to the console and `onProcessError` is called. The AudioContext reference is released after
                 * decoding begins to avoid retaining it unnecessarily.
                 */
                onProcess(): void;

                /**
                 * Static factory method that creates the correct type of audio file for the current device.
                 * 
                 * Inspects the game's audio configuration and device capabilities to decide whether to return
                 * a Web Audio API-based `AudioFile` or a fallback `HTML5AudioFile`. It first calls
                 * `AudioFile.getAudioURL` to find a suitable URL from the provided list that the browser can
                 * play. If no compatible URL is found, a warning is logged and `null` is returned.
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param urls The absolute or relative URL(s) to load the audio from.
                 * @param config An object containing an `instances` property for HTML5Audio. Defaults to 1.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 * @returns The created audio file instance, or `null` if no supported URL was found.
                 */
                static create(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urls?: string | string[] | Phaser.Types.Loader.FileTypes.AudioFileURLConfig | Phaser.Types.Loader.FileTypes.AudioFileURLConfig[], config?: any, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): Phaser.Loader.FileTypes.AudioFile | Phaser.Loader.FileTypes.HTML5AudioFile | null;

                /**
                 * Takes an array of audio URLs and returns a URL config object for the first entry that
                 * the current device is capable of playing, based on the audio format indicated by the
                 * file extension or an explicit `type` property on the URL config object.
                 * 
                 * Blob and data URIs are always accepted and returned immediately regardless of format.
                 * For regular URLs, the extension is extracted from the filename and checked against
                 * `game.device.audio`. If no supported URL is found, `null` is returned.
                 * @param game A reference to the Phaser Game instance.
                 * @param urls One or more audio URLs to test for browser support.
                 * @returns A URL config object with `url` and `type` properties for the first supported audio URL, or `null` if none are supported.
                 */
                static getAudioURL(game: Phaser.Game, urls: string | string[] | Phaser.Types.Loader.FileTypes.AudioFileURLConfig | Phaser.Types.Loader.FileTypes.AudioFileURLConfig[]): Phaser.Types.Loader.FileTypes.AudioFileURLConfig | null;

            }

            /**
             * An Audio Sprite File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#audioSprite method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audioSprite.
             */
            class AudioSpriteFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param jsonURL The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.
                 * @param audioURL The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file.
                 * @param audioConfig The audio configuration options.
                 * @param audioXhrSettings An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings.
                 * @param jsonXhrSettings An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig, jsonURL: string, audioURL?: Object, audioConfig?: any, audioXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, jsonXhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called by each File when it finishes loading.
                 * @param file The File that has completed processing.
                 */
                onFileComplete(file: Phaser.Loader.File): void;

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A single Binary File suitable for loading by the Loader.
             * 
             * Binary files are used to load raw binary data, such as custom level formats, game data archives, or any file
             * whose contents must be handled as an `ArrayBuffer` rather than parsed text or an image. Once loaded, the data
             * is stored in the Binary Cache and can optionally be cast to a typed array (e.g. `Uint8Array`) automatically
             * by providing a `dataType` constructor.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#binary method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#binary.
             */
            class BinaryFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.bin`, i.e. if `key` was "alien" then the URL will be "alien.bin".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 * @param dataType Optional type to cast the binary file to once loaded. For example, `Uint8Array`.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BinaryFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataType?: any);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method processes the raw XHR response: if a `dataType` constructor was specified (e.g. `Uint8Array`),
                 * it wraps the `ArrayBuffer` response in a new instance of that type; otherwise the raw `ArrayBuffer` is
                 * stored directly as the file's data.
                 */
                onProcess(): void;

            }

            /**
             * A single Bitmap Font based File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#bitmapFont method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#bitmapFont.
             */
            class BitmapFontFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param textureURL The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
                 * @param fontDataURL The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `<key>.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml".
                 * @param textureXhrSettings An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings.
                 * @param fontDataXhrSettings An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.BitmapFontFileConfig, textureURL?: string | string[], fontDataURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, fontDataXhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A single CSS File suitable for loading by the Loader. When loaded, the CSS is injected into the
             * document by creating a `<style>` DOM element and appending it to `document.head`, making the styles
             * immediately available to the page. This is useful for loading external stylesheets that affect your
             * game's UI, fonts, or HTML overlay elements.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#css method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#css.
             */
            class CSSFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.css`, i.e. if `key` was "alien" then the URL will be "alien.css".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.CSSFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method injects the loaded CSS text into the document by creating a `<style>` DOM element,
                 * setting its `innerHTML` to the response text, and appending it to `document.head`. The styles
                 * are applied to the current document immediately upon insertion.
                 */
                onProcess(): void;

            }

            /**
             * A Compressed Texture File is a special MultiFile that handles loading GPU-native compressed texture formats such
             * as PVR and KTX container files. It supports a range of internal compression formats including ASTC, S3TC, ETC,
             * PVRTC, and others, selecting the best format supported by the current GPU at load time.
             * 
             * It can load a single compressed texture, a compressed texture with an accompanying JSON atlas, or a multi-atlas
             * as exported by Texture Packer Pro. An `IMG` fallback entry may also be provided for browsers or GPUs that do
             * not support any of the compressed formats.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#texture method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#texture.
             */
            class CompressedTextureFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file.
                 * @param entry The compressed texture file entry to load.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string, entry: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called by each File when it finishes loading. Decrements the pending file count and, when loading
                 * a multi-atlas configuration, parses the completed JSON manifest to dynamically queue additional
                 * BinaryFile instances for each texture referenced in the atlas, along with any associated normal maps.
                 * The loader's base URL, path, and prefix are temporarily adjusted to the multi-atlas settings during
                 * this process and then restored afterwards.
                 * @param file The File that has completed processing.
                 */
                onFileComplete(file: Phaser.Loader.File): void;

                /**
                 * Adds this file to its target cache upon successful loading and processing. If the file is a
                 * multi-atlas it delegates to `addMultiToCache`. Otherwise, it parses the binary texture data
                 * using either the PVR or KTX parser, verifies that the texture dimensions meet the requirements
                 * of the compression format, and checks that the GPU supports the internal format. If all checks
                 * pass the texture is added to the Texture Manager, optionally with JSON atlas data if one was
                 * loaded alongside it. A console warning is issued for any texture that fails validation.
                 */
                addToCache(): void;

                /**
                 * Adds all of the multi-file entries to their target caches upon successful loading and processing.
                 * Iterates over each binary texture file in the multi-atlas, parses it using the PVR or KTX parser,
                 * and matches it against its corresponding entry in the JSON manifest. Only textures whose compression
                 * format is supported by the current GPU are included. Any associated normal maps are collected and
                 * passed through as well. The resulting images, atlas data, and normal maps are registered together
                 * with the Texture Manager as a JSON array atlas.
                 */
                addMultiToCache(): void;

            }

            /**
             * A single Font File suitable for loading by the Phaser Loader.
             * 
             * This file type loads web fonts using the browser's FontFace API. When processed, it constructs a FontFace
             * object from the resolved URL and font format, loads it asynchronously, and registers it with the document's
             * fonts collection so it is available to the browser. Once loaded, you can reference the font by its key in
             * any Phaser Text object via the `fontFamily` style property.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#font method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#font.
             */
            class FontFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.ttf`, i.e. if `key` was "alien" then the URL will be "alien.ttf".
                 * @param format The font type. Should be a string, like 'truetype' or 'opentype'. Default 'truetype'.
                 * @param descriptors An optional object containing font descriptors for the Font Face. See https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace#descriptors for more details.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.FontFileConfig, url?: string, format?: string, descriptors?: object, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method resolves the font's source URL and uses the browser's FontFace API to construct and
                 * asynchronously load the font. On success, the font is added to the document's fonts collection
                 * and the CSS class `fonts-loaded` is applied to the document body. On failure, a warning is logged
                 * to the console. In both cases, `onProcessComplete` is called to advance the Loader.
                 */
                onProcess(): void;

            }

            /**
             * A single GLSL File suitable for loading by the Loader.
             * 
             * GLSL (OpenGL Shading Language) files contain shader source code used by the WebGL renderer to create
             * custom visual effects. Once loaded, the raw GLSL source is wrapped in a `BaseShader` instance and
             * stored in the global Shader Cache, where it can be retrieved and applied to Game Objects that support
             * custom shaders, such as those using the `Phaser.GameObjects.Shader` class.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#glsl method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#glsl.
             */
            class GLSLFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.glsl`, i.e. if `key` was "alien" then the URL will be "alien.glsl".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.GLSLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method reads the raw GLSL source text from the completed XHR response and stores it
                 * in `this.data`, then immediately signals that processing is complete. No further parsing
                 * or transformation is performed at this stage; the source is stored as-is until `addToCache` runs.
                 */
                onProcess(): void;

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 * The raw GLSL source string is wrapped in a new `BaseShader` instance and stored in the
                 * global Shader Cache under this file's key, making it available for use with shader-enabled
                 * Game Objects.
                 */
                addToCache(): void;

            }

            /**
             * A single audio file loaded via the HTML5 Audio API, suitable for loading by the Loader.
             * 
             * Unlike `WebAudioFile`, which uses the Web Audio API, this file type creates standard HTML `Audio` elements.
             * It is used as a fallback when the Web Audio API is unavailable, or when the game is configured to use
             * HTML5 audio exclusively. Multiple instances of the audio element can be created to allow the same sound
             * to play concurrently without interruption.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio.
             */
            class HTML5AudioFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param urlConfig The absolute or relative URL to load this file from.
                 * @param audioConfig The AudioContext config object.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.AudioFileConfig, urlConfig?: string, audioConfig?: object);

                /**
                 * Called when the file finishes loading.
                 */
                onLoad(): void;

                /**
                 * Called if the file errors while loading.
                 */
                onError(): void;

                /**
                 * Called when an individual Audio element fires its `canplaythrough` event, indicating it is ready to play.
                 */
                onProgress(): void;

                /**
                 * Called by the Loader, starts the actual file downloading.
                 * Creates one or more HTML Audio elements (based on the configured instance count) and assigns the source URL to each.
                 * During the load the methods onLoad, onError and onProgress are called, based on the Audio element events.
                 * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.
                 */
                load(): void;

            }

            /**
             * A single HTML File suitable for loading by the Loader.
             * 
             * HTML files are loaded as raw text strings and stored in the HTML Cache. They are commonly used to supply
             * HTML markup to `Phaser.GameObjects.DOMElement` instances, allowing you to embed DOM-based UI elements
             * directly into your game. The loaded string can be retrieved from the cache and passed to a DOMElement's
             * `createFromCache` method, or manipulated further before use.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#html method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#html.
             */
            class HTMLFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.html`, i.e. if `key` was "alien" then the URL will be "alien.html".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by the Loader when this file has finished loading.
                 * Reads the raw HTML text from the XHR response and stores it in `this.data`, then marks the file as processed.
                 */
                onProcess(): void;

            }

            /**
             * An HTML Texture File suitable for loading by the Loader. This file type loads an HTML file from the server,
             * wraps its contents inside an SVG `foreignObject` element sized to the specified width and height, converts
             * the SVG to a `Blob` URL, and then renders it as an `Image` element. The resulting image is stored in the
             * Texture Manager and can be used as a texture by any Game Object that accepts a texture key.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#htmlTexture method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#htmlTexture.
             */
            class HTMLTextureFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.html`, i.e. if `key` was "alien" then the URL will be "alien.html".
                 * @param width The width of the texture the HTML will be rendered to.
                 * @param height The height of the texture the HTML will be rendered to.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig, url?: string, width?: number, height?: number, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * Processes the loaded HTML content by wrapping it inside an SVG `foreignObject` element sized to
                 * the configured width and height. The SVG markup is then converted to a `window.Blob`, which is
                 * assigned as an object URL to a new `Image` element. Once the Image loads successfully, the file
                 * transitions to the completed state and is ready to be added to the Texture Manager. If Blob
                 * creation or Image loading fails, the file is marked as errored.
                 */
                onProcess(): void;

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A single Image File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.
             */
            class ImageFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 * @param frameConfig The frame configuration object. Only provided for, and used by, Sprite Sheets.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ImageFileConfig, url?: string | string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig);

                /**
                 * Called automatically by `Loader.nextFile` as part of the XHR loading path.
                 * Creates an HTMLImageElement and assigns the XHR blob response as its source via an object URL,
                 * triggering the browser to decode the image. On success, calls `onProcessComplete`; on failure,
                 * calls `onProcessError`. This method is only used when images are loaded via XHR (the default).
                 * When `loader.imageLoadType` is set to `"HTMLImageElement"`, the `onProcessImage` method is used instead.
                 */
                onProcess(): void;

                /**
                 * Adds this file to the Texture Manager upon successful loading and processing.
                 * 
                 * If this image has a linked normal map file, the method waits until both files have completed
                 * loading before adding them together as a pair via `cache.addImage`. If no normal map is present,
                 * the image is added to the Texture Manager on its own.
                 */
                addToCache(): void;

            }

            /**
             * A single JSON File suitable for loading by the Loader. JSON files are parsed automatically upon load and the
             * resulting data object is stored in the global JSON Cache, keyed by the file key. You can optionally supply a
             * `dataKey` to extract and cache only a specific nested property from the JSON, rather than the entire file.
             * JSON files are commonly used to store game configuration, level data, tilemap data, localization strings, or
             * any other structured data your game requires.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.
             */
            class JSONFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 * @param dataKey When the JSON file loads only this property will be stored in the Cache.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.JSONFileConfig, url?: object | string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method parses the XHR response text as JSON. If a `dataKey` was specified when the file was added
                 * to the load queue, only the value at that dot-notation key path is stored in `this.data`; otherwise the
                 * entire parsed JSON object is stored. Once processing is complete it calls `onProcessComplete`.
                 */
                onProcess(): void;

            }

            /**
             * A Multi Texture Atlas File is a composite file type that loads a Texture Packer multi-atlas JSON file along with
             * all of the texture image files it references. A multi-atlas is useful when your sprite sheet assets are too large
             * to fit into a single texture and have been split across multiple image files, each described by a shared JSON
             * data file. Phaser parses the JSON, then automatically queues and loads each referenced image (and any associated
             * normal maps) before adding the complete atlas to the Texture Manager under a single key.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#multiatlas method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#multiatlas.
             */
            class MultiAtlasFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key of the file. Must be unique within both the Loader and the Texture Manager. Or a config object.
                 * @param atlasURL The absolute or relative URL to load the multi atlas json file from.
                 * @param path Optional path to use when loading the textures defined in the atlas data.
                 * @param baseURL Optional Base URL to use when loading the textures defined in the atlas data.
                 * @param atlasXhrSettings Extra XHR Settings specifically for the atlas json file.
                 * @param textureXhrSettings Extra XHR Settings specifically for the texture files.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig, atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called by each File when it finishes loading. When the JSON atlas file completes, this method
                 * inspects its `textures` array and dynamically creates and queues an ImageFile for every texture
                 * referenced within it. If any texture entry also defines a `normalMap`, a linked ImageFile is
                 * created for that too. The Loader's baseURL, path, and prefix are temporarily overridden to those
                 * specified in the MultiAtlasFile config during this process, then restored afterwards.
                 * @param file The File that has completed processing.
                 */
                onFileComplete(file: Phaser.Loader.File): void;

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A Multi Script File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#scripts method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scripts.
             */
            class MultiScriptFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.
                 * @param xhrSettings An XHR Settings configuration object for the script files. Used in replacement of the Loaders default XHR Settings.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.MultiScriptFileConfig, url?: string[], xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by the Loader when all files in this MultiFile have finished loading.
                 * Creates a `<script>` element for each loaded file, sets the language to JavaScript,
                 * disables deferred execution, populates the element with the response text, and appends
                 * it to `document.head` in the exact order the files were specified. This causes each
                 * script to execute immediately in the correct order, preserving any inter-script dependencies.
                 */
                addToCache(): void;

            }

            /**
             * A PCT Atlas File is a composite file type that loads a Phaser Compact Texture Atlas (`.pct`)
             * data file along with all of the texture image files it references. A single PCT file can
             * describe one or multiple atlas pages; each page is declared by a `P:` record and is loaded as
             * a separate image. Phaser parses the PCT data, extracts the filenames listed in its page
             * records, and automatically queues and loads each texture before adding the complete atlas to
             * the Texture Manager under a single key. The decoded PCT data is also stored in the global
             * Atlas Cache, keyed by the file key.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#atlasPCT method and are not
             * typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see
             * Phaser.Loader.LoaderPlugin#atlasPCT.
             */
            class PCTAtlasFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key of the file. Must be unique within both the Loader and the Texture Manager. Or a config object.
                 * @param atlasURL The absolute or relative URL to load the PCT data file from.
                 * @param path Optional path to use when loading the textures defined in the PCT data.
                 * @param baseURL Optional Base URL to use when loading the textures defined in the PCT data.
                 * @param atlasXhrSettings Extra XHR Settings specifically for the PCT data file.
                 * @param textureXhrSettings Extra XHR Settings specifically for the texture files.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PCTAtlasFileConfig, atlasURL?: string, path?: string, baseURL?: string, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called by each File when it finishes loading. When the PCT data file completes, this method
                 * inspects its decoded `pages` array and dynamically creates and queues an ImageFile for every
                 * texture page referenced within it. The Loader's baseURL, path, and prefix are temporarily
                 * overridden to those specified in the PCTAtlasFile config during this process, then restored
                 * afterwards.
                 * @param file The File that has completed processing.
                 */
                onFileComplete(file: Phaser.Loader.File): void;

                /**
                 * Adds this file to its target caches upon successful loading and processing. The decoded PCT
                 * data is added to the Atlas Cache, and the loaded texture images together with the decoded
                 * frame data are added to the Texture Manager as a single multi-source texture.
                 */
                addToCache(): void;

            }

            /**
             * A single JSON Pack File suitable for loading by the Loader.
             * 
             * A Pack File is a JSON manifest that describes a collection of other assets to be loaded. When the Pack File is
             * processed, the Loader reads its contents and queues each listed asset for loading, allowing you to define an
             * entire set of game resources in a single external JSON file rather than calling individual load methods in code.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#pack method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#pack.
             */
            class PackFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from or a ready formed JSON object. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 * @param dataKey When the JSON file loads only this property will be stored in the Cache.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PackFileConfig, url?: string | any, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject, dataKey?: string);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method controls what extra work this File does with its loaded data.
                 */
                onProcess(): void;

            }

            /**
             * A single Plugin Script File suitable for loading by the Phaser Loader. A Plugin File represents an external
             * JavaScript file that, once loaded, registers a Phaser plugin and makes it available to the Plugin Manager.
             * The script is executed by appending it as a `<script>` element to the document head. The plugin can optionally
             * be auto-started and injected into the current Scene under a given property key.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#plugin method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#plugin.
             */
            class PluginFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.js`, i.e. if `key` was "alien" then the URL will be "alien.js".
                 * @param start Automatically start the plugin after loading? Default false.
                 * @param mapping If this plugin is to be injected into the Scene, this is the property key used.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.PluginFileConfig, url?: string, start?: boolean, mapping?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * Processes the loaded Plugin file and installs it into the Scene's Plugin Manager.
                 * If the plugin was provided directly as a class or function, it is installed immediately.
                 * Otherwise, a new `<script>` element is created containing the loaded JavaScript source,
                 * appended to the document head to execute it, and then the plugin is installed from the
                 * global scope using the file key. If a Scene mapping key or auto-start flag is set,
                 * the plugin is also injected into the current Scene and Scene Systems.
                 */
                onProcess(): void;

            }

            /**
             * A single SVG File suitable for loading by the Loader.
             * 
             * SVG files are loaded as text, optionally resized according to a width, height, or scale factor, then rasterized
             * to a bitmap image and stored in the Texture Manager. Once loaded, the resulting texture can be used by any
             * Game Object that accepts a texture key, just like a PNG or JPEG image.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#svg method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#svg.
             */
            class SVGFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.svg`, i.e. if `key` was "alien" then the URL will be "alien.svg".
                 * @param svgConfig The svg size configuration object.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SVGFileConfig, url?: string, svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method parses the raw SVG text response, optionally resizes the SVG by modifying its width, height,
                 * or viewBox attributes according to the file's svgConfig, then serializes the result into a Blob and loads
                 * it into an HTMLImageElement. On browsers that do not support object URLs (such as older versions of Safari),
                 * it falls back to a data URI. Once the image has loaded, `onProcessComplete` is called to finalize the file.
                 */
                onProcess(): void;

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A Scene File is an external JavaScript file that defines a Phaser Scene class, which is loaded by the Loader
             * and then registered directly with the Scene Manager so it can be started, launched, or otherwise used like
             * any Scene that was defined locally. This allows you to split your game's Scenes across multiple JavaScript
             * files and load them on demand rather than bundling everything upfront.
             * 
             * The key used when loading must match the class name defined in the JavaScript file, as the file is evaluated
             * and the class is instantiated by name. Once loaded, the Scene is available to the Scene Manager under either
             * that key or whichever key was passed to `super()` in the Scene's constructor.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#sceneFile method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#sceneFile.
             */
            class SceneFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.js`, i.e. if `key` was "alien" then the URL will be "alien.js".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SceneFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method controls what extra work this File does with its loaded data.
                 */
                onProcess(): void;

                /**
                 * Evaluates the loaded JavaScript source, instantiates the Scene class identified by this file's key,
                 * and registers the resulting Scene instance with the Scene Manager so it is available for use.
                 */
                addToCache(): void;

            }

            /**
             * A single Scene Plugin Script File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#scenePlugin method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scenePlugin.
             */
            class ScenePluginFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.js`, i.e. if `key` was "alien" then the URL will be "alien.js".
                 * @param systemKey If this plugin is to be added to Scene.Systems, this is the property key for it.
                 * @param sceneKey If this plugin is to be added to the Scene, this is the property key for it.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScenePluginFileConfig, url?: string, systemKey?: string, sceneKey?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method controls what extra work this File does with its loaded data.
                 * 
                 * If the plugin was provided as a class reference (i.e. the `url` parameter was a function), it is
                 * installed directly into the Scene via the Plugin Manager. Otherwise, the loaded script text is
                 * injected into the document by appending a new `<script>` element to `document.head`, and the
                 * plugin class is then retrieved from `window` using the file key before being installed into the
                 * Scene via `pluginManager.installScenePlugin`.
                 */
                onProcess(): void;

            }

            /**
             * A single Script File suitable for loading by the Loader. It fetches an external JavaScript file via XHR and,
             * once loaded, injects it into the document as a `<script>` element appended to `document.head`, causing its
             * code to execute immediately. Both classic scripts and ES modules are supported via the `type` parameter.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#script method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#script.
             */
            class ScriptFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.js`, i.e. if `key` was "alien" then the URL will be "alien.js".
                 * @param type The script type. Should be either 'script' for classic JavaScript, or 'module' if the file contains an exported module. Default 'script'.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.ScriptFileConfig, url?: string, type?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile once the file has finished loading via XHR.
                 * Creates a `<script>` element, sets its `text` content to the raw response text of the loaded file,
                 * and appends it to `document.head`, which causes the script to execute immediately. The file state
                 * is then set to complete.
                 */
                onProcess(): void;

            }

            /**
             * A single Sprite Sheet Image File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#spritesheet method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spritesheet.
             */
            class SpriteSheetFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
                 * @param frameConfig The frame configuration object.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig, url?: string | string[], frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A single Text File suitable for loading by the Loader.
             * 
             * Text Files load plain-text content from an external file and store it in the Text Cache as a raw string. They are
             * useful for loading any text-based data, such as dialogue scripts, CSV data, GLSL shader source code, level data,
             * or any other content that can be represented as a string. Once loaded, the text can be retrieved from the cache
             * and parsed or processed however the game requires.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.
             */
            class TextFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TextFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method controls what extra work this File does with its loaded data.
                 * It reads the plain-text content from the XHR response and stores it in `this.data`,
                 * then calls `onProcessComplete` to flag the file as ready for use in the Text Cache.
                 */
                onProcess(): void;

            }

            /**
             * A single Tilemap CSV File suitable for loading by the Loader.
             * 
             * A CSV tilemap file contains a grid of comma-separated integer values, where each value represents a tile index
             * in a tileset. This is one of the simplest tilemap formats supported by Phaser and is useful for basic grid-based
             * maps. Once loaded, the CSV data can be used with `this.make.tilemap` to create a `Tilemap` object in your Scene.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapCSV method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapCSV.
             */
            class TilemapCSVFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.csv`, i.e. if `key` was "alien" then the URL will be "alien.csv".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method controls what extra work this File does with its loaded data.
                 */
                onProcess(): void;

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A single Impact.js Tilemap JSON File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapImpact method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapImpact.
             */
            class TilemapImpactFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A single Tiled Tilemap JSON File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapTiledJSON method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapTiledJSON.
             */
            class TilemapJSONFile extends Phaser.Loader.FileTypes.JSONFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, a well formed JSON object.
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig, url?: object | string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A single text file based Unity Texture Atlas File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#unityAtlas method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#unityAtlas.
             */
            class UnityAtlasFile extends Phaser.Loader.MultiFile {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param textureURL The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
                 * @param atlasURL The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `<key>.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt".
                 * @param textureXhrSettings An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
                 * @param atlasXhrSettings An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig, textureURL?: string | string[], atlasURL?: string, textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject, atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Adds this file to its target cache upon successful loading and processing.
                 */
                addToCache(): void;

            }

            /**
             * A single Video File suitable for loading by the Loader.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#video method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#video.
             */
            class VideoFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param urls The absolute or relative URL to load the video files from.
                 * @param noAudio Does the video have an audio track? If not you can enable auto-playing on it. Default false.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.VideoFileConfig, urls?: string | string[] | Phaser.Types.Loader.FileTypes.VideoFileURLConfig | Phaser.Types.Loader.FileTypes.VideoFileURLConfig[], noAudio?: boolean);

                /**
                 * Called automatically by Loader.nextFile.
                 * This method assembles the processed data object for this file, storing the resolved URL,
                 * the `noAudio` flag, and the cross-origin setting so that a Video Game Object can use them
                 * to load the video at the appropriate time.
                 */
                onProcess(): void;

                /**
                 * Called by the Loader to process this file. Unlike most file types, VideoFile does not perform
                 * an XHR request or download the video data during this step. Instead, it resolves the final URL
                 * and immediately marks the file as loaded, so the Loader can continue. The actual video content
                 * is fetched later by the Video Game Object when it needs to play it.
                 * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.
                 */
                load(): void;

            }

            /**
             * A single XML File suitable for loading by the Phaser Loader. Once loaded, the XML response text is parsed into
             * a DOM Document object and stored in the global XML Cache, keyed by the file key you provided. You can then
             * retrieve it at any time via `this.cache.xml.get(key)` and traverse it using standard DOM methods.
             * 
             * These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly.
             * 
             * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml.
             */
            class XMLFile extends Phaser.Loader.File {
                /**
                 * 
                 * @param loader A reference to the Loader that is responsible for this file.
                 * @param key The key to use for this file, or a file configuration object.
                 * @param url The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml".
                 * @param xhrSettings Extra XHR Settings specifically for this file.
                 */
                constructor(loader: Phaser.Loader.LoaderPlugin, key: string | Phaser.Types.Loader.FileTypes.XMLFileConfig, url?: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject);

                /**
                 * Called automatically by Loader.nextFile. Parses the raw XHR response text as XML using `ParseXML`
                 * and stores the resulting DOM Document in `this.data`. If parsing succeeds, `onProcessComplete` is called
                 * to add the document to the XML Cache and advance the load queue. If parsing fails (i.e. `ParseXML` returns
                 * a falsy value), `onProcessError` is called instead.
                 */
                onProcess(): void;

            }

        }

    }

    namespace Math {
        /**
         * Calculate the mean average of the given values.
         * @param values The values to average.
         * @returns The average value.
         */
        function Average(values: number[]): number;

        /**
         * Calculates a Bernstein basis polynomial coefficient, used as a weighting factor
         * in Bezier curve calculations. The result is the binomial coefficient n! / (i! * (n - i)!),
         * which determines how much influence control point `i` has on a degree-`n` Bezier curve.
         * @param n The degree of the Bernstein polynomial.
         * @param i The index of the basis function.
         * @returns The Bernstein basis coefficient: Factorial(n) / Factorial(i) / Factorial(n - i).
         */
        function Bernstein(n: number, i: number): number;

        /**
         * Compute a random integer between the `min` and `max` values, inclusive.
         * @param min The minimum value.
         * @param max The maximum value.
         * @returns The random integer.
         */
        function Between(min: number, max: number): number;

        /**
         * Calculates a Catmull-Rom interpolated value from the given control points, using a centripetal
         * alpha of 0.5. The interpolation occurs between `p1` and `p2`, with `p0` and `p3` providing
         * tangent context at each end of the segment. At `t = 0` the result equals `p1`; at `t = 1`
         * the result equals `p2`.
         * 
         * This function is used internally by Phaser's spline curve implementations to produce smooth,
         * continuous curves that pass through each control point.
         * @param t The interpolation factor, typically in the range 0 to 1.
         * @param p0 The first control point (influences the tangent at `p1`).
         * @param p1 The second control point (start of the interpolated segment).
         * @param p2 The third control point (end of the interpolated segment).
         * @param p3 The fourth control point (influences the tangent at `p2`).
         * @returns The interpolated Catmull-Rom value between `p1` and `p2`.
         */
        function CatmullRom(t: number, p0: number, p1: number, p2: number, p3: number): number;

        /**
         * Ceils a given value to the nearest multiple of a `base` raised to the power of `place`.
         * 
         * The `place` is represented by the power applied to `base` to get that place.
         * For example, with the default base of 10, a `place` of 0 ceils to the nearest integer,
         * a `place` of 1 ceils to the nearest 0.1, and a `place` of -1 ceils to the nearest 10.
         * @param value The value to ceil.
         * @param place The place to ceil to. Default 0.
         * @param base The base to ceil in. Default is 10 for decimal. Default 10.
         * @returns The ceiled value.
         */
        function CeilTo(value: number, place?: number, base?: number): number;

        /**
         * Force a value within the boundaries by clamping it to the range `min`, `max`.
         * @param value The value to be clamped.
         * @param min The minimum bounds.
         * @param max The maximum bounds.
         * @returns The clamped value.
         */
        function Clamp(value: number, min: number, max: number): number;

        /**
         * Convert the given angle from degrees, to the equivalent angle in radians.
         * @param degrees The angle (in degrees) to convert to radians.
         * @returns The given angle converted to radians.
         */
        function DegToRad(degrees: number): number;

        /**
         * Calculates the positive difference of two given numbers.
         * @param a The first number in the calculation.
         * @param b The second number in the calculation.
         * @returns The positive difference of the two given numbers.
         */
        function Difference(a: number, b: number): number;

        /**
         * Represents a set of Euler angles (rotation around X, Y, and Z axes) used for 3D rotations.
         * Euler angles describe orientation using three successive rotations around the coordinate axes.
         * The `order` property defines which axes and in what sequence the rotations are applied
         * (e.g., 'XYZ' applies rotation around X first, then Y, then Z).
         */
        class Euler {
            /**
             * 
             * @param x The rotation around the X axis, in radians. Default 0.
             * @param y The rotation around the Y axis, in radians. Default 0.
             * @param z The rotation around the Z axis, in radians. Default 0.
             * @param order The order in which rotations are applied. One of 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', or 'XZY'. Default 'XYZ'.
             */
            constructor(x?: number, y?: number, z?: number, order?: string);

            /**
             * The rotation around the X axis, in radians.
             * 
             * Setting this property will invoke the `onChangeCallback`, if one has been set.
             */
            x: number;

            /**
             * The rotation around the Y axis, in radians.
             * 
             * Setting this property will invoke the `onChangeCallback`, if one has been set.
             */
            y: number;

            /**
             * The rotation around the Z axis, in radians.
             * 
             * Setting this property will invoke the `onChangeCallback`, if one has been set.
             */
            z: number;

            /**
             * The rotation order used when applying Euler angles. Determines the sequence in which
             * rotations around the X, Y, and Z axes are applied. Must be one of:
             * 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', or 'XZY'.
             * 
             * Setting this property will invoke the `onChangeCallback`, if one has been set.
             */
            order: string;

            /**
             * Sets the X, Y, Z, and order components of this Euler angle simultaneously.
             * 
             * After updating all internal values, `onChangeCallback` is invoked with this Euler
             * instance as the argument.
             * @param x The rotation around the X axis, in radians.
             * @param y The rotation around the Y axis, in radians.
             * @param z The rotation around the Z axis, in radians.
             * @param order The rotation order. Defaults to the current order if not specified.
             * @returns This Euler instance.
             */
            set(x: number, y: number, z: number, order?: string): Phaser.Math.Euler;

            /**
             * Copies the X, Y, Z, and order properties from another Euler instance into this one.
             * @param euler The Euler instance to copy from.
             * @returns This Euler instance.
             */
            copy(euler: Phaser.Math.Euler): Phaser.Math.Euler;

            /**
             * Sets the Euler angles from a Quaternion, using the specified rotation order.
             * 
             * The quaternion is first converted to a rotation matrix internally, then
             * `setFromRotationMatrix` is called to derive the Euler angles. This avoids
             * gimbal lock issues by working through the matrix representation.
             * @param quaternion The quaternion to derive Euler angles from.
             * @param order The rotation order to use. Defaults to the current order if not specified.
             * @param update Whether to invoke `onChangeCallback` after setting the values. Default false.
             * @returns This Euler instance.
             */
            setFromQuaternion(quaternion: Phaser.Math.Quaternion, order?: string, update?: boolean): Phaser.Math.Euler;

            /**
             * Sets the Euler angles from the upper-left 3x3 rotation portion of a 4x4 Matrix4,
             * using the specified rotation order.
             * 
             * The matrix is assumed to be a pure rotation matrix (un-scaled). Each supported
             * rotation order has its own decomposition formula. If the `update` parameter is
             * `true`, `onChangeCallback` is invoked after the values are set.
             * @param matrix The rotation matrix to derive Euler angles from. Must be a pure (un-scaled) rotation matrix.
             * @param order The rotation order to use. Defaults to the current order if not specified.
             * @param update Whether to invoke `onChangeCallback` after setting the values. Default false.
             * @returns This Euler instance.
             */
            setFromRotationMatrix(matrix: Phaser.Math.Matrix4, order?: string, update?: boolean): Phaser.Math.Euler;

        }

        /**
         * Calculates the factorial of a given number for integer values greater than 0.
         * @param value A positive integer to calculate the factorial of.
         * @returns The factorial of the given number.
         */
        function Factorial(value: number): number;

        /**
         * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.
         * @param min The lower bound for the float, inclusive.
         * @param max The upper bound for the float, exclusive.
         * @returns A random float within the given range.
         */
        function FloatBetween(min: number, max: number): number;

        /**
         * Floors to some place comparative to a `base`, default is 10 for decimal place.
         * 
         * The `place` is represented by the power applied to `base` to get that place.
         * @param value The value to floor.
         * @param place The place to floor to. Default 0.
         * @param base The base to floor in. Default is 10 for decimal. Default 10.
         * @returns The floored value.
         */
        function FloorTo(value: number, place?: number, base?: number): number;

        /**
         * Returns a value based on the range between `min` and `max` and the percentage given.
         * @param percent A value representing the percentage, between 0 and 1. Values outside this range are clamped to it.
         * @param min The minimum value.
         * @param max The maximum value.
         * @returns The value that is `percent` percent between `min` and `max`.
         */
        function FromPercent(percent: number, min: number, max?: number): number;

        /**
         * Get the centroid or geometric center of a plane figure (the arithmetic mean position of all the points in the figure).
         * Informally, it is the point at which a cutout of the shape could be perfectly balanced on the tip of a pin.
         * @param points An array of Vector2Like objects to get the geometric center of.
         * @param out A Vector2 object to store the output coordinates in. If not given, a new Vector2 instance is created.
         * @returns A Vector2 object representing the geometric center of the given points.
         */
        function GetCentroid<O extends Phaser.Math.Vector2>(points: Phaser.Types.Math.Vector2Like[], out?: O): O;

        /**
         * Calculate the speed required to cover a given distance in a given time.
         * 
         * The distance is assumed to be in pixels and the time is given in seconds.
         * The result is returned as pixels per millisecond.
         * @param distance The distance to travel, in pixels.
         * @param time The time allowed to cover the distance, in seconds.
         * @returns The speed required, in pixels per millisecond.
         */
        function GetSpeed(distance: number, time: number): number;

        /**
         * Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.
         * @param points An array of Vector2Like objects to get the AABB from.
         * @param out A Rectangle object to store the results in. If not given, a new Rectangle instance is created.
         * @returns A Rectangle object holding the AABB values for the given points.
         */
        function GetVec2Bounds<O extends Phaser.Geom.Rectangle>(points: Phaser.Types.Math.Vector2Like[], out?: O): O;

        /**
         * Hash a number or list of numbers.
         * 
         * A hash is an unpredictable transformation of an input,
         * which always returns the same output from the same input.
         * It is useful for generating random data in a predictable way.
         * 
         * For example, you could use a hash to place objects around a scene.
         * Given the same inputs, the objects would always appear in the same places,
         * even though those places appear random.
         * 
         * This function takes 1-4 numbers as input, and returns a single number from 0-1.
         * 
         * Disclaimer: This function is intended for efficiently generating visual
         * variety. It is not intended for cryptographic use. Do not use it for
         * security/authentication/encryption purposes. Use a proper tool instead.
         * 
         * Performance note: A 16ms frame has enough time to generate
         * tens or hundreds of thousands of hash values, depending on system and other activity.
         * 
         * You can select from different hashing algorithms.
         * 
         * - 0: TRIG. This uses sine functions and dot products to hash the input.
         * - 1: PCG. This uses a permuted congruential generator to hash the input,
         *   but is restricted to integer inputs.
         * - 2: PCG_FLOAT. This variant of PCG accepts float inputs.
         * 
         * TRIG is the same algorithm used in Phaser 4's Noise object and relatives.
         * It produces decent variety, and accepts any number as input.
         * Its precision is 32 bits.
         * Its input values may lose distinction if larger than 32 bits (4294967296).
         * Its output values cannot differ by more than 1/4294967296.
         * This algorithm is designed to work on graphics hardware that lacks
         * bitshifting capabilities, and is not state of the art.
         * 
         * PCG is a Permuted Congruential Generator.
         * See https://www.pcg-random.org/ for more information on the theory.
         * This algorithm is more modern and considered higher quality.
         * It runs slightly faster than TRIG.
         * It only accepts whole numbers (integers) as input.
         * Its precision is 32 bits.
         * Its input values may lose distinction if larger than 32 bits (4294967296).
         * Its output values cannot differ by more than 1/4294967296.
         * 
         * PCG_FLOAT works just like PCG, but accepts floating-point inputs.
         * This conversion process causes it to run slightly slower than TRIG.
         * The same precision concerns apply.
         * 
         * If your hash values start clustering, you may be using values
         * outside the safe range, where bits available for precision are insufficient.
         * You can keep values in a safe range by sampling along circular paths.
         * This is why it's useful to have several dimensions of input.
         * @param vector The number or number list to hash. 1 to 4 numbers.
         * @param algorithm The algorithm to use. 0 is TRIG. 1 is PCG. 2 is PCG_FLOAT. Default 0.
         * @returns - A number from 0-1.
         */
        function Hash(vector: number | number[], algorithm?: number): number;

        /**
         * Hash a number or list of numbers to a cellular noise value.
         * 
         * A hash is an unpredictable transformation of an input,
         * which always returns the same output from the same input.
         * It is useful for generating random data in a predictable way.
         * 
         * Cellular noise uses hashes to distort a grid, creating distinctive 'cells'
         * in a continuous pattern. While the result is still effectively random,
         * it is continuous: very similar inputs produce very similar outputs
         * (although there may be some minor discontinuities between cells).
         * The result has a distinctive bumpy pattern.
         * This is the algorithm used in the NoiseCell2D family of GameObjects.
         * It is sometimes called Worley or Voronoi noise.
         * 
         * For example, you could use cellular noise to create a series of ridges
         * across a procedural terrain. Every time you generate the same region,
         * it will look the same.
         * 
         * This function takes 1-4 numbers as input, and returns a single number.
         * The range of the return number increases with the number of inputs.
         * It is the distance from the input vector to the nearest distorted cell
         * center. In higher dimensions, the possible distance is higher.
         * 
         * Note: If you specify dimensional properties in the config parameter,
         * ensure they are at least as long as the input vector.
         * Missing values can corrupt the result.
         * 
         * Disclaimer: This function is intended for efficiently generating visual
         * variety. It is not intended for cryptographic use. Do not use it for
         * security/authentication/encryption purposes. Use a proper tool instead.
         * 
         * Performance note: A 16ms frame has enough time to generate
         * a few hundred hash values, depending on device and workload.
         * 
         * See {@link Phaser.Math.Hash} for more information on the hashing algorithms.
         * @param vector The input vector to hash. 1 to 4 numbers.
         * @param config The configuration of the noise cell field.
         * @returns The hashed cellular noise value. The range increases with the number of input dimensions, as it represents the distance to the nearest distorted cell center.
         */
        function HashCell(vector: number | number[], config?: Phaser.Types.Math.HashCellConfig): number;

        /**
         * Hash a number or list of numbers to a simplex noise value.
         * 
         * A hash is an unpredictable transformation of an input,
         * which always returns the same output from the same input.
         * It is useful for generating random data in a predictable way.
         * 
         * The output is in the range -1 to 1.
         * 
         * You can set the config object to control the output.
         * You can add octaves of detail, add a turbulent warp,
         * adjust gradient flow, and set a randomness seed.
         * 
         * Simplex noise is an evolution of Perlin noise, both invented by Ken Perlin.
         * It is a form of gradient noise, which forms a smooth, continuous field:
         * very similar inputs produce very similar outputs, although the field
         * itself is still random.
         * 
         * Simplex noise works by assigning random gradients to points on a grid,
         * splitting space into grid cells (using a minimal triangular shape called a simplex),
         * identifying which grid cell the input belongs to,
         * and blending between the gradients of that simplex.
         * 
         * This version uses a flow parameter to animate the noise field.
         * The flow value rotates gradients in place, creating a periodic
         * shifting pattern.
         * 
         * This implementation deliberately copies the shaders used in the
         * `NoiseSimplex2D` and `NoiseSimplex3D` game object shaders.
         * They behave in similar fashion, and the config objects are very similar.
         * HashSimplex does not support value factor/add/power terms,
         * as you can simply process the output yourself.
         * 
         * HashSimplex also supports 1-dimensional input.
         * This is automatically padded to 2 dimensions.
         * 
         * Simplex performance varies depending on octaves and warp settings.
         * You might compute a thousand or so hashes per millisecond,
         * depending on device and workload.
         * 
         * Note: If you specify dimensional properties in the config parameter,
         * ensure they are at least as long as the input vector.
         * Missing values can corrupt the result.
         * 
         * Disclaimer: This function is intended for efficiently generating visual
         * variety. It is not intended for cryptographic use. Do not use it for
         * security/authentication/encryption purposes. Use a proper tool instead.
         * @param vector The input vector to hash. 1 to 3 numbers.
         * @param config The configuration of the noise field.
         * @returns A noise value in the range -1 to 1.
         */
        function HashSimplex(vector: number | number[], config?: Phaser.Types.Math.HashSimplexConfig): number;

        /**
         * Check if a given value is an even number.
         * @param value The number to perform the check with.
         * @returns Whether the number is even or not.
         */
        function IsEven(value: number): boolean;

        /**
         * Check if a given value is an even number using a strict type check.
         * @param value The number to perform the check with.
         * @returns Whether the number is even or not.
         */
        function IsEvenStrict(value: number): boolean;

        /**
         * Performs a linear interpolation between two values, returning the value that is `t` percent of the way between `p0` and `p1`.
         * @param p0 The first point.
         * @param p1 The second point.
         * @param t The percentage between p0 and p1 to return, represented as a number between 0 and 1.
         * @returns The interpolated value between p0 and p1, at position t.
         */
        function Linear(p0: number, p1: number, t: number): number;

        /**
         * Interpolates two given Vectors and returns a new Vector between them.
         * 
         * Does not modify either of the passed Vectors.
         * @param vector1 The starting Vector2 to interpolate from.
         * @param vector2 The ending Vector2 to interpolate to.
         * @param t The percentage between vector1 and vector2 to return, represented as a number between 0 and 1. Default 0.
         * @returns The step t% of the way between vector1 and vector2.
         */
        function LinearXY(vector1: Phaser.Math.Vector2, vector2: Phaser.Math.Vector2, t?: number): Phaser.Math.Vector2;

        /**
         * A 3x3 column-major matrix stored as a Float32Array of 9 values. Used for 2D affine
         * transformations, extracting the upper-left 3x3 portion of a Matrix4, and computing
         * normal matrices for lighting calculations. Values are stored in column-major order
         * to match WebGL conventions.
         * 
         * Defaults to the identity matrix when instantiated.
         */
        class Matrix3 {
            /**
             * 
             * @param m Optional Matrix3 to copy values from.
             */
            constructor(m?: Phaser.Math.Matrix3);

            /**
             * The matrix values.
             */
            val: Float32Array;

            /**
             * Make a clone of this Matrix3.undefined
             * @returns A clone of this Matrix3.
             */
            clone(): Phaser.Math.Matrix3;

            /**
             * This method is an alias for `Matrix3.copy`.
             * @param src The Matrix to set the values of this Matrix from.
             * @returns This Matrix3.
             */
            set(src: Phaser.Math.Matrix3): Phaser.Math.Matrix3;

            /**
             * Copy the values of a given Matrix into this Matrix.
             * @param src The Matrix to copy the values from.
             * @returns This Matrix3.
             */
            copy(src: Phaser.Math.Matrix3): Phaser.Math.Matrix3;

            /**
             * Copies the upper-left 3x3 values of a Matrix4 into this Matrix3, discarding
             * the fourth row and column. This is useful when you need the rotation and scale
             * portion of a transformation matrix without its translation component.
             * @param m The Matrix4 to copy the values from.
             * @returns This Matrix3.
             */
            fromMat4(m: Phaser.Math.Matrix4): Phaser.Math.Matrix3;

            /**
             * Set the values of this Matrix from the given array.
             * @param a The array to copy the values from.
             * @returns This Matrix3.
             */
            fromArray(a: any[]): Phaser.Math.Matrix3;

            /**
             * Reset this Matrix to an identity (default) matrix.undefined
             * @returns This Matrix3.
             */
            identity(): Phaser.Math.Matrix3;

            /**
             * Transpose this Matrix.undefined
             * @returns This Matrix3.
             */
            transpose(): Phaser.Math.Matrix3;

            /**
             * Invert this Matrix. Returns `null` if the matrix is not invertible
             * (i.e. its determinant is zero).undefined
             * @returns This Matrix3, or `null` if the matrix cannot be inverted.
             */
            invert(): Phaser.Math.Matrix3;

            /**
             * Calculate the adjoint, or adjugate, of this Matrix.undefined
             * @returns This Matrix3.
             */
            adjoint(): Phaser.Math.Matrix3;

            /**
             * Calculate the determinant of this Matrix.undefined
             * @returns The determinant of this Matrix.
             */
            determinant(): number;

            /**
             * Multiply this Matrix by the given Matrix.
             * @param src The Matrix to multiply this Matrix by.
             * @returns This Matrix3.
             */
            multiply(src: Phaser.Math.Matrix3): Phaser.Math.Matrix3;

            /**
             * Translate this Matrix using the given Vector.
             * @param v The Vector to translate this Matrix with.
             * @returns This Matrix3.
             */
            translate(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Matrix3;

            /**
             * Apply a rotation transformation to this Matrix.
             * @param rad The angle in radians to rotate by.
             * @returns This Matrix3.
             */
            rotate(rad: number): Phaser.Math.Matrix3;

            /**
             * Apply a scale transformation to this Matrix.
             * 
             * Uses the `x` and `y` components of the given Vector to scale the Matrix.
             * @param v The Vector to scale this Matrix with.
             * @returns This Matrix3.
             */
            scale(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Matrix3;

            /**
             * Set the values of this Matrix from the given Quaternion.
             * @param q The Quaternion to set the values of this Matrix from.
             * @returns This Matrix3.
             */
            fromQuat(q: Phaser.Math.Quaternion): Phaser.Math.Matrix3;

            /**
             * Derives a normal matrix from the given Matrix4. The normal matrix is the
             * transpose of the inverse of the Matrix4, and is used in lighting calculations
             * to correctly transform surface normals when non-uniform scaling is applied.
             * Returns `null` if the Matrix4 is not invertible (i.e. its determinant is zero).
             * @param m The Matrix4 to derive the normal matrix from.
             * @returns This Matrix3, or `null` if the Matrix4 cannot be inverted.
             */
            normalFromMat4(m: Phaser.Math.Matrix4): Phaser.Math.Matrix3;

        }

        /**
         * A 4x4 column-major matrix stored as a Float32Array of 16 values. Used for 3D
         * transformations including projection, view, and model matrices. This is the primary
         * matrix class for WebGL rendering operations in Phaser, supporting
         * perspective/orthographic projection, look-at camera setup, and affine transforms
         * (translate, rotate, scale).
         * 
         * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji
         * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl
         */
        class Matrix4 {
            /**
             * 
             * @param m Optional Matrix4 to copy values from.
             */
            constructor(m?: Phaser.Math.Matrix4);

            /**
             * The matrix values.
             */
            val: Float32Array;

            /**
             * Make a clone of this Matrix4.undefined
             * @returns A clone of this Matrix4.
             */
            clone(): Phaser.Math.Matrix4;

            /**
             * This method is an alias for `Matrix4.copy`.
             * @param src The Matrix to set the values of this Matrix from.
             * @returns This Matrix4.
             */
            set(src: Phaser.Math.Matrix4): this;

            /**
             * Sets all values of this Matrix4.
             * @param m00 The m00 value.
             * @param m01 The m01 value.
             * @param m02 The m02 value.
             * @param m03 The m03 value.
             * @param m10 The m10 value.
             * @param m11 The m11 value.
             * @param m12 The m12 value.
             * @param m13 The m13 value.
             * @param m20 The m20 value.
             * @param m21 The m21 value.
             * @param m22 The m22 value.
             * @param m23 The m23 value.
             * @param m30 The m30 value.
             * @param m31 The m31 value.
             * @param m32 The m32 value.
             * @param m33 The m33 value.
             * @returns This Matrix4 instance.
             */
            setValues(m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): this;

            /**
             * Copy the values of a given Matrix into this Matrix.
             * @param src The Matrix to copy the values from.
             * @returns This Matrix4.
             */
            copy(src: Phaser.Math.Matrix4): this;

            /**
             * Set the values of this Matrix from the given array.
             * @param a The array to copy the values from. Must have at least 16 elements.
             * @returns This Matrix4.
             */
            fromArray(a: number[]): this;

            /**
             * Reset this Matrix.
             * 
             * Sets all values to `0`.undefined
             * @returns This Matrix4.
             */
            zero(): Phaser.Math.Matrix4;

            /**
             * Generates a transform matrix based on the given position, scale and rotation.
             * @param position The position vector.
             * @param scale The scale vector.
             * @param rotation The rotation quaternion.
             * @returns This Matrix4.
             */
            transform(position: Phaser.Math.Vector3, scale: Phaser.Math.Vector3, rotation: Phaser.Math.Quaternion): this;

            /**
             * Set the `x`, `y` and `z` values of this Matrix.
             * @param x The x value.
             * @param y The y value.
             * @param z The z value.
             * @returns This Matrix4.
             */
            xyz(x: number, y: number, z: number): this;

            /**
             * Set the scaling values of this Matrix.
             * @param x The x scaling value.
             * @param y The y scaling value.
             * @param z The z scaling value.
             * @returns This Matrix4.
             */
            scaling(x: number, y: number, z: number): this;

            /**
             * Reset this Matrix to an identity (default) matrix.undefined
             * @returns This Matrix4.
             */
            identity(): this;

            /**
             * Transpose this Matrix.undefined
             * @returns This Matrix4.
             */
            transpose(): this;

            /**
             * Copies the given Matrix4 into this Matrix and then inverses it.
             * @param m The Matrix4 to invert into this Matrix4.
             * @returns This Matrix4.
             */
            getInverse(m: Phaser.Math.Matrix4): this;

            /**
             * Invert this Matrix.undefined
             * @returns This Matrix4.
             */
            invert(): this;

            /**
             * Calculate the adjoint, or adjugate, of this Matrix.undefined
             * @returns This Matrix4.
             */
            adjoint(): this;

            /**
             * Calculate the determinant of this Matrix.undefined
             * @returns The determinant of this Matrix.
             */
            determinant(): number;

            /**
             * Multiply this Matrix by the given Matrix.
             * @param src The Matrix to multiply this Matrix by.
             * @returns This Matrix4.
             */
            multiply(src: Phaser.Math.Matrix4): this;

            /**
             * Multiply the values of this Matrix4 by those given in the `src` argument.
             * @param src The source Matrix4 that this Matrix4 is multiplied by.
             * @returns This Matrix4.
             */
            multiplyLocal(src: Phaser.Math.Matrix4): this;

            /**
             * Multiplies the given Matrix4 object with this Matrix.
             * 
             * This is the same as calling `multiplyMatrices(m, this)`.
             * @param m The Matrix4 to multiply with this one.
             * @returns This Matrix4.
             */
            premultiply(m: Phaser.Math.Matrix4): this;

            /**
             * Multiplies the two given Matrix4 objects and stores the results in this Matrix.
             * @param a The first Matrix4 to multiply.
             * @param b The second Matrix4 to multiply.
             * @returns This Matrix4.
             */
            multiplyMatrices(a: Phaser.Math.Matrix4, b: Phaser.Math.Matrix4): this;

            /**
             * Translate this Matrix using the given Vector.
             * @param v The Vector to translate this Matrix with.
             * @returns This Matrix4.
             */
            translate(v: Phaser.Math.Vector3 | Phaser.Math.Vector4): this;

            /**
             * Translate this Matrix using the given values.
             * @param x The x component.
             * @param y The y component.
             * @param z The z component.
             * @returns This Matrix4.
             */
            translateXYZ(x: number, y: number, z: number): this;

            /**
             * Apply a scale transformation to this Matrix.
             * 
             * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.
             * @param v The Vector to scale this Matrix with.
             * @returns This Matrix4.
             */
            scale(v: Phaser.Math.Vector3 | Phaser.Math.Vector4): this;

            /**
             * Apply a scale transformation to this Matrix.
             * @param x The x component.
             * @param y The y component.
             * @param z The z component.
             * @returns This Matrix4.
             */
            scaleXYZ(x: number, y: number, z: number): this;

            /**
             * Derive a rotation matrix around the given axis.
             * @param axis The rotation axis.
             * @param angle The rotation angle in radians.
             * @returns This Matrix4.
             */
            makeRotationAxis(axis: Phaser.Math.Vector3 | Phaser.Math.Vector4, angle: number): this;

            /**
             * Apply a rotation transformation to this Matrix.
             * @param rad The angle in radians to rotate by.
             * @param axis The axis to rotate upon.
             * @returns This Matrix4.
             */
            rotate(rad: number, axis: Phaser.Math.Vector3): this;

            /**
             * Rotate this matrix on its X axis.
             * @param rad The angle in radians to rotate by.
             * @returns This Matrix4.
             */
            rotateX(rad: number): this;

            /**
             * Rotate this matrix on its Y axis.
             * @param rad The angle to rotate by, in radians.
             * @returns This Matrix4.
             */
            rotateY(rad: number): this;

            /**
             * Rotate this matrix on its Z axis.
             * @param rad The angle to rotate by, in radians.
             * @returns This Matrix4.
             */
            rotateZ(rad: number): this;

            /**
             * Set the values of this Matrix from the given rotation Quaternion and translation Vector.
             * @param q The Quaternion to set rotation from.
             * @param v The Vector to set translation from.
             * @returns This Matrix4.
             */
            fromRotationTranslation(q: Phaser.Math.Quaternion, v: Phaser.Math.Vector3): this;

            /**
             * Set the values of this Matrix from the given Quaternion.
             * @param q The Quaternion to set the values of this Matrix from.
             * @returns This Matrix4.
             */
            fromQuat(q: Phaser.Math.Quaternion): this;

            /**
             * Generate a frustum matrix with the given bounds.
             * @param left The left bound of the frustum.
             * @param right The right bound of the frustum.
             * @param bottom The bottom bound of the frustum.
             * @param top The top bound of the frustum.
             * @param near The near bound of the frustum.
             * @param far The far bound of the frustum.
             * @returns This Matrix4.
             */
            frustum(left: number, right: number, bottom: number, top: number, near: number, far: number): this;

            /**
             * Generate a perspective projection matrix with the given bounds.
             * @param fovy Vertical field of view in radians
             * @param aspect Aspect ratio. Typically viewport width / height.
             * @param near Near bound of the frustum.
             * @param far Far bound of the frustum.
             * @returns This Matrix4.
             */
            perspective(fovy: number, aspect: number, near: number, far: number): this;

            /**
             * Generate a left-handed perspective projection matrix with the given frustum dimensions.
             * 
             * Unlike `perspective`, this method takes explicit pixel width and height for the frustum
             * rather than a field-of-view angle and aspect ratio.
             * @param width The width of the frustum.
             * @param height The height of the frustum.
             * @param near Near bound of the frustum.
             * @param far Far bound of the frustum.
             * @returns This Matrix4.
             */
            perspectiveLH(width: number, height: number, near: number, far: number): this;

            /**
             * Generate an orthogonal projection matrix with the given bounds.
             * @param left The left bound of the frustum.
             * @param right The right bound of the frustum.
             * @param bottom The bottom bound of the frustum.
             * @param top The top bound of the frustum.
             * @param near The near bound of the frustum.
             * @param far The far bound of the frustum.
             * @returns This Matrix4.
             */
            ortho(left: number, right: number, bottom: number, top: number, near: number, far: number): this;

            /**
             * Generate a right-handed look-at matrix with the given eye position, target and up axis.
             * @param eye Position of the viewer.
             * @param target Point the viewer is looking at.
             * @param up A Vector3 pointing up, used to orient the camera roll.
             * @returns This Matrix4.
             */
            lookAtRH(eye: Phaser.Math.Vector3, target: Phaser.Math.Vector3, up: Phaser.Math.Vector3): this;

            /**
             * Generate a look-at matrix with the given eye position, focal point, and up axis.
             * @param eye Position of the viewer
             * @param center Point the viewer is looking at
             * @param up A Vector3 pointing up, used to orient the camera roll.
             * @returns This Matrix4.
             */
            lookAt(eye: Phaser.Math.Vector3, center: Phaser.Math.Vector3, up: Phaser.Math.Vector3): this;

            /**
             * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.
             * @param yaw The yaw angle, in radians.
             * @param pitch The pitch angle, in radians.
             * @param roll The roll angle, in radians.
             * @returns This Matrix4.
             */
            yawPitchRoll(yaw: number, pitch: number, roll: number): this;

            /**
             * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.
             * @param rotation The rotation of the world matrix.
             * @param position The position of the world matrix.
             * @param scale The scale of the world matrix.
             * @param viewMatrix The view matrix.
             * @param projectionMatrix The projection matrix.
             * @returns This Matrix4.
             */
            setWorldMatrix(rotation: Phaser.Math.Vector3, position: Phaser.Math.Vector3, scale: Phaser.Math.Vector3, viewMatrix?: Phaser.Math.Matrix4, projectionMatrix?: Phaser.Math.Matrix4): this;

            /**
             * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.
             * @param src The Matrix4 to multiply with this one.
             * @param out The receiving Matrix.
             * @returns This `out` Matrix4.
             */
            multiplyToMat4(src: Phaser.Math.Matrix4, out: Phaser.Math.Matrix4): Phaser.Math.Matrix4;

            /**
             * Takes the rotation and position vectors and builds this Matrix4 from them.
             * @param rotation The rotation vector.
             * @param position The position vector.
             * @param translateFirst Should the operation translate then rotate (`true`), or rotate then translate? (`false`)
             * @returns This Matrix4.
             */
            fromRotationXYTranslation(rotation: Phaser.Math.Vector3, position: Phaser.Math.Vector3, translateFirst: boolean): this;

            /**
             * Returns the maximum axis scale from this Matrix4.undefined
             * @returns The maximum axis scale.
             */
            getMaxScaleOnAxis(): number;

        }

        /**
         * Add an `amount` to a `value`, limiting the maximum result to `max`.
         * @param value The value to add to.
         * @param amount The amount to add.
         * @param max The maximum value to return.
         * @returns The resulting value.
         */
        function MaxAdd(value: number, amount: number, max: number): number;

        /**
         * Calculate the median of the given values. The values are sorted and the middle value is returned.
         * In case of an even number of values, the average of the two middle values is returned.
         * @param values The values to find the median of.
         * @returns The median value.
         */
        function Median(values: number[]): number;

        /**
         * Subtract an `amount` from `value`, limiting the minimum result to `min`.
         * @param value The value to subtract from.
         * @param amount The amount to subtract.
         * @param min The minimum value to return.
         * @returns The resulting value.
         */
        function MinSub(value: number, amount: number, min: number): number;

        /**
         * Work out what percentage `value` is of the range between `min` and `max`.
         * If `max` isn't given then it defaults to `min + 1`, giving a unit range of width 1 starting at `min`.
         * 
         * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.
         * @param value The value to determine the percentage of.
         * @param min The minimum value.
         * @param max The maximum value.
         * @param upperMax The mid-way point in the range that represents 100%.
         * @returns A value between 0 and 1 representing the percentage.
         */
        function Percent(value: number, min: number, max?: number, upperMax?: number): number;

        /**
         * A quaternion representing a rotation in 3D space. Quaternions avoid gimbal lock
         * and provide smooth interpolation between orientations. The quaternion is stored as
         * four components (x, y, z, w). Use the `identity` method to reset to the identity
         * quaternion (0, 0, 0, 1), which represents no rotation. Commonly used with Matrix4
         * for 3D transformations in WebGL rendering.
         */
        class Quaternion {
            /**
             * 
             * @param x The x component. Default 0.
             * @param y The y component. Default 0.
             * @param z The z component. Default 0.
             * @param w The w component. Default 1.
             */
            constructor(x?: number, y?: number, z?: number, w?: number);

            /**
             * This callback is invoked, if set, each time a value in this quaternion is changed.
             * The callback is passed one argument, a reference to this quaternion.
             */
            onChangeCallback: Function;

            /**
             * The x component of this Quaternion.
             */
            x: number;

            /**
             * The y component of this Quaternion.
             */
            y: number;

            /**
             * The z component of this Quaternion.
             */
            z: number;

            /**
             * The w component of this Quaternion.
             */
            w: number;

            /**
             * Copy the components of a given Quaternion or Vector into this Quaternion.
             * @param src The Quaternion or Vector to copy the components from.
             * @returns This Quaternion.
             */
            copy(src: Phaser.Math.Quaternion | Phaser.Math.Vector4): Phaser.Math.Quaternion;

            /**
             * Set the components of this Quaternion and optionally call the `onChangeCallback`.
             * @param x The x component, or an object containing x, y, z, and w components. Default 0.
             * @param y The y component. Default 0.
             * @param z The z component. Default 0.
             * @param w The w component. Default 0.
             * @param update Call the `onChangeCallback`? Default true.
             * @returns This Quaternion.
             */
            set(x?: number | object, y?: number, z?: number, w?: number, update?: boolean): Phaser.Math.Quaternion;

            /**
             * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.
             * @param v The Quaternion or Vector to add to this Quaternion.
             * @returns This Quaternion.
             */
            add(v: Phaser.Math.Quaternion | Phaser.Math.Vector4): Phaser.Math.Quaternion;

            /**
             * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.
             * @param v The Quaternion or Vector to subtract from this Quaternion.
             * @returns This Quaternion.
             */
            subtract(v: Phaser.Math.Quaternion | Phaser.Math.Vector4): Phaser.Math.Quaternion;

            /**
             * Scale this Quaternion by the given value.
             * @param scale The value to scale this Quaternion by.
             * @returns This Quaternion.
             */
            scale(scale: number): Phaser.Math.Quaternion;

            /**
             * Calculate the length of this Quaternion.undefined
             * @returns The length of this Quaternion.
             */
            length(): number;

            /**
             * Calculate the length of this Quaternion squared.undefined
             * @returns The length of this Quaternion, squared.
             */
            lengthSq(): number;

            /**
             * Normalizes this Quaternion, scaling it to unit length. If the Quaternion has
             * zero length, no change is made.undefined
             * @returns This Quaternion.
             */
            normalize(): Phaser.Math.Quaternion;

            /**
             * Calculate the dot product of this Quaternion and the given Quaternion or Vector.
             * @param v The Quaternion or Vector to dot product with this Quaternion.
             * @returns The dot product of this Quaternion and the given Quaternion or Vector.
             */
            dot(v: Phaser.Math.Quaternion | Phaser.Math.Vector4): number;

            /**
             * Linearly interpolate this Quaternion towards the given Quaternion or Vector.
             * @param v The Quaternion or Vector to interpolate towards.
             * @param t The percentage of interpolation. Default 0.
             * @returns This Quaternion.
             */
            lerp(v: Phaser.Math.Quaternion | Phaser.Math.Vector4, t?: number): Phaser.Math.Quaternion;

            /**
             * Sets this Quaternion to represent the shortest arc rotation from unit vector `a`
             * to unit vector `b`. This is the minimum rotation needed to align `a` with `b`.
             * Both vectors must be normalized before calling this method.
             * @param a The starting unit vector.
             * @param b The target unit vector.
             * @returns This Quaternion.
             */
            rotationTo(a: Phaser.Math.Vector3, b: Phaser.Math.Vector3): Phaser.Math.Quaternion;

            /**
             * Sets this Quaternion from the given view, right, and up axis vectors. The three
             * vectors are written into a temporary Matrix3, which is then converted to a
             * normalized quaternion. All three vectors should be mutually orthogonal unit vectors.
             * @param view The view (forward) axis.
             * @param right The right axis.
             * @param up The up axis.
             * @returns This Quaternion.
             */
            setAxes(view: Phaser.Math.Vector3, right: Phaser.Math.Vector3, up: Phaser.Math.Vector3): Phaser.Math.Quaternion;

            /**
             * Resets this Quaternion to the identity quaternion (0, 0, 0, 1), which represents
             * no rotation.undefined
             * @returns This Quaternion.
             */
            identity(): Phaser.Math.Quaternion;

            /**
             * Sets this Quaternion to represent a rotation of `rad` radians around the given
             * normalized axis vector.
             * @param axis The normalized axis vector around which to rotate.
             * @param rad The rotation angle in radians.
             * @returns This Quaternion.
             */
            setAxisAngle(axis: Phaser.Math.Vector3, rad: number): Phaser.Math.Quaternion;

            /**
             * Multiply this Quaternion by the given Quaternion or Vector.
             * @param b The Quaternion or Vector to multiply this Quaternion by.
             * @returns This Quaternion.
             */
            multiply(b: Phaser.Math.Quaternion | Phaser.Math.Vector4): Phaser.Math.Quaternion;

            /**
             * Performs a spherical linear interpolation (slerp) between this Quaternion and
             * the given Quaternion or Vector. Unlike `lerp`, slerp interpolates along the
             * shortest arc on the unit sphere, maintaining constant angular velocity and
             * producing smooth, natural-looking rotations.
             * @param b The Quaternion or Vector to interpolate towards.
             * @param t The interpolation factor, typically in the range [0, 1].
             * @returns This Quaternion.
             */
            slerp(b: Phaser.Math.Quaternion | Phaser.Math.Vector4, t: number): Phaser.Math.Quaternion;

            /**
             * Calculates the multiplicative inverse of this Quaternion and sets the result.
             * The inverse undoes the rotation represented by this Quaternion. If the Quaternion
             * has zero length, no change is made.undefined
             * @returns This Quaternion.
             */
            invert(): Phaser.Math.Quaternion;

            /**
             * Converts this Quaternion to its conjugate by negating the x, y, and z components
             * while leaving w unchanged. For a unit quaternion, the conjugate is equivalent to
             * the inverse and represents the opposite rotation.undefined
             * @returns This Quaternion.
             */
            conjugate(): Phaser.Math.Quaternion;

            /**
             * Rotate this Quaternion on the X axis.
             * @param rad The rotation angle in radians.
             * @returns This Quaternion.
             */
            rotateX(rad: number): Phaser.Math.Quaternion;

            /**
             * Rotate this Quaternion on the Y axis.
             * @param rad The rotation angle in radians.
             * @returns This Quaternion.
             */
            rotateY(rad: number): Phaser.Math.Quaternion;

            /**
             * Rotate this Quaternion on the Z axis.
             * @param rad The rotation angle in radians.
             * @returns This Quaternion.
             */
            rotateZ(rad: number): Phaser.Math.Quaternion;

            /**
             * Calculates and sets the w component of this Quaternion based on the current x, y,
             * and z components, so that the Quaternion has unit length. Assumes the x, y, and z
             * values are already known and that their combined squared length does not exceed 1.undefined
             * @returns This Quaternion.
             */
            calculateW(): Phaser.Math.Quaternion;

            /**
             * Sets this Quaternion from the given Euler object. The conversion respects the
             * Euler's rotation order (e.g., 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY'),
             * producing the equivalent quaternion rotation.
             * @param euler The Euler object to convert from.
             * @param update Run the `onChangeCallback`? Default true.
             * @returns This Quaternion.
             */
            setFromEuler(euler: Phaser.Math.Euler, update?: boolean): Phaser.Math.Quaternion;

            /**
             * Sets the rotation of this Quaternion from the given Matrix4.
             * @param mat4 The Matrix4 to set the rotation from.
             * @returns This Quaternion.
             */
            setFromRotationMatrix(mat4: Phaser.Math.Matrix4): Phaser.Math.Quaternion;

            /**
             * Sets this Quaternion from the rotation represented by the given Matrix3, using
             * the algorithm from Ken Shoemake's 1987 SIGGRAPH article "Quaternion Calculus and
             * Fast Animation".
             * @param mat The Matrix3 to convert from.
             * @returns This Quaternion.
             */
            fromMat3(mat: Phaser.Math.Matrix3): Phaser.Math.Quaternion;

        }

        /**
         * Convert the given angle in radians, to the equivalent angle in degrees.
         * @param radians The angle in radians to convert to degrees.
         * @returns The given angle converted to degrees.
         */
        function RadToDeg(radians: number): number;

        /**
         * Compute a random unit vector.
         * 
         * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.
         * 
         * Optionally accepts a scale value to scale the resulting vector by.
         * @param vector The Vector to compute random values for.
         * @param scale The scale of the random values. Default 1.
         * @returns The given Vector.
         */
        function RandomXY(vector: Phaser.Math.Vector2, scale?: number): Phaser.Math.Vector2;

        /**
         * Compute a random position vector on the surface of a sphere of the given radius.
         * @param vec3 The Vector to compute random values for.
         * @param radius The radius of the sphere. Default 1.
         * @returns The given Vector.
         */
        function RandomXYZ(vec3: Phaser.Math.Vector3, radius?: number): Phaser.Math.Vector3;

        /**
         * Compute a random four-dimensional vector.
         * @param vec4 The Vector to compute random values for.
         * @param scale The scale of the random values. Default 1.
         * @returns The given Vector.
         */
        function RandomXYZW(vec4: Phaser.Math.Vector4, scale?: number): Phaser.Math.Vector4;

        /**
         * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.
         * @param point The point to be rotated.
         * @param angle The angle to rotate by, in radians, in an anti-clockwise direction.
         * @returns The given point, rotated by the given angle in an anti-clockwise direction.
         */
        function Rotate<T extends Phaser.Types.Math.Vector2Like>(point: T, angle: number): T;

        /**
         * Rotate a `point` around `x` and `y` by the given `angle`, at the same distance.
         * 
         * In polar notation, this maps a point from (r, t) to (r, t + angle), vs. the origin (x, y).
         * @param point The point to be rotated.
         * @param x The horizontal coordinate to rotate around.
         * @param y The vertical coordinate to rotate around.
         * @param angle The angle of rotation in radians.
         * @returns The given point.
         */
        function RotateAround<T extends Phaser.Types.Math.Vector2Like>(point: T, x: number, y: number, angle: number): T;

        /**
         * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.
         * 
         * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).
         * @param point The point to be rotated.
         * @param x The horizontal coordinate to rotate around.
         * @param y The vertical coordinate to rotate around.
         * @param angle The angle of rotation in radians.
         * @param distance The distance from (x, y) to place the point at.
         * @returns The given point.
         */
        function RotateAroundDistance<T extends Phaser.Types.Math.Vector2Like>(point: T, x: number, y: number, angle: number, distance: number): T;

        /**
         * Position a `point` at the given `angle` and `distance` to (`x`, `y`).
         * @param point The point to be positioned.
         * @param x The horizontal coordinate to position from.
         * @param y The vertical coordinate to position from.
         * @param angle The angle of rotation in radians.
         * @param distance The distance from (x, y) to place the point at.
         * @returns The given point.
         */
        function RotateTo<T extends Phaser.Types.Math.Vector2Like>(point: T, x: number, y: number, angle: number, distance: number): T;

        /**
         * Rotates a vector in place by axis angle.
         * 
         * This is the same as transforming a point by an
         * axis-angle quaternion, but it has higher precision.
         * @param vec The vector to be rotated.
         * @param axis The axis to rotate around.
         * @param radians The angle of rotation in radians.
         * @returns The given vector.
         */
        function RotateVec3(vec: Phaser.Math.Vector3, axis: Phaser.Math.Vector3, radians: number): Phaser.Math.Vector3;

        /**
         * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.
         * @param value The number to round.
         * @returns The rounded number, rounded away from zero.
         */
        function RoundAwayFromZero(value: number): number;

        /**
         * Round a value to the given precision.
         * 
         * For example:
         * 
         * ```javascript
         * RoundTo(123.456, 0) = 123
         * RoundTo(123.456, 1) = 120
         * RoundTo(123.456, 2) = 100
         * ```
         * 
         * To round the decimal, i.e. to round to precision, pass in a negative `place`:
         * 
         * ```javascript
         * RoundTo(123.456789, 0) = 123
         * RoundTo(123.456789, -1) = 123.5
         * RoundTo(123.456789, -2) = 123.46
         * RoundTo(123.456789, -3) = 123.457
         * ```
         * @param value The value to round.
         * @param place The place to round to. Positive to round the units, negative to round the decimal. Default 0.
         * @param base The base to round in. Default is 10 for decimal. Default 10.
         * @returns The rounded value.
         */
        function RoundTo(value: number, place?: number, base?: number): number;

        /**
         * Calculate a smooth interpolation percentage of `x` between `min` and `max`.
         * 
         * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,
         * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,
         * between 0 and 1 otherwise.
         * @param x The input value.
         * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.
         * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.
         * @returns The percentage of interpolation, between 0 and 1.
         */
        function SmoothStep(x: number, min: number, max: number): number;

        /**
         * Calculate a smoother interpolation percentage of `x` between `min` and `max`.
         * 
         * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,
         * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,
         * between 0 and 1 otherwise.
         * 
         * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.
         * @param x The input value.
         * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.
         * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.
         * @returns The percentage of interpolation, between 0 and 1.
         */
        function SmootherStep(x: number, min: number, max: number): number;

        /**
         * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.
         * 
         * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.
         * 
         * If the given index is out of range, a Vector2 with x and y set to zero is returned.
         * @param index The position within the grid to get the x/y value for.
         * @param width The width of the grid.
         * @param height The height of the grid.
         * @param out An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.
         * @returns A Vector2 containing the x and y grid coordinates derived from the given index.
         */
        function ToXY(index: number, width: number, height: number, out?: Phaser.Math.Vector2): Phaser.Math.Vector2;

        /**
         * Takes the `x` and `y` coordinates and transforms them into the local coordinate
         * space defined by the given position, rotation, and scale values. This performs
         * an inverse transformation, converting a point from world space into the equivalent
         * local-space coordinates of a Game Object or other transformed entity. This is
         * useful for hit-testing or pointer input when you need to determine where a
         * world-space point falls within a transformed object's local coordinate system.
         * @param x The x coordinate to be transformed.
         * @param y The y coordinate to be transformed.
         * @param positionX Horizontal position of the transform point.
         * @param positionY Vertical position of the transform point.
         * @param rotation Rotation of the transform point, in radians.
         * @param scaleX Horizontal scale of the transform point.
         * @param scaleY Vertical scale of the transform point.
         * @param output The output vector, point or object for the translated coordinates.
         * @returns The translated point.
         */
        function TransformXY(x: number, y: number, positionX: number, positionY: number, rotation: number, scaleX: number, scaleY: number, output?: Phaser.Types.Math.Vector2Like): Phaser.Types.Math.Vector2Like;

        /**
         * A representation of a vector in 2D space, defined by an `x` and `y` component.
         * 
         * Vector2 is used throughout Phaser for positions, directions, velocities, and other
         * quantities that have both magnitude and direction. It provides methods for common
         * vector operations such as addition, subtraction, scaling, normalization, dot and
         * cross products, linear interpolation, and rotation. Many Phaser APIs accept a
         * `Vector2Like` object (any object with `x` and `y` number properties), making
         * Vector2 easy to integrate across the framework.
         */
        class Vector2 {
            /**
             * 
             * @param x The x component, or an object with `x` and `y` properties. Default 0.
             * @param y The y component. Default x.
             */
            constructor(x?: number | Phaser.Types.Math.Vector2Like, y?: number);

            /**
             * The x component of this Vector.
             */
            x: number;

            /**
             * The y component of this Vector.
             */
            y: number;

            /**
             * Make a clone of this Vector2.undefined
             * @returns A clone of this Vector2.
             */
            clone(): Phaser.Math.Vector2;

            /**
             * Copy the components of a given Vector into this Vector.
             * @param src The Vector to copy the components from.
             * @returns This Vector2.
             */
            copy(src: Phaser.Types.Math.Vector2Like): Phaser.Math.Vector2;

            /**
             * Set the component values of this Vector from a given Vector2Like object.
             * @param obj The object containing the component values to set for this Vector.
             * @returns This Vector2.
             */
            setFromObject(obj: Phaser.Types.Math.Vector2Like): Phaser.Math.Vector2;

            /**
             * Set the `x` and `y` components of this Vector to the given `x` and `y` values.
             * @param x The x value to set for this Vector.
             * @param y The y value to set for this Vector. Default x.
             * @returns This Vector2.
             */
            set(x: number, y?: number): Phaser.Math.Vector2;

            /**
             * This method is an alias for `Vector2.set`.
             * @param x The x value to set for this Vector.
             * @param y The y value to set for this Vector. Default x.
             * @returns This Vector2.
             */
            setTo(x: number, y?: number): Phaser.Math.Vector2;

            /**
             * Runs the x and y components of this Vector2 through Math.ceil and then sets them.undefined
             * @returns This Vector2.
             */
            ceil(): Phaser.Math.Vector2;

            /**
             * Runs the x and y components of this Vector2 through Math.floor and then sets them.undefined
             * @returns This Vector2.
             */
            floor(): Phaser.Math.Vector2;

            /**
             * Swaps the x and y components of this Vector2.undefined
             * @returns This Vector2.
             */
            invert(): Phaser.Math.Vector2;

            /**
             * Sets the x and y components of this Vector from the given angle and length.
             * @param angle The angle from the positive x-axis, in radians.
             * @param length The distance from the origin. Default 1.
             * @returns This Vector2.
             */
            setToPolar(angle: number, length?: number): Phaser.Math.Vector2;

            /**
             * Check whether this Vector is equal to a given Vector.
             * 
             * Performs a strict equality check against each Vector's components.
             * @param v The vector to compare with this Vector.
             * @returns Whether the given Vector is equal to this Vector.
             */
            equals(v: Phaser.Types.Math.Vector2Like): boolean;

            /**
             * Check whether this Vector is approximately equal to a given Vector.
             * @param v The vector to compare with this Vector.
             * @param epsilon The tolerance value. Default 0.0001.
             * @returns Whether both absolute differences of the x and y components are smaller than `epsilon`.
             */
            fuzzyEquals(v: Phaser.Types.Math.Vector2Like, epsilon?: number): boolean;

            /**
             * Calculate the angle between this Vector and the positive x-axis, in radians.undefined
             * @returns The angle between this Vector, and the positive x-axis, given in radians.
             */
            angle(): number;

            /**
             * Set the angle of this Vector.
             * @param angle The angle, in radians.
             * @returns This Vector2.
             */
            setAngle(angle: number): Phaser.Math.Vector2;

            /**
             * Add a given Vector to this Vector. Addition is component-wise.
             * @param src The Vector to add to this Vector.
             * @returns This Vector2.
             */
            add(src: Phaser.Types.Math.Vector2Like): Phaser.Math.Vector2;

            /**
             * Subtract the given Vector from this Vector. Subtraction is component-wise.
             * @param src The Vector to subtract from this Vector.
             * @returns This Vector2.
             */
            subtract(src: Phaser.Types.Math.Vector2Like): Phaser.Math.Vector2;

            /**
             * Perform a component-wise multiplication between this Vector and the given Vector.
             * 
             * Multiplies this Vector by the given Vector.
             * @param src The Vector to multiply this Vector by.
             * @returns This Vector2.
             */
            multiply(src: Phaser.Types.Math.Vector2Like): Phaser.Math.Vector2;

            /**
             * Scale this Vector by the given value.
             * @param value The value to scale this Vector by.
             * @returns This Vector2.
             */
            scale(value: number): Phaser.Math.Vector2;

            /**
             * Perform a component-wise division between this Vector and the given Vector.
             * 
             * Divides this Vector by the given Vector.
             * @param src The Vector to divide this Vector by.
             * @returns This Vector2.
             */
            divide(src: Phaser.Types.Math.Vector2Like): Phaser.Math.Vector2;

            /**
             * Negate the `x` and `y` components of this Vector.undefined
             * @returns This Vector2.
             */
            negate(): Phaser.Math.Vector2;

            /**
             * Calculate the distance between this Vector and the given Vector.
             * @param src The Vector to calculate the distance to.
             * @returns The distance from this Vector to the given Vector.
             */
            distance(src: Phaser.Types.Math.Vector2Like): number;

            /**
             * Calculate the distance between this Vector and the given Vector, squared.
             * @param src The Vector to calculate the distance to.
             * @returns The distance from this Vector to the given Vector, squared.
             */
            distanceSq(src: Phaser.Types.Math.Vector2Like): number;

            /**
             * Calculate the length (or magnitude) of this Vector.undefined
             * @returns The length of this Vector.
             */
            length(): number;

            /**
             * Set the length (or magnitude) of this Vector.
             * @param length The new magnitude of this Vector.
             * @returns This Vector2.
             */
            setLength(length: number): Phaser.Math.Vector2;

            /**
             * Calculate the length of this Vector squared.undefined
             * @returns The length of this Vector, squared.
             */
            lengthSq(): number;

            /**
             * Normalize this Vector.
             * 
             * Makes the vector a unit length vector (magnitude of 1) in the same direction.undefined
             * @returns This Vector2.
             */
            normalize(): Phaser.Math.Vector2;

            /**
             * Rotate this Vector to its perpendicular, in the positive direction.undefined
             * @returns This Vector2.
             */
            normalizeRightHand(): Phaser.Math.Vector2;

            /**
             * Rotate this Vector to its perpendicular, in the negative direction.undefined
             * @returns This Vector2.
             */
            normalizeLeftHand(): Phaser.Math.Vector2;

            /**
             * Calculate the dot product of this Vector and the given Vector.
             * @param src The Vector2 to dot product with this Vector2.
             * @returns The dot product of this Vector and the given Vector.
             */
            dot(src: Phaser.Types.Math.Vector2Like): number;

            /**
             * Calculate the cross product of this Vector and the given Vector.
             * @param src The Vector2 to cross with this Vector2.
             * @returns The cross product of this Vector and the given Vector.
             */
            cross(src: Phaser.Types.Math.Vector2Like): number;

            /**
             * Linearly interpolate between this Vector and the given Vector.
             * 
             * Interpolates this Vector towards the given Vector.
             * @param src The Vector2 to interpolate towards.
             * @param t The interpolation percentage, between 0 and 1. Default 0.
             * @returns This Vector2.
             */
            lerp(src: Phaser.Types.Math.Vector2Like, t?: number): Phaser.Math.Vector2;

            /**
             * Transform this Vector with the given Matrix3.
             * @param mat The Matrix3 to transform this Vector2 with.
             * @returns This Vector2.
             */
            transformMat3(mat: Phaser.Math.Matrix3): Phaser.Math.Vector2;

            /**
             * Transform this Vector with the given Matrix4.
             * @param mat The Matrix4 to transform this Vector2 with.
             * @returns This Vector2.
             */
            transformMat4(mat: Phaser.Math.Matrix4): Phaser.Math.Vector2;

            /**
             * Make this Vector the zero vector (0, 0).undefined
             * @returns This Vector2.
             */
            reset(): Phaser.Math.Vector2;

            /**
             * Limit the length (or magnitude) of this Vector.
             * @param max The maximum length.
             * @returns This Vector2.
             */
            limit(max: number): Phaser.Math.Vector2;

            /**
             * Reflect this Vector off a line defined by a normal.
             * @param normal A vector perpendicular to the line.
             * @returns This Vector2.
             */
            reflect(normal: Phaser.Math.Vector2): Phaser.Math.Vector2;

            /**
             * Reflect this Vector across another.
             * @param axis A vector to reflect across.
             * @returns This Vector2.
             */
            mirror(axis: Phaser.Math.Vector2): Phaser.Math.Vector2;

            /**
             * Rotate this Vector by an angle amount.
             * @param delta The angle to rotate by, in radians.
             * @returns This Vector2.
             */
            rotate(delta: number): Phaser.Math.Vector2;

            /**
             * Project this Vector onto another.
             * @param src The vector to project onto.
             * @returns This Vector2.
             */
            project(src: Phaser.Math.Vector2): Phaser.Math.Vector2;

            /**
             * Calculates the vector projection of this Vector2 onto the non-zero `vecB`. This is the
             * orthogonal projection of this vector onto a straight line parallel to `vecB`.
             * @param vecB The vector to project onto.
             * @param out The Vector2 object to store the position in. If not given, a new Vector2 instance is created.
             * @returns The `out` Vector2 containing the projected values.
             */
            projectUnit(vecB: Phaser.Math.Vector2, out?: Phaser.Math.Vector2): Phaser.Math.Vector2;

            /**
             * A static zero Vector2 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly ZERO: Phaser.Math.Vector2;

            /**
             * A static right Vector2 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly RIGHT: Phaser.Math.Vector2;

            /**
             * A static left Vector2 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly LEFT: Phaser.Math.Vector2;

            /**
             * A static up Vector2 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly UP: Phaser.Math.Vector2;

            /**
             * A static down Vector2 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly DOWN: Phaser.Math.Vector2;

            /**
             * A static one Vector2 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly ONE: Phaser.Math.Vector2;

        }

        /**
         * A Vector3 is a mathematical object representing a point or direction in 3D space,
         * defined by three components: `x`, `y`, and `z`.
         * 
         * Vector3 objects are used throughout Phaser's 3D math utilities, including matrix
         * transformations, quaternion rotations, camera unprojection, and 3D-to-2D projection.
         * They are commonly used when working with 3D renderers, custom shaders, or any code
         * that needs to represent positions, directions, or normals in three-dimensional space.
         * 
         * The class includes methods for common vector operations such as addition, subtraction,
         * scaling, normalization, dot and cross products, linear interpolation, and transformation
         * by Matrix3, Matrix4, and Quaternion objects.
         * 
         * A set of static read-only constants (e.g. `Vector3.UP`, `Vector3.FORWARD`) are provided
         * for convenient directional references.
         */
        class Vector3 {
            /**
             * 
             * @param x The x component.
             * @param y The y component.
             * @param z The z component.
             */
            constructor(x?: number, y?: number, z?: number);

            /**
             * The x component of this Vector.
             */
            x: number;

            /**
             * The y component of this Vector.
             */
            y: number;

            /**
             * The z component of this Vector.
             */
            z: number;

            /**
             * Set this Vector to point up.
             * 
             * Sets the y component of the vector to 1, and the others to 0.undefined
             * @returns This Vector3.
             */
            up(): Phaser.Math.Vector3;

            /**
             * Sets the components of this Vector to be the `Math.min` result from the given vector.
             * @param v The Vector3 to check the minimum values against.
             * @returns This Vector3.
             */
            min(v: Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Sets the components of this Vector to be the `Math.max` result from the given vector.
             * @param v The Vector3 to check the maximum values against.
             * @returns This Vector3.
             */
            max(v: Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Make a clone of this Vector3.undefined
             * @returns A new Vector3 object containing this Vector's values.
             */
            clone(): Phaser.Math.Vector3;

            /**
             * Adds the two given Vector3s and sets the results into this Vector3.
             * @param a The first Vector to add.
             * @param b The second Vector to add.
             * @returns This Vector3.
             */
            addVectors(a: Phaser.Math.Vector3, b: Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Subtracts the two given Vector3s and sets the results into this Vector3.
             * @param a The Vector to subtract from.
             * @param b The Vector to subtract.
             * @returns This Vector3.
             */
            subVectors(a: Phaser.Math.Vector3, b: Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Calculate the cross (vector) product of two given Vectors.
             * @param a The first Vector to use in the cross product calculation.
             * @param b The second Vector to use in the cross product calculation.
             * @returns This Vector3.
             */
            crossVectors(a: Phaser.Math.Vector3, b: Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Check whether this Vector is equal to a given Vector.
             * 
             * Performs a strict equality check against each Vector's components.
             * @param v The Vector3 to compare against.
             * @returns True if the two vectors strictly match, otherwise false.
             */
            equals(v: Phaser.Math.Vector3): boolean;

            /**
             * Copy the components of a given Vector into this Vector.
             * @param src The Vector to copy the components from.
             * @returns This Vector3.
             */
            copy(src: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.
             * @param x The x value to set for this Vector, or an object containing x, y and z components.
             * @param y The y value to set for this Vector.
             * @param z The z value to set for this Vector.
             * @returns This Vector3.
             */
            set(x: number | object, y?: number, z?: number): Phaser.Math.Vector3;

            /**
             * Sets the components of this Vector3 from the position of the given Matrix4.
             * @param mat4 The Matrix4 to get the position from.
             * @returns This Vector3.
             */
            setFromMatrixPosition(mat4: Phaser.Math.Matrix4): Phaser.Math.Vector3;

            /**
             * Sets the components of this Vector3 from the Matrix4 column specified.
             * @param mat4 The Matrix4 to get the column from.
             * @param index The column index.
             * @returns This Vector3.
             */
            setFromMatrixColumn(mat4: Phaser.Math.Matrix4, index: number): Phaser.Math.Vector3;

            /**
             * Sets the components of this Vector3 from the given array, based on the offset.
             * 
             * Vector3.x = array[offset]
             * Vector3.y = array[offset + 1]
             * Vector3.z = array[offset + 2]
             * @param array The array of values to get this Vector from.
             * @param offset The offset index into the array. Default 0.
             * @returns This Vector3.
             */
            fromArray(array: number[], offset?: number): Phaser.Math.Vector3;

            /**
             * Add a given Vector to this Vector. Addition is component-wise.
             * @param v The Vector to add to this Vector.
             * @returns This Vector3.
             */
            add(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Add the given value to each component of this Vector.
             * @param s The amount to add to this Vector.
             * @returns This Vector3.
             */
            addScalar(s: number): Phaser.Math.Vector3;

            /**
             * Add and scale a given Vector to this Vector. Addition is component-wise.
             * @param v The Vector to add to this Vector.
             * @param scale The amount to scale `v` by.
             * @returns This Vector3.
             */
            addScale(v: Phaser.Math.Vector2 | Phaser.Math.Vector3, scale: number): Phaser.Math.Vector3;

            /**
             * Subtract the given Vector from this Vector. Subtraction is component-wise.
             * @param v The Vector to subtract from this Vector.
             * @returns This Vector3.
             */
            subtract(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Perform a component-wise multiplication between this Vector and the given Vector.
             * 
             * Multiplies this Vector by the given Vector.
             * @param v The Vector to multiply this Vector by.
             * @returns This Vector3.
             */
            multiply(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Scale this Vector by the given value.
             * @param scale The value to scale this Vector by.
             * @returns This Vector3.
             */
            scale(scale: number): Phaser.Math.Vector3;

            /**
             * Perform a component-wise division between this Vector and the given Vector.
             * 
             * Divides this Vector by the given Vector.
             * @param v The Vector to divide this Vector by.
             * @returns This Vector3.
             */
            divide(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Negate the `x`, `y` and `z` components of this Vector.undefined
             * @returns This Vector3.
             */
            negate(): Phaser.Math.Vector3;

            /**
             * Calculate the distance between this Vector and the given Vector.
             * @param v The Vector to calculate the distance to.
             * @returns The distance from this Vector to the given Vector.
             */
            distance(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): number;

            /**
             * Calculate the distance between this Vector and the given Vector, squared.
             * @param v The Vector to calculate the distance to.
             * @returns The distance from this Vector to the given Vector, squared.
             */
            distanceSq(v: Phaser.Math.Vector2 | Phaser.Math.Vector3): number;

            /**
             * Calculate the length (or magnitude) of this Vector.undefined
             * @returns The length of this Vector.
             */
            length(): number;

            /**
             * Calculate the length of this Vector squared.undefined
             * @returns The length of this Vector, squared.
             */
            lengthSq(): number;

            /**
             * Normalize this Vector.
             * 
             * Makes the vector a unit length vector (magnitude of 1) in the same direction.undefined
             * @returns This Vector3.
             */
            normalize(): Phaser.Math.Vector3;

            /**
             * Calculate the dot product of this Vector and the given Vector.
             * @param v The Vector3 to dot product with this Vector3.
             * @returns The dot product of this Vector and `v`.
             */
            dot(v: Phaser.Math.Vector3): number;

            /**
             * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.
             * @param v The Vector to cross product with.
             * @returns This Vector3.
             */
            cross(v: Phaser.Math.Vector3): Phaser.Math.Vector3;

            /**
             * Linearly interpolate between this Vector and the given Vector.
             * 
             * Interpolates this Vector towards the given Vector.
             * @param v The Vector3 to interpolate towards.
             * @param t The interpolation factor, between 0 and 1. Default 0.
             * @returns This Vector3.
             */
            lerp(v: Phaser.Math.Vector3, t?: number): Phaser.Math.Vector3;

            /**
             * Takes a Matrix3 and applies it to this Vector3.
             * @param mat3 The Matrix3 to apply to this Vector3.
             * @returns This Vector3.
             */
            applyMatrix3(mat3: Phaser.Math.Matrix3): Phaser.Math.Vector3;

            /**
             * Takes a Matrix4 and applies it to this Vector3.
             * @param mat4 The Matrix4 to apply to this Vector3.
             * @returns This Vector3.
             */
            applyMatrix4(mat4: Phaser.Math.Matrix4): Phaser.Math.Vector3;

            /**
             * Transform this Vector with the given Matrix.
             * @param mat The Matrix3 to transform this Vector3 with.
             * @returns This Vector3.
             */
            transformMat3(mat: Phaser.Math.Matrix3): Phaser.Math.Vector3;

            /**
             * Transform this Vector with the given Matrix4.
             * @param mat The Matrix4 to transform this Vector3 with.
             * @returns This Vector3.
             */
            transformMat4(mat: Phaser.Math.Matrix4): Phaser.Math.Vector3;

            /**
             * Transforms the coordinates of this Vector3 with the given Matrix4.
             * @param mat The Matrix4 to transform this Vector3 with.
             * @returns This Vector3.
             */
            transformCoordinates(mat: Phaser.Math.Matrix4): Phaser.Math.Vector3;

            /**
             * Transform this Vector with the given Quaternion.
             * @param q The Quaternion to transform this Vector with.
             * @returns This Vector3.
             */
            transformQuat(q: Phaser.Math.Quaternion): Phaser.Math.Vector3;

            /**
             * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,
             * e.g. unprojecting a 2D point into 3D space.
             * @param mat The Matrix4 to multiply this Vector3 with.
             * @returns This Vector3.
             */
            project(mat: Phaser.Math.Matrix4): Phaser.Math.Vector3;

            /**
             * Multiplies this Vector3 by the given view and projection matrices.
             * @param viewMatrix A View Matrix.
             * @param projectionMatrix A Projection Matrix.
             * @returns This Vector3.
             */
            projectViewMatrix(viewMatrix: Phaser.Math.Matrix4, projectionMatrix: Phaser.Math.Matrix4): Phaser.Math.Vector3;

            /**
             * Multiplies this Vector3 by the given inversed projection matrix and world matrix.
             * @param projectionMatrix An inversed Projection Matrix.
             * @param worldMatrix A World View Matrix.
             * @returns This Vector3.
             */
            unprojectViewMatrix(projectionMatrix: Phaser.Math.Matrix4, worldMatrix: Phaser.Math.Matrix4): Phaser.Math.Vector3;

            /**
             * Unproject this point from 2D space to 3D space.
             * The point should have its x and y properties set to
             * 2D screen space, and the z either at 0 (near plane)
             * or 1 (far plane). The provided matrix is assumed to already
             * be combined, i.e. projection * view * model.
             * 
             * After this operation, this vector's (x, y, z) components will
             * represent the unprojected 3D coordinate.
             * @param viewport Screen x, y, width and height in pixels.
             * @param invProjectionView Combined projection and view matrix.
             * @returns This Vector3.
             */
            unproject(viewport: Phaser.Math.Vector4, invProjectionView: Phaser.Math.Matrix4): Phaser.Math.Vector3;

            /**
             * Make this Vector the zero vector (0, 0, 0).undefined
             * @returns This Vector3.
             */
            reset(): Phaser.Math.Vector3;

            /**
             * A static zero Vector3 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly ZERO: Phaser.Math.Vector3;

            /**
             * A static right Vector3 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly RIGHT: Phaser.Math.Vector3;

            /**
             * A static left Vector3 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly LEFT: Phaser.Math.Vector3;

            /**
             * A static up Vector3 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly UP: Phaser.Math.Vector3;

            /**
             * A static down Vector3 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly DOWN: Phaser.Math.Vector3;

            /**
             * A static forward Vector3 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly FORWARD: Phaser.Math.Vector3;

            /**
             * A static back Vector3 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly BACK: Phaser.Math.Vector3;

            /**
             * A static one Vector3 for use by reference.
             * 
             * This constant is meant for comparison operations and should not be modified directly.
             */
            static readonly ONE: Phaser.Math.Vector3;

        }

        /**
         * A four-component vector (x, y, z, w) for use in 3D mathematics and transformations.
         * 
         * Vector4 is commonly used to represent homogeneous coordinates in 3D space, where the
         * `w` component acts as a scaling factor, making it compatible with 4x4 matrix multiplication
         * via `Matrix4`. It is also used to represent RGBA color values, quaternion components, and
         * any other quantity that requires four independent scalar values. The class supports the
         * standard vector operations you would expect: addition, subtraction, scaling, normalization,
         * dot product, linear interpolation, and transformation by both `Matrix4` and `Quaternion` objects.
         */
        class Vector4 {
            /**
             * 
             * @param x The x component.
             * @param y The y component.
             * @param z The z component.
             * @param w The w component.
             */
            constructor(x?: number, y?: number, z?: number, w?: number);

            /**
             * The x component of this Vector.
             */
            x: number;

            /**
             * The y component of this Vector.
             */
            y: number;

            /**
             * The z component of this Vector.
             */
            z: number;

            /**
             * The w component of this Vector.
             */
            w: number;

            /**
             * Make a clone of this Vector4.undefined
             * @returns A clone of this Vector4.
             */
            clone(): Phaser.Math.Vector4;

            /**
             * Copy the components of a given Vector into this Vector.
             * @param src The Vector to copy the components from.
             * @returns This Vector4.
             */
            copy(src: Phaser.Math.Vector4): Phaser.Math.Vector4;

            /**
             * Check whether this Vector is equal to a given Vector.
             * 
             * Performs a strict equality check against each Vector's components.
             * @param v The vector to check equality with.
             * @returns A boolean indicating whether the two Vectors are equal or not.
             */
            equals(v: Phaser.Math.Vector4): boolean;

            /**
             * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.
             * @param x The x value to set for this Vector, or an object containing x, y, z and w components.
             * @param y The y value to set for this Vector.
             * @param z The z value to set for this Vector.
             * @param w The w value to set for this Vector.
             * @returns This Vector4.
             */
            set(x: number | object, y: number, z: number, w: number): Phaser.Math.Vector4;

            /**
             * Add a given Vector to this Vector. Addition is component-wise.
             * @param v The Vector to add to this Vector.
             * @returns This Vector4.
             */
            add(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Vector4;

            /**
             * Subtract the given Vector from this Vector. Subtraction is component-wise.
             * @param v The Vector to subtract from this Vector.
             * @returns This Vector4.
             */
            subtract(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Vector4;

            /**
             * Scale this Vector by the given value.
             * @param scale The value to scale this Vector by.
             * @returns This Vector4.
             */
            scale(scale: number): Phaser.Math.Vector4;

            /**
             * Calculate the length (or magnitude) of this Vector.undefined
             * @returns The length of this Vector.
             */
            length(): number;

            /**
             * Calculate the length of this Vector squared.undefined
             * @returns The length of this Vector, squared.
             */
            lengthSq(): number;

            /**
             * Normalize this Vector.
             * 
             * Makes the vector a unit length vector (magnitude of 1) in the same direction.undefined
             * @returns This Vector4.
             */
            normalize(): Phaser.Math.Vector4;

            /**
             * Calculate the dot product of this Vector and the given Vector.
             * @param v The Vector4 to dot product with this Vector4.
             * @returns The dot product of this Vector and the given Vector.
             */
            dot(v: Phaser.Math.Vector4): number;

            /**
             * Linearly interpolate between this Vector and the given Vector.
             * 
             * Interpolates this Vector towards the given Vector.
             * @param v The Vector4 to interpolate towards.
             * @param t The interpolation percentage, between 0 and 1. Default 0.
             * @returns This Vector4.
             */
            lerp(v: Phaser.Math.Vector4, t?: number): Phaser.Math.Vector4;

            /**
             * Perform a component-wise multiplication between this Vector and the given Vector.
             * 
             * Multiplies this Vector by the given Vector.
             * @param v The Vector to multiply this Vector by.
             * @returns This Vector4.
             */
            multiply(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Vector4;

            /**
             * Perform a component-wise division between this Vector and the given Vector.
             * 
             * Divides this Vector by the given Vector.
             * @param v The Vector to divide this Vector by.
             * @returns This Vector4.
             */
            divide(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): Phaser.Math.Vector4;

            /**
             * Calculate the distance between this Vector and the given Vector.
             * @param v The Vector to calculate the distance to.
             * @returns The distance from this Vector to the given Vector.
             */
            distance(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): number;

            /**
             * Calculate the distance between this Vector and the given Vector, squared.
             * @param v The Vector to calculate the distance to.
             * @returns The distance from this Vector to the given Vector, squared.
             */
            distanceSq(v: Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4): number;

            /**
             * Negate the `x`, `y`, `z` and `w` components of this Vector.undefined
             * @returns This Vector4.
             */
            negate(): Phaser.Math.Vector4;

            /**
             * Transform this Vector with the given Matrix.
             * @param mat The Matrix4 to transform this Vector4 with.
             * @returns This Vector4.
             */
            transformMat4(mat: Phaser.Math.Matrix4): Phaser.Math.Vector4;

            /**
             * Transform this Vector with the given Quaternion.
             * @param q The Quaternion to transform this Vector with.
             * @returns This Vector4.
             */
            transformQuat(q: Phaser.Math.Quaternion): Phaser.Math.Vector4;

            /**
             * Make this Vector the zero vector (0, 0, 0, 0).undefined
             * @returns This Vector4.
             */
            reset(): Phaser.Math.Vector4;

        }

        /**
         * Checks if the two values are within the given `tolerance` of each other.
         * @param a The first value to use in the calculation.
         * @param b The second value to use in the calculation.
         * @param tolerance The tolerance. Anything equal to or less than this value is considered as being within range.
         * @returns Returns `true` if the absolute difference between `a` and `b` is less than or equal to `tolerance`.
         */
        function Within(a: number, b: number, tolerance: number): boolean;

        /**
         * Wrap the given `value` between `min` (inclusive) and `max` (exclusive).
         * 
         * When the value exceeds `max` it wraps back around to `min`, and when it falls
         * below `min` it wraps around to just below `max`. This is useful for cycling
         * through a range, such as keeping an angle within 0–360 degrees or looping a
         * tile index within a tileset.
         * @param value The value to wrap.
         * @param min The minimum bound of the range (inclusive).
         * @param max The maximum bound of the range (exclusive).
         * @returns The wrapped value, guaranteed to be within `[min, max)`.
         */
        function Wrap(value: number, min: number, max: number): number;

        namespace Angle {
            /**
             * Find the angle of a segment from (x1, y1) -> (x2, y2).
             * @param x1 The x coordinate of the first point.
             * @param y1 The y coordinate of the first point.
             * @param x2 The x coordinate of the second point.
             * @param y2 The y coordinate of the second point.
             * @returns The angle in radians.
             */
            function Between(x1: number, y1: number, x2: number, y2: number): number;

            /**
             * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).
             * 
             * Calculates the angle of the vector from the first point to the second point.
             * @param point1 The first point.
             * @param point2 The second point.
             * @returns The angle in radians.
             */
            function BetweenPoints(point1: Phaser.Types.Math.Vector2Like, point2: Phaser.Types.Math.Vector2Like): number;

            /**
             * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).
             * 
             * Unlike {@link Phaser.Math.Angle.BetweenPoints}, this function measures the angle from the positive Y axis (pointing
             * downward in screen space) rather than the positive X axis. This means an angle of 0 radians points straight down
             * the screen, making it useful for game objects whose default facing direction is upward (i.e. toward decreasing y).
             * @param point1 The first point.
             * @param point2 The second point.
             * @returns The angle in radians.
             */
            function BetweenPointsY(point1: Phaser.Types.Math.Vector2Like, point2: Phaser.Types.Math.Vector2Like): number;

            /**
             * Find the angle of a segment from (x1, y1) -> (x2, y2).
             * 
             * The difference between this method and {@link Phaser.Math.Angle.Between} is that it measures the angle from
             * the Y axis rather than the X axis. This means a result of zero indicates the segment points straight down (along
             * the positive Y axis), making it suitable for use with sprites that face upward by default.
             * @param x1 The x coordinate of the first point.
             * @param y1 The y coordinate of the first point.
             * @param x2 The x coordinate of the second point.
             * @param y2 The y coordinate of the second point.
             * @returns The angle in radians.
             */
            function BetweenY(x1: number, y1: number, x2: number, y2: number): number;

            /**
             * Takes an angle in Phaser's default clockwise format and converts it so that
             * 0 is North, 90 is West, 180 is South and 270 is East,
             * therefore running counter-clockwise instead of clockwise.
             * 
             * You can pass in the angle from a Game Object using:
             * 
             * ```javascript
             * var converted = CounterClockwise(gameobject.rotation);
             * ```
             * 
             * All values for this function are in radians.
             * @param angle The angle to convert, in radians.
             * @returns The converted angle, in radians.
             */
            function CounterClockwise(angle: number): number;

            /**
             * Gets the clockwise (nonnegative) angular distance from angle1 to angle2.
             * @param angle1 The starting angle in radians.
             * @param angle2 The target angle in radians.
             * @returns The distance in radians, in the range [0, 2pi).
             */
            function GetClockwiseDistance(angle1: number, angle2: number): number;

            /**
             * Returns the counter-clockwise angular distance from `angle1` to `angle2`, expressed as a
             * non-positive value in radians. Counter-clockwise rotation is represented as negative, so the
             * result is always in the range (-2π, 0]. A result of 0 means the angles are equal or differ
             * by a full rotation. Use this when you need to measure how far to rotate counter-clockwise to
             * reach a target angle.
             * @param angle1 The starting angle in radians.
             * @param angle2 The target angle in radians.
             * @returns The counter-clockwise distance in radians, in the range (-2π, 0].
             */
            function GetCounterClockwiseDistance(angle1: number, angle2: number): number;

            /**
             * Gets the shortest signed angular distance from angle1 to angle2.
             * A positive distance is a clockwise rotation.
             * A negative distance is a counter-clockwise rotation.
             * 
             * For calculation in degrees use {@link Phaser.Math.Angle.ShortestBetween} instead.
             * @param angle1 The first angle in radians.
             * @param angle2 The second angle in radians.
             * @returns The distance in radians, in the range [-pi, pi).
             */
            function GetShortestDistance(angle1: number, angle2: number): number;

            /**
             * Normalize an angle to the [0, 2pi] range.
             * @param angle The angle to normalize, in radians.
             * @returns The normalized angle, in radians.
             */
            function Normalize(angle: number): number;

            /**
             * Returns a random angle in the range [-pi, pi].undefined
             * @returns The angle, in radians.
             */
            function Random(): number;

            /**
             * Returns a random angle in the range [-180, 180].undefined
             * @returns The angle, in degrees.
             */
            function RandomDegrees(): number;

            /**
             * Reverses the given angle by adding π radians (180 degrees) to it, then normalizing
             * the result to the range of [0, 2π). This returns the angle pointing in the exact
             * opposite direction to the one provided.
             * @param angle The angle to reverse, in radians.
             * @returns The reversed angle, in radians.
             */
            function Reverse(angle: number): number;

            /**
             * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.
             * @param currentAngle The current angle, in radians.
             * @param targetAngle The target angle to rotate to, in radians.
             * @param lerp The step size, in radians, to rotate by in this call. The angle will be rotated by this amount towards the target, either added or subtracted depending on the shortest rotation direction. Default 0.05.
             * @returns The adjusted angle.
             */
            function RotateTo(currentAngle: number, targetAngle: number, lerp?: number): number;

            /**
             * Gets the shortest angle between `angle1` and `angle2`.
             * 
             * Both angles must be in the range -180 to 180, which is the same clamped
             * range that `sprite.angle` uses, so you can pass in two sprite angles to
             * this method and get the shortest angle back between the two of them.
             * 
             * The angle returned will be in the same range. If the returned angle is
             * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's
             * a clockwise rotation.
             * 
             * For calculation in radians use {@link Phaser.Math.Angle.GetShortestDistance} instead.
             * @param angle1 The first angle in the range -180 to 180.
             * @param angle2 The second angle in the range -180 to 180.
             * @returns The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.
             */
            function ShortestBetween(angle1: number, angle2: number): number;

            /**
             * Wrap an angle.
             * 
             * Wraps the angle to a value in the range of -PI to PI.
             * @param angle The angle to wrap, in radians.
             * @returns The wrapped angle, in radians.
             */
            function Wrap(angle: number): number;

            /**
             * Wrap an angle in degrees.
             * 
             * Wraps the angle to a value in the range of -180 to 180.
             * @param angle The angle to wrap, in degrees.
             * @returns The wrapped angle, in degrees.
             */
            function WrapDegrees(angle: number): number;

        }

        /**
         * The value of PI * 2, representing a full circle (360 degrees) in radians.
         */
        var TAU: number;

        /**
         * The value of PI / 2, or 90 degrees, in radians.
         */
        var PI_OVER_2: number;

        /**
         * A small epsilon value (1.0e-6) used for floating-point comparisons and near-zero checks to avoid precision errors.
         */
        var EPSILON: number;

        /**
         * Conversion factor for degrees to radians (PI / 180). Multiply a degree value by this constant to obtain its equivalent in radians.
         */
        var DEG_TO_RAD: number;

        /**
         * Conversion factor for radians to degrees (180 / PI). Multiply a radian value by this constant to obtain its equivalent in degrees.
         */
        var RAD_TO_DEG: number;

        /**
         * An instance of the Random Number Generator.
         * This is not set until the Game boots.
         */
        var RND: Phaser.Math.RandomDataGenerator;

        /**
         * The minimum safe integer this browser supports.
         * We use a const for backward compatibility with older browsers.
         */
        var MIN_SAFE_INTEGER: number;

        /**
         * The maximum safe integer this browser supports.
         * We use a const for backward compatibility with older browsers.
         */
        var MAX_SAFE_INTEGER: number;

        namespace Distance {
            /**
             * Calculate the distance between two sets of coordinates (points).
             * @param x1 The x coordinate of the first point.
             * @param y1 The y coordinate of the first point.
             * @param x2 The x coordinate of the second point.
             * @param y2 The y coordinate of the second point.
             * @returns The distance between each point.
             */
            function Between(x1: number, y1: number, x2: number, y2: number): number;

            /**
             * Calculate the distance between two points.
             * @param a The first point.
             * @param b The second point.
             * @returns The distance between the points.
             */
            function BetweenPoints(a: Phaser.Types.Math.Vector2Like, b: Phaser.Types.Math.Vector2Like): number;

            /**
             * Calculate the squared distance between two points.
             * @param a The first point.
             * @param b The second point.
             * @returns The squared distance between the points.
             */
            function BetweenPointsSquared(a: Phaser.Types.Math.Vector2Like, b: Phaser.Types.Math.Vector2Like): number;

            /**
             * Calculate the Chebyshev distance between two sets of coordinates (points).
             * 
             * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.
             * It's the effective distance when movement can be horizontal, vertical, or diagonal.
             * @param x1 The x coordinate of the first point.
             * @param y1 The y coordinate of the first point.
             * @param x2 The x coordinate of the second point.
             * @param y2 The y coordinate of the second point.
             * @returns The distance between each point.
             */
            function Chebyshev(x1: number, y1: number, x2: number, y2: number): number;

            /**
             * Calculate the distance between two sets of coordinates using the generalized power formula:
             * `sqrt((x2 - x1)^pow + (y2 - y1)^pow)`. When `pow` is `2` this is equivalent to standard
             * Euclidean distance. Increasing `pow` emphasizes larger axis differences.
             * @param x1 The x coordinate of the first point.
             * @param y1 The y coordinate of the first point.
             * @param x2 The x coordinate of the second point.
             * @param y2 The y coordinate of the second point.
             * @param pow The exponent applied to each axis difference. Defaults to `2`, which gives standard Euclidean distance. Default 2.
             * @returns The distance between the two points.
             */
            function Power(x1: number, y1: number, x2: number, y2: number, pow?: number): number;

            /**
             * Calculate the snake distance between two sets of coordinates (points).
             * 
             * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.
             * It's the effective distance when movement is allowed only horizontally or vertically (but not both).
             * @param x1 The x coordinate of the first point.
             * @param y1 The y coordinate of the first point.
             * @param x2 The x coordinate of the second point.
             * @param y2 The y coordinate of the second point.
             * @returns The distance between each point.
             */
            function Snake(x1: number, y1: number, x2: number, y2: number): number;

            /**
             * Calculate the distance between two sets of coordinates (points), squared.
             * @param x1 The x coordinate of the first point.
             * @param y1 The y coordinate of the first point.
             * @param x2 The x coordinate of the second point.
             * @param y2 The y coordinate of the second point.
             * @returns The distance between each point, squared.
             */
            function Squared(x1: number, y1: number, x2: number, y2: number): number;

        }

        namespace Easing {
            namespace Back {
                /**
                 * Back ease-in. This easing function starts the tween by briefly pulling back in the
                 * opposite direction before moving forward, creating an anticipation effect at the
                 * beginning of the transition. The higher the `overshoot` value, the further back the
                 * value pulls before proceeding.
                 * @param v The normalized time value to ease, between 0 and 1.
                 * @param overshoot The overshoot amount. Controls how far back the value pulls before moving forward. Higher values produce a more pronounced pullback effect. Default 1.70158.
                 * @returns The eased value.
                 */
                function In(v: number, overshoot?: number): number;

                /**
                 * Back ease-in/out. This easing function applies a back effect to both the
                 * start and end of the tween: the value initially pulls back slightly before
                 * accelerating forward, then overshoots the target before snapping back to
                 * rest, producing a symmetrical spring-like motion. Use this when you want a
                 * lively, bouncy feel at both ends of an animation.
                 * @param v The value to be eased.
                 * @param overshoot Controls the magnitude of the pull-back and overshoot. Higher values produce a more pronounced effect. The default produces approximately 10% overshoot at each end. Default 1.70158.
                 * @returns The eased value.
                 */
                function InOut(v: number, overshoot?: number): number;

                /**
                 * Back ease-out. The tween moves quickly at first, then overshoots its final
                 * value before settling back to the target. The overshoot occurs at the end of
                 * the transition, giving a slight 'bounce past and return' effect.
                 * @param v The value to be eased, typically in the range [0, 1].
                 * @param overshoot The overshoot amount. Higher values produce a more pronounced overshoot. Default 1.70158.
                 * @returns The eased value.
                 */
                function Out(v: number, overshoot?: number): number;

            }

            namespace Bounce {
                /**
                 * Applies a bounce easing to the start of the tween. The eased value will
                 * 'bounce' several times near the origin before accelerating toward the target,
                 * simulating the effect of a ball bouncing as it begins to move. This is the
                 * ease-in variant, meaning the bounce effect occurs at the beginning of the
                 * transition rather than the end.
                 * @param v The value to be eased, in the range 0 to 1.
                 * @returns The eased value, in the range 0 to 1.
                 */
                function In(v: number): number;

                /**
                 * Applies a Bounce ease-in/out effect to the given value. This combines both the ease-in and
                 * ease-out bounce effects, producing a bouncing animation at the start and end of the tween.
                 * The input value should be in the range 0 to 1, where 0 is the start and 1 is the end of the tween.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function InOut(v: number): number;

                /**
                 * Applies a bounce ease-out effect to the given value. The motion starts fast
                 * and decelerates toward the end with a bouncing effect, simulating a ball
                 * landing and bouncing to a stop. The bounce is achieved through four piecewise
                 * quadratic segments that produce three diminishing bounces before settling.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function Out(v: number): number;

            }

            namespace Circular {
                /**
                 * Applies a circular ease-in to the given value. This easing is based on the equation of a circle,
                 * producing a curve that starts very slowly and then accelerates sharply toward the end. It is the
                 * complement of `Circular.Out` and is commonly used for animations that need a hesitant start before
                 * snapping into motion.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function In(v: number): number;

                /**
                 * Circular ease-in/out. Applies a circular easing curve that starts slow, accelerates
                 * through the midpoint, then decelerates to a smooth stop. The shape of the curve is
                 * derived from the arc of a circle, producing a natural-feeling motion that is more
                 * gradual than a sine ease but sharper than a quadratic ease. Combining ease-in and
                 * ease-out makes the transition symmetrical: the first half eases in using a circular
                 * arc and the second half eases out using a mirrored arc.
                 * @param v The value to be eased, in the range [0, 1].
                 * @returns The eased value, in the range [0, 1].
                 */
                function InOut(v: number): number;

                /**
                 * Applies a circular ease-out effect to `v`, based on the equation of a unit circle.
                 * The motion starts at full speed and decelerates smoothly to a stop, following the
                 * curve of a quarter-circle. `v` should be in the range 0 to 1.
                 * @param v The value to be eased, in the range 0 to 1.
                 * @returns The eased value, in the range 0 to 1.
                 */
                function Out(v: number): number;

            }

            namespace Cubic {
                /**
                 * Cubic ease-in. Starts slowly and accelerates sharply, following a cubic curve (v³).
                 * This produces a gradual start that builds into a fast finish, making it well suited
                 * for animations where an object should appear to gather momentum from rest.
                 * @param v The value to be eased, typically in the range [0, 1].
                 * @returns The eased value, in the range [0, 1].
                 */
                function In(v: number): number;

                /**
                 * Cubic ease-in/out. Produces an S-curve that accelerates from zero, reaches
                 * maximum speed at the midpoint, then decelerates back to zero. The acceleration
                 * and deceleration both follow a cubic (t³) curve, giving a stronger ease than
                 * the quadratic equivalent. Typically used to animate values that should start
                 * and end smoothly while moving briskly through the middle of the transition.
                 * @param v The value to be eased, in the range [0, 1].
                 * @returns The eased value, in the range [0, 1].
                 */
                function InOut(v: number): number;

                /**
                 * Cubic ease-out.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function Out(v: number): number;

            }

            namespace Elastic {
                /**
                 * An elastic ease-in, where the value oscillates back and forth with a spring-like motion before
                 * accelerating toward the target. The effect begins with a series of small oscillations that
                 * grow in magnitude, simulating a stretched elastic band being released. Use this when you want
                 * a tween to feel springy or bouncy at its start before snapping into motion.
                 * @param v The value to be eased, between 0 and 1.
                 * @param amplitude The amplitude of the elastic oscillation. Values below 1 are clamped to 1. Higher values produce a wider oscillation arc. Default 0.1.
                 * @param period Controls how tight the sine-wave oscillation is. Smaller values produce tighter, more frequent cycles; larger values produce wider, slower oscillations. Default 0.1.
                 * @returns The eased value.
                 */
                function In(v: number, amplitude?: number, period?: number): number;

                /**
                 * An Elastic ease-in/out, combining both the ease-in and ease-out elastic effects.
                 * This easing function produces a spring-like oscillation at both the start and end
                 * of the tween, overshooting the target value before settling. It is useful for
                 * animations that need a bouncy, elastic feel at both ends of the transition.
                 * @param v The value to be eased, typically in the range [0, 1].
                 * @param amplitude The amplitude of the elastic oscillation. Values below 1 are clamped to 1. Default 0.1.
                 * @param period Controls how tight the sine-wave oscillation is. Smaller values produce tighter waves with more cycles. Default 0.1.
                 * @returns The eased value.
                 */
                function InOut(v: number, amplitude?: number, period?: number): number;

                /**
                 * An Elastic ease-out, where the value overshoots its target and oscillates with a decaying sine wave
                 * before settling at the final value. The elastic effect occurs at the end of the transition, making
                 * the motion appear to bounce or spring into place. Accepts a normalized input value `v` in the range 0 to 1.
                 * @param v The normalized value to be tweened, typically in the range [0, 1].
                 * @param amplitude The amplitude of the elastic overshoot. Values above 1 increase the size of the overshoot. Default 0.1.
                 * @param period Controls how tight the sine-wave oscillation is. Smaller values produce tighter waves with more rapid oscillations. Default 0.1.
                 * @returns The eased value.
                 */
                function Out(v: number, amplitude?: number, period?: number): number;

            }

            namespace Expo {
                /**
                 * Exponential ease-in.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function In(v: number): number;

                /**
                 * Exponential ease-in/out. Produces a curve that accelerates sharply from zero
                 * using an exponential curve in the first half, then decelerates symmetrically
                 * to a smooth stop. The result is a pronounced S-shaped curve that starts and
                 * ends slowly with a rapid transition through the midpoint. Useful for dramatic
                 * animations where a strong snap-in and snap-out effect is desired.
                 * @param v The value to be eased, in the range [0, 1].
                 * @returns The eased value, in the range [0, 1].
                 */
                function InOut(v: number): number;

                /**
                 * Exponential ease-out.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function Out(v: number): number;

            }

            /**
             * Linear easing (no variation).
             * @param v The value to be eased.
             * @returns The eased value.
             */
            function Linear(v: number): number;

            namespace Quadratic {
                /**
                 * Quadratic ease-in.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function In(v: number): number;

                /**
                 * Quadratic ease-in/out. Applies a quadratic curve that accelerates in the first half
                 * of the range and decelerates in the second half, producing a smooth S-curve transition.
                 * Useful for animations that need to start gently, move briskly through the middle, and
                 * settle smoothly at the end.
                 * @param v The value to be eased, in the range [0, 1].
                 * @returns The eased value, in the range [0, 1].
                 */
                function InOut(v: number): number;

                /**
                 * Quadratic ease-out.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function Out(v: number): number;

            }

            namespace Quartic {
                /**
                 * Quartic ease-in.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function In(v: number): number;

                /**
                 * Quartic ease-in/out. Applies a quartic (fourth-power) curve that accelerates
                 * sharply from the start, then decelerates sharply into the end. The motion
                 * is symmetric: the first half mirrors the ease-in, and the second half mirrors
                 * the ease-out. This produces a more dramatic acceleration and deceleration than
                 * quadratic or cubic easing, making it suitable for snappy, high-energy transitions.
                 * @param v The value to be eased, in the range [0, 1].
                 * @returns The eased value, in the range [0, 1].
                 */
                function InOut(v: number): number;

                /**
                 * Quartic ease-out.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function Out(v: number): number;

            }

            namespace Quintic {
                /**
                 * Applies a quintic ease-in curve to the given value. The value starts changing
                 * very slowly and accelerates sharply toward the end, following a fifth-power (v^5)
                 * curve. This produces a more pronounced acceleration effect than cubic or quartic
                 * ease-in functions, making it suitable for animations that need to start with
                 * near-zero velocity and build up to full speed very rapidly.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function In(v: number): number;

                /**
                 * Applies a Quintic ease-in/out function to the given value. The motion begins slowly,
                 * accelerates sharply through the midpoint, then decelerates back to a slow stop. The
                 * quintic curve (raised to the 5th power) produces a more dramatic acceleration and
                 * deceleration compared to cubic or quartic easings, making it well suited for animations
                 * that require a strong, punchy feel with smooth start and end transitions.
                 * @param v The value to be eased, in the range [0, 1].
                 * @returns The eased value, in the range [0, 1].
                 */
                function InOut(v: number): number;

                /**
                 * Quintic ease-out.
                 * @param v The value to be eased.
                 * @returns The eased value.
                 */
                function Out(v: number): number;

            }

            namespace Sine {
                /**
                 * Applies a sinusoidal ease-in curve to the given value. The motion starts slowly
                 * and accelerates toward the end, following the shape of a sine wave. This produces
                 * a gentler start than most other ease-in functions, making it well suited for subtle
                 * animations such as fading in UI elements or smoothly beginning a camera pan.
                 * 
                 * The input value `v` should be in the range 0 to 1, where 0 represents the start
                 * and 1 the end of the tween. Values outside this range are not clamped.
                 * @param v The value to be eased, typically in the range 0 to 1.
                 * @returns The eased value, in the range 0 to 1.
                 */
                function In(v: number): number;

                /**
                 * Applies a sinusoidal ease-in/out to the given value. The motion starts slowly,
                 * accelerates through the midpoint, and decelerates back to a stop at the end,
                 * producing a smooth S-curve transition. This is useful for animations that
                 * need a natural, symmetrical feel with gentle starts and endings.
                 * @param v The value to be eased, in the range [0, 1].
                 * @returns The eased value, in the range [0, 1].
                 */
                function InOut(v: number): number;

                /**
                 * Sinusoidal ease-out. Begins moving quickly and decelerates to a gentle stop,
                 * following the curve of a sine wave. Commonly used for smooth deceleration in
                 * animations and Tweens.
                 * @param v The value to be eased, in the range [0, 1].
                 * @returns The eased value, in the range [0, 1].
                 */
                function Out(v: number): number;

            }

            /**
             * A stepped easing function that quantizes the input value into a discrete number of evenly-spaced
             * steps, creating a staircase progression rather than a smooth curve. The output jumps instantly
             * between step values instead of interpolating, which is useful for frame-by-frame animations,
             * grid-snapped movement, or any effect that should advance in distinct increments.
             * @param v The value to be eased.
             * @param steps The number of steps in the ease. Default 1.
             * @returns The eased value.
             */
            function Stepped(v: number, steps?: number): number;

            namespace Stepped {
            }

        }

        namespace Fuzzy {
            /**
             * Calculate the fuzzy ceiling of the given value.
             * 
             * Rounds the value up to the nearest integer, but subtracts a small epsilon tolerance
             * before applying `Math.ceil`. This means that values very slightly above an integer
             * boundary (within the epsilon range) are treated as if they were exactly on that
             * boundary, avoiding floating-point precision errors that would otherwise push the
             * result up to the next integer unexpectedly.
             * @param value The value to compute the fuzzy ceiling of.
             * @param epsilon The epsilon tolerance used to reduce floating-point precision errors. Default 0.0001.
             * @returns The fuzzy ceiling of the value.
             */
            function Ceil(value: number, epsilon?: number): number;

            /**
             * Check whether the given values are fuzzily equal.
             * 
             * Two numbers are fuzzily equal if their difference is less than `epsilon`.
             * @param a The first value.
             * @param b The second value.
             * @param epsilon The maximum absolute difference below which the two values are considered equal. Default 0.0001.
             * @returns `true` if the values are fuzzily equal, otherwise `false`.
             */
            function Equal(a: number, b: number, epsilon?: number): boolean;

            /**
             * Calculates the fuzzy floor of the given value by adding a small epsilon before
             * flooring. This avoids floating-point precision issues where a value that should
             * mathematically be an integer (e.g. 2.9999999) floors incorrectly to the integer below.
             * Any value within epsilon of the next integer up will be floored to that integer.
             * @param value The value to calculate the fuzzy floor of.
             * @param epsilon The epsilon value. Values within this distance of the next integer up are floored to that integer. Default 0.0001.
             * @returns The fuzzy floor of the given value.
             */
            function Floor(value: number, epsilon?: number): number;

            /**
             * Check whether `a` is fuzzily greater than `b`.
             * 
             * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.
             * @param a The first value.
             * @param b The second value.
             * @param epsilon The epsilon value used to control the degree of fuzziness. A larger value makes the comparison more lenient. Default 0.0001.
             * @returns `true` if `a` is fuzzily greater than `b`, otherwise `false`.
             */
            function GreaterThan(a: number, b: number, epsilon?: number): boolean;

            /**
             * Check whether `a` is fuzzily less than `b`.
             * 
             * `a` is fuzzily less than `b` if it is less than `b + epsilon`.
             * @param a The first value.
             * @param b The second value.
             * @param epsilon The tolerance value used for the fuzzy comparison. Values within this distance are considered equal. Default 0.0001.
             * @returns `true` if `a` is fuzzily less than `b`, otherwise `false`.
             */
            function LessThan(a: number, b: number, epsilon?: number): boolean;

        }

        namespace Interpolation {
            /**
             * Performs a generalized Bezier interpolation over an arbitrary number of control points.
             * The `v` array provides the control point values and `k` (0 to 1) determines the position
             * along the curve. Unlike CubicBezierInterpolation which uses exactly 4 points, this
             * supports any number.
             * @param v The input array of values to interpolate between.
             * @param k The percentage of interpolation, between 0 and 1.
             * @returns The interpolated value.
             */
            function Bezier(v: number[], k: number): number;

            /**
             * Performs a Catmull-Rom spline interpolation over an array of values, producing a smooth
             * curve that passes through every control point. The `k` parameter (0 to 1) determines
             * the position along the full curve.
             * 
             * If the first and last values in `v` are equal, the curve is treated as closed (looping),
             * and the interpolation wraps around seamlessly. Otherwise, the curve is treated as open,
             * and values of `k` outside the 0 to 1 range will extrapolate beyond the endpoints.
             * @param v The input array of control point values to interpolate between.
             * @param k The percentage of interpolation, between 0 and 1. Values outside this range extrapolate on an open curve, or wrap on a closed curve.
             * @returns The interpolated value.
             */
            function CatmullRom(v: number[], k: number): number;

            /**
             * Calculates a cubic bezier interpolated value for a given parameter `t`, based on four
             * control points. The curve passes through `p0` at `t=0` and `p3` at `t=1`, while `p1`
             * and `p2` act as pull points that shape the curve between those endpoints without
             * necessarily being on it. This makes cubic bezier interpolation well-suited for smooth,
             * art-directed transitions in animations, camera paths, and procedural movement.
             * 
             * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a
             * @param t The percentage of interpolation, between 0 and 1.
             * @param p0 The start point.
             * @param p1 The first control point.
             * @param p2 The second control point.
             * @param p3 The end point.
             * @returns The interpolated value.
             */
            function CubicBezier(t: number, p0: number, p1: number, p2: number, p3: number): number;

            /**
             * Performs linear interpolation across an array of values.
             * 
             * Given an array of values `v` and a progress factor `k` in the range 0 to 1,
             * this function maps `k` to a position along the array and returns the linearly
             * interpolated value between the two nearest array elements. A `k` of 0 returns
             * a value near the first element, while a `k` of 1 returns a value near the last.
             * Values of `k` outside the range 0 to 1 are extrapolated beyond the ends of the array.
             * @param v The input array of values to interpolate between.
             * @param k The percentage of interpolation, between 0 and 1.
             * @returns The interpolated value.
             */
            function Linear(v: number[], k: number): number;

            /**
             * Calculates a single point along a quadratic Bezier curve defined by a start point, a control
             * point, and an end point. The value of `t` determines how far along the curve the returned
             * value sits: 0 returns the start point value, 1 returns the end point value, and values in
             * between are smoothly interpolated. The control point pulls the curve toward it, shaping the
             * arc between the start and end points without the curve passing through it directly.
             * @param t The interpolation position along the curve, between 0 (start) and 1 (end).
             * @param p0 The start point value.
             * @param p1 The control point value, which pulls the curve toward it and determines its arc.
             * @param p2 The end point value.
             * @returns The interpolated value at position `t` along the quadratic Bezier curve.
             */
            function QuadraticBezier(t: number, p0: number, p1: number, p2: number): number;

            /**
             * A Smooth Step interpolation method that uses the Smoothstep function to produce a smooth, S-shaped
             * transition between the `min` and `max` values. Unlike linear interpolation, Smooth Step eases in
             * and out at both edges, resulting in a gradual start and end to the transition. This makes it
             * well-suited for animations and transitions where abrupt changes at the boundaries would look unnatural.
             * 
             * The interpolation parameter `t` is first remapped via the Smoothstep curve (which clamps and applies
             * a cubic Hermite function), and the result is then used to linearly interpolate between `min` and `max`.
             * @param t The percentage of interpolation, between 0 and 1.
             * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.
             * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.
             * @returns The interpolated value.
             */
            function SmoothStep(t: number, min: number, max: number): number;

            /**
             * An interpolation method based on Ken Perlin's Smoother Step function, which is an improved
             * variant of the standard Smooth Step curve. Unlike Smooth Step, which has zero first derivatives
             * at the endpoints, Smoother Step also has zero second derivatives at the endpoints, resulting in
             * an even smoother S-curve transition between `min` and `max`. Use this when you need particularly
             * fluid easing with no perceivable acceleration or deceleration artifacts at the start or end of
             * the transition.
             * @param t The percentage of interpolation, between 0 and 1.
             * @param min The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.
             * @param max The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.
             * @returns The interpolated value.
             */
            function SmootherStep(t: number, min: number, max: number): number;

        }

        namespace Pow2 {
            /**
             * Returns the smallest power of 2 that is greater than or equal to the given `value`.
             * For example, a value of 7 returns 8, a value of 8 returns 8, and a value of 9 returns 16.
             * @param value The value for which to find the next power of 2. Should be a positive number.
             * @returns The smallest power of 2 that is greater than or equal to `value`.
             */
            function GetPowerOfTwo(value: number): number;

            /**
             * Checks if the given `width` and `height` are a power of two.
             * Useful for checking texture dimensions.
             * @param width The width to check, in pixels.
             * @param height The height to check, in pixels.
             * @returns `true` if `width` and `height` are a power of two, otherwise `false`.
             */
            function IsSize(width: number, height: number): boolean;

            /**
             * Tests the value and returns `true` if it is a power of two.
             * @param value The value to check if it's a power of two.
             * @returns Returns `true` if `value` is a power of two, otherwise `false`.
             */
            function IsValue(value: number): boolean;

        }

        /**
         * A seeded Random Data Generator.
         * 
         * Access via `Phaser.Math.RND` which is an instance of this class pre-defined
         * by Phaser. Or, create your own instance to use as you require.
         * 
         * The `Math.RND` generator is seeded by the Game Config property value `seed`.
         * If no such config property exists, a random number is used.
         * 
         * If you create your own instance of this class you should provide a seed for it.
         * If no seed is given it will use a 'random' one based on Date.now.
         */
        class RandomDataGenerator {
            /**
             * 
             * @param seeds The seeds to use for the random number generator.
             */
            constructor(seeds?: string | string[]);

            /**
             * Signs to choose from.
             */
            signs: number[];

            /**
             * Initialize the state of the random data generator.
             * @param seeds The seeds to initialize the random data generator with.
             */
            init(seeds: string | string[]): void;

            /**
             * Reset the seed of the random data generator.
             * 
             * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.
             * @param seeds The array of seeds: the `toString()` of each value is used.
             */
            sow(seeds: string[]): void;

            /**
             * Returns a random integer between 0 and 2^32.undefined
             * @returns A random integer between 0 and 2^32.
             */
            integer(): number;

            /**
             * Returns a random real number between 0 and 1.undefined
             * @returns A random real number between 0 and 1.
             */
            frac(): number;

            /**
             * Returns a random real number between 0 and 2^32.undefined
             * @returns A random real number between 0 and 2^32.
             */
            real(): number;

            /**
             * Returns a random integer between and including min and max.
             * @param min The minimum value in the range.
             * @param max The maximum value in the range.
             * @returns A random number between min and max.
             */
            integerInRange(min: number, max: number): number;

            /**
             * Returns a random integer between and including min and max.
             * This method is an alias for RandomDataGenerator.integerInRange.
             * @param min The minimum value in the range.
             * @param max The maximum value in the range.
             * @returns A random number between min and max.
             */
            between(min: number, max: number): number;

            /**
             * Returns a random real number between min and max.
             * @param min The minimum value in the range.
             * @param max The maximum value in the range.
             * @returns A random number between min and max.
             */
            realInRange(min: number, max: number): number;

            /**
             * Returns a random real number between -1 and 1.undefined
             * @returns A random real number between -1 and 1.
             */
            normal(): number;

            /**
             * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368undefined
             * @returns A valid RFC4122 version4 ID hex string
             */
            uuid(): string;

            /**
             * Returns a random element from within the given array.
             * @param array The array to pick a random element from.
             * @returns A random member of the array.
             */
            pick<T>(array: T[]): T;

            /**
             * Returns a randomly selected sign value, either -1 or +1. Useful for multiplying a value
             * to randomly flip its direction, for example to randomize horizontal or vertical movement.undefined
             * @returns -1 or +1.
             */
            sign(): number;

            /**
             * Returns a random element from within the given array, favoring the earlier entries.
             * @param array The array to pick a random element from.
             * @returns A random member of the array.
             */
            weightedPick<T>(array: T[]): T;

            /**
             * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.
             * @param min The minimum value in the range.
             * @param max The maximum value in the range.
             * @returns A random timestamp between min and max.
             */
            timestamp(min: number, max: number): number;

            /**
             * Returns a random angle in degrees, between -180 and 180.undefined
             * @returns A random integer angle in degrees, between -180 and 180.
             */
            angle(): number;

            /**
             * Returns a random rotation in radians, between -3.1415926 and 3.1415926 (approximately -π to π).undefined
             * @returns A random real number in radians, between -3.1415926 and 3.1415926.
             */
            rotation(): number;

            /**
             * Gets or Sets the state of the generator. This allows you to retain the values
             * that the generator is using between games, i.e. in a game save file.
             * 
             * To seed this generator with a previously saved state you can pass it as the
             * `seed` value in your game config, or call this method directly after Phaser has booted.
             * 
             * Call this method with no parameters to return the current state.
             * 
             * If providing a state it should match the same format that this method
             * returns, which is a string with a header `!rnd` followed by the `c`,
             * `s0`, `s1` and `s2` values respectively, each comma-delimited.
             * @param state Generator state to be set.
             * @returns The current state of the generator.
             */
            state(state?: string): string;

            /**
             * Shuffles the given array, using the current seed.
             * @param array The array to be shuffled.
             * @returns The shuffled array.
             */
            shuffle<T>(array?: T[]): T[];

        }

        namespace Snap {
            /**
             * Snap a value to nearest grid slice, using ceil.
             * 
             * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.
             * As will `14` snap to `15`... but `16` will snap to `20`.
             * @param value The value to snap.
             * @param gap The interval gap of the grid.
             * @param start Optional starting offset for gap. Default 0.
             * @param divide If `true` it will divide the snapped value by the gap before returning. Default false.
             * @returns The snapped value.
             */
            function Ceil(value: number, gap: number, start?: number, divide?: boolean): number;

            /**
             * Snap a value to the nearest lower grid slice, using floor.
             * 
             * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.
             * As will `14` snap to `10`... but `16` will snap to `15`.
             * @param value The value to snap.
             * @param gap The interval gap of the grid.
             * @param start Optional starting offset for gap. Default 0.
             * @param divide If `true` it will divide the snapped value by the gap before returning. Default false.
             * @returns The snapped value.
             */
            function Floor(value: number, gap: number, start?: number, divide?: boolean): number;

            /**
             * Snaps a value to the nearest grid slice, using rounding. Values that fall exactly halfway between two slices will snap to the higher slice.
             * 
             * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.
             * @param value The value to snap.
             * @param gap The interval gap of the grid.
             * @param start Optional starting offset for the grid, allowing grid alignment to begin at a value other than zero. Default 0.
             * @param divide If `true` it will divide the snapped value by the gap before returning. Default false.
             * @returns The snapped value.
             */
            function To(value: number, gap: number, start?: number, divide?: boolean): number;

        }

    }

    /**
     * The root types namespace.
     */
    namespace Types {
        namespace Actions {
            type AddEffectBloomConfig = {
                /**
                 * The lower brightness threshold for channels to contribute to the bloom, in the range 0-1.
                 */
                threshold?: number;
                /**
                 * The radius of light blur in the bloom.
                 */
                blurRadius?: number;
                /**
                 * The number of steps to run the blur in the bloom. This value should always be an integer.
                 */
                blurSteps?: number;
                /**
                 * The quality of the light blur: 0 (low), 1 (medium) or 2 (high).
                 */
                blurQuality?: number;
                /**
                 * The amount by which to blend the bloom over the original image. 0 is none, 1 is 100%. Higher values are allowed.
                 */
                blendAmount?: number;
                /**
                 * The blend mode to use when applying the bloom.
                 */
                blendMode?: Phaser.BlendModes;
                /**
                 * Whether to add filters to the internal filter list of the effect target. By default, filters are added to the external filter list, so they run relative to the screen.
                 */
                useInternal?: boolean;
            };

            type AddEffectBloomReturn = {
                /**
                 * The object or camera to which the bloom is applied.
                 */
                item: Phaser.Cameras.Scene2D.Camera | Phaser.GameObjects.GameObject;
                /**
                 * The ParallelFilters filter which blends the blurred light with the original image.
                 */
                parallelFilters: Phaser.Filters.ParallelFilters;
                /**
                 * The Threshold filter which cuts off darker light from the image.
                 */
                threshold: Phaser.Filters.Threshold;
                /**
                 * The Blur filter which spreads out bright light from the image.
                 */
                blur: Phaser.Filters.Blur;
            };

            type AddEffectShineConfig = {
                /**
                 * The width of the shine, as a proportion of the size of the target.
                 */
                radius?: number;
                /**
                 * The direction the shine travels in. 0 is to the right, increasing clockwise. Direction changes which corner of the target the shine travels from. This is the direction of the gradient shape vector.
                 */
                direction?: number;
                /**
                 * The length the shine travels, as a proportion of the size of the target. This is the length of the gradient shape vector.
                 */
                scale?: number;
                /**
                 * The width of the gradient texture. By default, this is derived from the target.
                 */
                width?: number;
                /**
                 * The height of the gradient texture. By default, this is derived from the target.
                 */
                height?: number;
                /**
                 * Custom color bands to use in the gradient. If this is defined, `shineColor` does nothing.
                 */
                bands?: Phaser.Display.ColorBand | Phaser.Types.Display.ColorBandConfig | (Phaser.Display.ColorBand|Phaser.Types.Display.ColorBandConfig)[];
                /**
                 * The factor which multiplies the shiny part of the image. Must be 4 numbers (RGBA). Typical range is 0-1, but it's often useful to make them larger.
                 */
                colorFactor?: number[];
                /**
                 * A displacement map to apply to the gradient. If not defined, no displacement is applied.
                 */
                displacementMap?: string;
                /**
                 * If a displacement map is applied, this is its strength.
                 */
                displacement?: number;
                /**
                 * Duration of the shine animation (via the tween), in milliseconds.
                 */
                duration?: number;
                /**
                 * Delay between repetitions of the shine animation.
                 */
                repeatDelay?: number;
                /**
                 * Ease mode for the tween.
                 */
                ease?: string | Function;
                /**
                 * Whether to move the shine back and forth. If not set, the shine constantly crosses the image in the same direction every time.
                 */
                yoyo?: boolean;
                /**
                 * Whether to add the shine effect in external space, where it relates to the screen. By default, it is in internal space, where it relates to the target.
                 */
                useExternal?: boolean;
                /**
                 * Whether to use reveal mode. In reveal mode, the effect only shows the shiny part of the image; the rest is hidden. As this is simpler, there is no `parallelFilters` in the return object when reveal mode is on.
                 */
                reveal?: boolean;
            };

            type AddEffectShineReturn = {
                /**
                 * The object or camera to which the shine is applied.
                 */
                item: Phaser.Cameras.Scene2D.Camera | Phaser.GameObjects.GameObject;
                /**
                 * The gradient which controls the shine area. This is not added to the scene, so it will be garbage collected once all references and the tween are destroyed.
                 */
                gradient: Phaser.GameObjects.Gradient;
                /**
                 * The texture where the gradient is rendered, after any filters are applied. This will be destroyed when the target is destroyed. You can destroy it earlier, but it is accessed by the tween, so ensure the tween has stopped.
                 */
                dynamicTexture: Phaser.Textures.DynamicTexture;
                /**
                 * The tween which controls the gradient motion. When this updates, the dynamicTexture is redrawn. This will be destroyed when the target is destroyed. You can destroy it earlier to stop the gradient from updating.
                 */
                tween: Phaser.Tweens.Tween;
                /**
                 * The ParallelFilters filter which adds the shine to the image. This will not be defined if the Shine is in `reveal` mode. This belongs to the target and will be removed when the target is destroyed. You can remove it yourself to remove the shine effect, if not in `reveal` mode.
                 */
                parallelFilters: Phaser.Filters.ParallelFilters | null;
                /**
                 * The Blend filter which makes the image shine by multiplying it by the gradient. This controls the brightness of the shine. In `reveal` mode, this belongs to the target and will be removed when the target is destroyed. You can remove if yourself to remove the shine effect. When not in `reveal` mode, this belongs to `parallelFilters.top`.
                 */
                blendFilter: Phaser.Filters.Blend;
            };

            type AddMaskShapeConfig = {
                /**
                 * The type of shape to create. This can be 'circle', 'ellipse', 'square' or 'rectangle'.
                 */
                shape?: string;
                /**
                 * The aspect ratio of width to height for ellipse and rectangle shapes.
                 */
                aspectRatio?: number;
                /**
                 * Whether to invert the mask, typically for creating borders.
                 */
                invert?: boolean;
                /**
                 * Whether to use the internal or external filter list. Internal masks follow game objects, and are executed before external filters.
                 */
                useInternal?: boolean;
                /**
                 * The radius of blur to apply to the mask. If 0, no blur is applied. A good value is 2.
                 */
                blurRadius?: number;
                /**
                 * The number of steps to run blur on the mask. This value should always be an integer.
                 */
                blurSteps?: number;
                /**
                 * The quality of any blur: 0 (low), 1 (medium) or 2 (high).
                 */
                blurQuality?: number;
                /**
                 * The scale mode to use when fitting the shape. 0 sets each axis to fill the region independently. -1 scales both axes uniformly so the shape touches the _inside_ of the region. 1 scales both axes uniformly so the shape touches the _outside_ of the region.
                 */
                scaleMode?: number;
                /**
                 * Padding applies an inset around the edge of the masked region. This provides space for blur to soften the edges of a mask.
                 */
                padding?: number;
                /**
                 * The region to fit. If not defined, it will be inferred from the target's scene scale.
                 */
                region?: Phaser.Geom.Rectangle;
            };

            type CallCallback = (item: Phaser.GameObjects.GameObject)=>void;

            type FitToRegionItemCoverage = {
                /**
                 * Override the effective width of the item.
                 */
                width?: number;
                /**
                 * Override the effective height of the item.
                 */
                height?: number;
                /**
                 * Override the effective horizontal origin of the item.
                 */
                originX?: number;
                /**
                 * Override the effective vertical origin of the item.
                 */
                originY?: number;
            };

            type GridAlignConfig = {
                /**
                 * The width of the grid in items (not pixels). -1 means lay all items out horizontally, regardless of quantity.
                 *                                  If both this value and height are set to -1 then this value overrides it and the `height` value is ignored.
                 */
                width?: number;
                /**
                 * The height of the grid in items (not pixels). -1 means lay all items out vertically, regardless of quantity.
                 *                                   If both this value and `width` are set to -1 then `width` overrides it and this value is ignored.
                 */
                height?: number;
                /**
                 * The width of the cell, in pixels, in which the item is positioned.
                 */
                cellWidth?: number;
                /**
                 * The height of the cell, in pixels, in which the item is positioned.
                 */
                cellHeight?: number;
                /**
                 * The alignment position. One of the Phaser.Display.Align consts such as `TOP_LEFT` or `RIGHT_CENTER`.
                 */
                position?: number;
                /**
                 * Optionally place the top-left of the final grid at this coordinate.
                 */
                x?: number;
                /**
                 * Optionally place the top-left of the final grid at this coordinate.
                 */
                y?: number;
            };

        }

        namespace Animations {
            type Animation = {
                /**
                 * The key that the animation will be associated with. i.e. sprite.animations.play(key)
                 */
                key?: string;
                /**
                 * Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.
                 */
                frames?: string | Phaser.Types.Animations.AnimationFrame[];
                /**
                 * If you provide a string for `frames` you can optionally have the frame names numerically sorted.
                 */
                sortFrames?: boolean;
                /**
                 * The key of the texture all frames of the animation will use. Can be overridden on a per frame basis.
                 */
                defaultTextureKey?: string;
                /**
                 * The frame rate of playback in frames per second (default 24 if duration is null)
                 */
                frameRate?: number;
                /**
                 * How long the animation should play for in milliseconds. If not given its derived from frameRate.
                 */
                duration?: number;
                /**
                 * Skip frames if the time lags, or always advanced anyway?
                 */
                skipMissedFrames?: boolean;
                /**
                 * Delay before starting playback. Value given in milliseconds.
                 */
                delay?: number;
                /**
                 * Number of times to repeat the animation (-1 for infinity)
                 */
                repeat?: number;
                /**
                 * Delay before the animation repeats. Value given in milliseconds.
                 */
                repeatDelay?: number;
                /**
                 * Should the animation yoyo? (reverse back down to the start) before repeating?
                 */
                yoyo?: boolean;
                /**
                 * If this animation has a delay, should it show the first frame immediately (true), or only after the delay (false)
                 */
                showBeforeDelay?: boolean;
                /**
                 * Should sprite.visible = true when the animation starts to play? This happens _after_ any delay, if set.
                 */
                showOnStart?: boolean;
                /**
                 * Should sprite.visible = false when the animation finishes?
                 */
                hideOnComplete?: boolean;
                /**
                 * Start playback of this animation from a randomly selected frame?
                 */
                randomFrame?: boolean;
            };

            type AnimationFrame = {
                /**
                 * The key of the texture within the Texture Manager to use for this Animation Frame.
                 */
                key?: string;
                /**
                 * The key, or index number, of the frame within the texture to use for this Animation Frame.
                 */
                frame?: string | number;
                /**
                 * The duration, in ms, of this frame of the animation.
                 */
                duration?: number;
                /**
                 * Should the parent Game Object be visible during this frame of the animation?
                 */
                visible?: boolean;
            };

            type GenerateFrameNames = {
                /**
                 * The string to append to every resulting frame name if using a range or an array of `frames`.
                 */
                prefix?: string;
                /**
                 * If `frames` is not provided, the number of the first frame to return.
                 */
                start?: number;
                /**
                 * If `frames` is not provided, the number of the last frame to return.
                 */
                end?: number;
                /**
                 * The string to append to every resulting frame name if using a range or an array of `frames`.
                 */
                suffix?: string;
                /**
                 * The minimum expected lengths of each resulting frame's number. Numbers will be left-padded with zeroes until they are this long, then prepended and appended to create the resulting frame name.
                 */
                zeroPad?: number;
                /**
                 * The array to append the created configuration objects to.
                 */
                outputArray?: Phaser.Types.Animations.AnimationFrame[];
                /**
                 * If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used.
                 */
                frames?: boolean | number[];
            };

            type GenerateFrameNumbers = {
                /**
                 * The starting frame of the animation.
                 */
                start?: number;
                /**
                 * The ending frame of the animation.
                 */
                end?: number;
                /**
                 * A frame to put at the beginning of the animation, before `start` or `outputArray` or `frames`.
                 */
                first?: boolean | number;
                /**
                 * An array to concatenate the output onto.
                 */
                outputArray?: Phaser.Types.Animations.AnimationFrame[];
                /**
                 * A custom sequence of frames.
                 */
                frames?: boolean | number[];
            };

            type JSONAnimation = {
                /**
                 * The key that the animation will be associated with. i.e. sprite.animations.play(key)
                 */
                key: string;
                /**
                 * A frame based animation (as opposed to a bone based animation)
                 */
                type: string;
                /**
                 * An array of the AnimationFrame objects inside this Animation.
                 */
                frames: Phaser.Types.Animations.JSONAnimationFrame[];
                /**
                 * The frame rate of playback in frames per second (default 24 if duration is null)
                 */
                frameRate: number;
                /**
                 * How long the animation should play for in milliseconds. If not given its derived from frameRate.
                 */
                duration: number;
                /**
                 * Skip frames if the time lags, or always advanced anyway?
                 */
                skipMissedFrames: boolean;
                /**
                 * Delay before starting playback. Value given in milliseconds.
                 */
                delay: number;
                /**
                 * Number of times to repeat the animation (-1 for infinity)
                 */
                repeat: number;
                /**
                 * Delay before the animation repeats. Value given in milliseconds.
                 */
                repeatDelay: number;
                /**
                 * Should the animation yoyo? (reverse back down to the start) before repeating?
                 */
                yoyo: boolean;
                /**
                 * If this animation has a delay, should it show the first frame immediately (true), or only after the delay (false)
                 */
                showBeforeDelay: boolean;
                /**
                 * Should sprite.visible = true when the animation starts to play?
                 */
                showOnStart: boolean;
                /**
                 * Should sprite.visible = false when the animation finishes?
                 */
                hideOnComplete: boolean;
                /**
                 * Start playback of this animation from a randomly selected frame?
                 */
                randomFrame?: boolean;
            };

            type JSONAnimationFrame = {
                /**
                 * The key of the Texture this AnimationFrame uses.
                 */
                key: string;
                /**
                 * The key of the Frame within the Texture that this AnimationFrame uses.
                 */
                frame: string | number;
                /**
                 * Additional time (in ms) that this frame should appear for during playback.
                 */
                duration: number;
            };

            type JSONAnimations = {
                /**
                 * An array of all Animations added to the Animation Manager.
                 */
                anims: Phaser.Types.Animations.JSONAnimation[];
                /**
                 * The global time scale of the Animation Manager.
                 */
                globalTimeScale: number;
            };

            type PlayAnimationConfig = {
                /**
                 * The string-based key of the animation to play, or an Animation instance.
                 */
                key: string | Phaser.Animations.Animation;
                /**
                 * The frame rate of playback in frames per second (default 24 if duration is null)
                 */
                frameRate?: number;
                /**
                 * How long the animation should play for in milliseconds. If not given its derived from frameRate.
                 */
                duration?: number;
                /**
                 * Delay before starting playback. Value given in milliseconds.
                 */
                delay?: number;
                /**
                 * Number of times to repeat the animation (-1 for infinity)
                 */
                repeat?: number;
                /**
                 * Delay before the animation repeats. Value given in milliseconds.
                 */
                repeatDelay?: number;
                /**
                 * Should the animation yoyo? (reverse back down to the start) before repeating?
                 */
                yoyo?: boolean;
                /**
                 * If this animation has a delay, should it show the first frame immediately (true), or only after the delay (false)
                 */
                showBeforeDelay?: boolean;
                /**
                 * Should sprite.visible = true when the animation starts to play?
                 */
                showOnStart?: boolean;
                /**
                 * Should sprite.visible = false when the animation finishes?
                 */
                hideOnComplete?: boolean;
                /**
                 * Skip frames if the time lags, or always advanced anyway?
                 */
                skipMissedFrames?: boolean;
                /**
                 * The frame of the animation to start playback from.
                 */
                startFrame?: number;
                /**
                 * The time scale to be applied to playback of this animation.
                 */
                timeScale?: number;
                /**
                 * Start playback of this animation from a randomly selected frame?
                 */
                randomFrame?: boolean;
            };

        }

        namespace Cameras {
            namespace Scene2D {
                type CameraConfig = {
                    /**
                     * The name of the Camera.
                     */
                    name?: string;
                    /**
                     * The horizontal position of the Camera viewport.
                     */
                    x?: number;
                    /**
                     * The vertical position of the Camera viewport.
                     */
                    y?: number;
                    /**
                     * The width of the Camera viewport.
                     */
                    width?: number;
                    /**
                     * The height of the Camera viewport.
                     */
                    height?: number;
                    /**
                     * The default zoom level of the Camera.
                     */
                    zoom?: number;
                    /**
                     * The rotation of the Camera, in radians.
                     */
                    rotation?: number;
                    /**
                     * Should the Camera round pixels before rendering?
                     */
                    roundPixels?: boolean;
                    /**
                     * The horizontal scroll position of the Camera.
                     */
                    scrollX?: number;
                    /**
                     * The vertical scroll position of the Camera.
                     */
                    scrollY?: number;
                    /**
                     * A CSS color string controlling the Camera background color.
                     */
                    backgroundColor?: false | string;
                    /**
                     * Defines the Camera bounds.
                     */
                    bounds?: object | null;
                    /**
                     * The top-left extent of the Camera bounds.
                     */
                    "bounds.x"?: number;
                    /**
                     * The top-left extent of the Camera bounds.
                     */
                    "bounds.y"?: number;
                    /**
                     * The width of the Camera bounds.
                     */
                    "bounds.width"?: number;
                    /**
                     * The height of the Camera bounds.
                     */
                    "bounds.height"?: number;
                };

                type CameraFadeCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number)=>void;

                type CameraFlashCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number)=>void;

                type CameraPaddingWrapper = Phaser.Cameras.Scene2D.Camera & {
                    /**
                     * How much padding to apply to each side of the camera. This adjusts the size, position, and scroll of the camera, but the CameraPaddingWrapper proxy abstracts these adjustments so you don't need to consider them.
                     */
                    padding: number;
                };

                type CameraPanCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number, x: number, y: number)=>void;

                type CameraRotateCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number, rotation: number)=>void;

                type CameraShakeCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number)=>void;

                type CameraZoomCallback = (camera: Phaser.Cameras.Scene2D.Camera, progress: number, zoom: number)=>void;

                type JSONCamera = {
                    /**
                     * The name of the camera
                     */
                    name: string;
                    /**
                     * The horizontal position of camera
                     */
                    x: number;
                    /**
                     * The vertical position of camera
                     */
                    y: number;
                    /**
                     * The width size of camera
                     */
                    width: number;
                    /**
                     * The height size of camera
                     */
                    height: number;
                    /**
                     * The zoom of camera
                     */
                    zoom: number;
                    /**
                     * The rotation of camera
                     */
                    rotation: number;
                    /**
                     * The round pixels indicate the status of the camera
                     */
                    roundPixels: boolean;
                    /**
                     * The horizontal scroll of camera
                     */
                    scrollX: number;
                    /**
                     * The vertical scroll of camera
                     */
                    scrollY: number;
                    /**
                     * The background color of camera
                     */
                    backgroundColor: string;
                    /**
                     * The bounds of camera
                     */
                    bounds?: Phaser.Types.Cameras.Scene2D.JSONCameraBounds | undefined;
                };

                type JSONCameraBounds = {
                    /**
                     * The horizontal position of camera
                     */
                    x: number;
                    /**
                     * The vertical position of camera
                     */
                    y: number;
                    /**
                     * The width size of camera
                     */
                    width: number;
                    /**
                     * The height size of camera
                     */
                    height: number;
                };

            }

            namespace Controls {
                type FixedKeyControlConfig = {
                    /**
                     * The Camera that this Control will update.
                     */
                    camera?: Phaser.Cameras.Scene2D.Camera;
                    /**
                     * The Key to be pressed that will move the Camera left.
                     */
                    left?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will move the Camera right.
                     */
                    right?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will move the Camera up.
                     */
                    up?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will move the Camera down.
                     */
                    down?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will zoom the Camera in.
                     */
                    zoomIn?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will zoom the Camera out.
                     */
                    zoomOut?: Phaser.Input.Keyboard.Key;
                    /**
                     * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.
                     */
                    zoomSpeed?: number;
                    /**
                     * The horizontal and vertical speed the camera will move.
                     */
                    speed?: number | Object;
                    /**
                     * The smallest zoom value the camera will reach when zoomed out.
                     */
                    minZoom?: number;
                    /**
                     * The largest zoom value the camera will reach when zoomed in.
                     */
                    maxZoom?: number;
                };

                type SmoothedKeyControlConfig = {
                    /**
                     * The Camera that this Control will update.
                     */
                    camera?: Phaser.Cameras.Scene2D.Camera;
                    /**
                     * The Key to be pressed that will move the Camera left.
                     */
                    left?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will move the Camera right.
                     */
                    right?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will move the Camera up.
                     */
                    up?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will move the Camera down.
                     */
                    down?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will zoom the Camera in.
                     */
                    zoomIn?: Phaser.Input.Keyboard.Key;
                    /**
                     * The Key to be pressed that will zoom the Camera out.
                     */
                    zoomOut?: Phaser.Input.Keyboard.Key;
                    /**
                     * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.
                     */
                    zoomSpeed?: number;
                    /**
                     * The horizontal and vertical acceleration the camera will move.
                     */
                    acceleration?: number | Object;
                    /**
                     * The horizontal and vertical drag applied to the camera when it is moving.
                     */
                    drag?: number | Object;
                    /**
                     * The maximum horizontal and vertical speed the camera will move.
                     */
                    maxSpeed?: number | Object;
                    /**
                     * The smallest zoom value the camera will reach when zoomed out.
                     */
                    minZoom?: number;
                    /**
                     * The largest zoom value the camera will reach when zoomed in.
                     */
                    maxZoom?: number;
                };

            }

        }

        namespace Core {
            /**
             * Config object containing various sound settings.
             */
            type AudioConfig = {
                /**
                 * Use HTML5 Audio instead of Web Audio.
                 */
                disableWebAudio?: boolean;
                /**
                 * An existing Web Audio context.
                 */
                context?: AudioContext;
                /**
                 * Disable all audio output.
                 */
                noAudio?: boolean;
            };

            type BannerConfig = {
                /**
                 * Omit Phaser's name and version from the banner.
                 */
                hidePhaser?: boolean;
                /**
                 * The color of the banner text.
                 */
                text?: string;
                /**
                 * The background colors of the banner.
                 */
                background?: string[];
            };

            type BootCallback = (game: Phaser.Game)=>void;

            type CallbacksConfig = {
                /**
                 * A function to run at the start of the boot sequence.
                 */
                preBoot?: Phaser.Types.Core.BootCallback;
                /**
                 * A function to run at the end of the boot sequence. At this point, all the game systems have started and plugins have been loaded.
                 */
                postBoot?: Phaser.Types.Core.BootCallback;
            };

            type DOMContainerConfig = {
                /**
                 * Should the game create a div element to act as a DOM Container? Only enable if you're using DOM Element objects. You must provide a parent object if you use this feature.
                 */
                createContainer?: boolean;
                /**
                 * Should the DOM Container that is created (if `dom.createContainer` is true) be positioned behind (true) or over the top (false, the default) of the game canvas?
                 */
                behindCanvas?: boolean;
                /**
                 * The default `pointerEvents` attribute set on the DOM Container.
                 */
                pointerEvents?: string;
            };

            type FPSConfig = {
                /**
                 * The minimum acceptable rendering rate, in frames per second.
                 */
                min?: number;
                /**
                 * The optimum rendering rate, in frames per second. This does not enforce the fps rate, it merely tells Phaser what rate is considered optimal for this game.
                 */
                target?: number;
                /**
                 * Enforces an fps rate limit that the game step will run at, regardless of browser frequency. 0 means 'no limit'. This is only useful for artificially dropping the frame rate to get a retro effect. The browser will never update the game faster than the display refresh rate.
                 */
                limit?: number;
                /**
                 * Use setTimeout instead of requestAnimationFrame to run the game loop.
                 */
                forceSetTimeOut?: boolean;
                /**
                 * Calculate the average frame delta from this many consecutive frame intervals.
                 */
                deltaHistory?: number;
                /**
                 * The amount of frames the time step counts before we trust the delta values again.
                 */
                panicMax?: number;
                /**
                 * Apply delta smoothing during the game update to help avoid spikes?
                 */
                smoothStep?: boolean;
            };

            type GameConfig = {
                /**
                 * The width of the game, in game pixels.
                 */
                width?: number | string;
                /**
                 * The height of the game, in game pixels.
                 */
                height?: number | string;
                /**
                 * Simple scale applied to the game canvas. 2 is double size, 0.5 is half size, etc.
                 */
                zoom?: number;
                /**
                 * Which renderer to use. Phaser.AUTO, Phaser.CANVAS, Phaser.HEADLESS, or Phaser.WEBGL. AUTO picks WEBGL if available, otherwise CANVAS.
                 */
                type?: number;
                /**
                 * `true` or `1` = Use the built-in StableSort (needed for older browsers), `false` or `0` = Rely on ES2019 Array.sort being stable (modern browsers only), or `-1` = Try and determine this automatically based on browser inspection (not guaranteed to work, errs on side of caution).
                 */
                stableSort?: number | boolean;
                /**
                 * The DOM element that will contain the game canvas, or its `id`. If undefined, or if the named element doesn't exist, the game canvas is appended to the document body. If `null` no parent will be used and you are responsible for adding the canvas to the dom.
                 */
                parent?: HTMLElement | string | null;
                /**
                 * Provide your own Canvas element for Phaser to use instead of creating one.
                 */
                canvas?: HTMLCanvasElement;
                /**
                 * CSS styles to apply to the game canvas instead of Phasers default styles.
                 */
                canvasStyle?: string;
                /**
                 * Is Phaser running under a custom (non-native web) environment? If so, set this to `true` to skip internal Feature detection. If `true` the `renderType` cannot be left as `AUTO`.
                 */
                customEnvironment?: boolean;
                /**
                 * Provide your own Canvas Context for Phaser to use, instead of creating one.
                 */
                context?: CanvasRenderingContext2D;
                /**
                 * A scene or scenes to add to the game. If several are given, the first is started; the remainder are started only if they have `{ active: true }`. See the `sceneConfig` argument in `Phaser.Scenes.SceneManager#add`.
                 */
                scene?: Phaser.Types.Scenes.SceneType | Phaser.Types.Scenes.SceneType[];
                /**
                 * Seed for the random number generator.
                 */
                seed?: string[];
                /**
                 * The title of the game. Shown in the browser console.
                 */
                title?: string;
                /**
                 * The URL of the game. Shown in the browser console.
                 */
                url?: string;
                /**
                 * The version of the game. Shown in the browser console.
                 */
                version?: string;
                /**
                 * Automatically call window.focus() when the game boots. Usually necessary to capture input events if the game is in a separate frame.
                 */
                autoFocus?: boolean;
                /**
                 * Input configuration, or `false` to disable all game input.
                 */
                input?: boolean | Phaser.Types.Core.InputConfig;
                /**
                 * Disable the browser's default 'contextmenu' event (usually triggered by a right-button mouse click).
                 */
                disableContextMenu?: boolean;
                /**
                 * Configuration for the banner printed in the browser console when the game starts.
                 */
                banner?: boolean | Phaser.Types.Core.BannerConfig;
                /**
                 * The DOM Container configuration object.
                 */
                dom?: Phaser.Types.Core.DOMContainerConfig;
                /**
                 * Game loop configuration.
                 */
                fps?: Phaser.Types.Core.FPSConfig;
                /**
                 * Game renderer configuration.
                 */
                render?: Phaser.Types.Core.RenderConfig;
                /**
                 * Optional callbacks to run before or after game boot.
                 */
                callbacks?: Phaser.Types.Core.CallbacksConfig;
                /**
                 * Loader configuration.
                 */
                loader?: Phaser.Types.Core.LoaderConfig;
                /**
                 * Images configuration.
                 */
                images?: Phaser.Types.Core.ImagesConfig;
                /**
                 * Physics configuration.
                 */
                physics?: Phaser.Types.Core.PhysicsConfig;
                /**
                 * Plugins to install.
                 */
                plugins?: Phaser.Types.Core.PluginObject | Phaser.Types.Core.PluginObjectItem[];
                /**
                 * The Scale Manager configuration.
                 */
                scale?: Phaser.Types.Core.ScaleConfig;
                /**
                 * The Audio Configuration object.
                 */
                audio?: Phaser.Types.Core.AudioConfig;
                /**
                 * The background color of the game canvas. The default is black.
                 */
                backgroundColor?: string | number;
                /**
                 * When set to `true`, WebGL uses linear interpolation to draw scaled or rotated textures, giving a smooth appearance. When set to `false`, WebGL uses nearest-neighbor interpolation, giving a crisper appearance. `false` also disables antialiasing of the game canvas itself, if the browser supports it, when the game canvas is scaled.
                 */
                antialias?: boolean;
                /**
                 * Sets the `antialias` property when the WebGL context is created. Setting this value does not impact any subsequent textures that are created, or the canvas style attributes.
                 */
                antialiasGL?: boolean;
                /**
                 * When set to `true` it will create a desynchronized context for both 2D and WebGL. See https://developers.google.com/web/updates/2019/05/desynchronized for details.
                 */
                desynchronized?: boolean;
                /**
                 * Sets `antialias` to false and `roundPixels` to true. This is the best setting for pixel-art games.
                 */
                pixelArt?: boolean;
                /**
                 * WebGL only. Sets `antialias` to true and `pixelArt` to false. Texture-based Game Objects use special shader setting that preserve blocky pixels, but smooth the edges between the pixels. This is only visible when objects are scaled up; otherwise, `antialias` is simpler.
                 */
                smoothPixelArt?: boolean;
                /**
                 * Draw texture-based Game Objects at only whole-integer positions. Game Objects without textures, like Graphics, ignore this property.
                 */
                roundPixels?: boolean;
                /**
                 * On textured objects with lighting, this enables self-shadowing based on the diffuse map.
                 */
                selfShadow?: boolean;
                /**
                 * Threshold for combining points into a single path in the WebGL renderer for Graphics objects. This can be overridden at the Graphics object level.
                 */
                pathDetailThreshold?: number;
                /**
                 * Whether the game canvas will be transparent. Boolean that indicates if the canvas contains an alpha channel. If set to false, the browser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images.
                 */
                transparent?: boolean;
                /**
                 * Whether the game canvas will be cleared between each rendering frame.
                 */
                clearBeforeRender?: boolean;
                /**
                 * If the value is true the WebGL buffers will not be cleared and will preserve their values until cleared or overwritten by the author.
                 */
                preserveDrawingBuffer?: boolean;
                /**
                 * In WebGL mode, the drawing buffer contains colors with pre-multiplied alpha.
                 */
                premultipliedAlpha?: boolean;
                /**
                 * Avert stuttering during shader compilation, by enabling parallel shader compilation, where supported. Objects which request a shader that is not yet ready will not be drawn. This prevents stutter, but may cause "pop-in" of objects unless you use a pre-touch strategy.
                 */
                skipUnreadyShaders?: boolean;
                /**
                 * Let the browser abort creating a WebGL context if it judges performance would be unacceptable.
                 */
                failIfMajorPerformanceCaveat?: boolean;
                /**
                 * "high-performance", "low-power" or "default". A hint to the browser on how much device power the game might use.
                 */
                powerPreference?: string;
                /**
                 * The default WebGL batch size. Represents the number of _quads_ that can be added to a single batch.
                 */
                batchSize?: number;
                /**
                 * The maximum number of lights allowed to be visible within range of a single Camera in the LightManager.
                 */
                maxLights?: number;
                /**
                 * When in WebGL mode, this sets the maximum number of GPU Textures to use. The default, -1, will use all available units. The WebGL1 spec says all browsers should provide a minimum of 8.
                 */
                maxTextures?: number;
                /**
                 * The mipmap magFilter to be used when creating WebGL textures.
                 */
                mipmapFilter?: string;
                /**
                 * Whether to regenerate mipmaps for framebuffers.
                 */
                mipmapRegeneration?: boolean;
                /**
                 * If iOS or Android detected, automatically restrict WebGL to use 1 texture per batch. This can help performance on some devices.
                 */
                autoMobileTextures?: boolean;
                /**
                 * Is the Scale Manager allowed to adjust the CSS height property of the parent and/or document body to be 100%?
                 */
                expandParent?: boolean;
                /**
                 * The scale mode.
                 */
                mode?: Phaser.Scale.ScaleModeType;
                /**
                 * The minimum width and height the canvas can be scaled down to.
                 */
                min?: WidthHeight;
                /**
                 * The maximum width the canvas can be scaled up to.
                 */
                max?: WidthHeight;
                /**
                 * Automatically round the display and style sizes of the canvas. This can help with performance in lower-powered devices.
                 */
                autoRound?: boolean;
                /**
                 * Automatically center the canvas within the parent?
                 */
                autoCenter?: Phaser.Scale.CenterType;
                /**
                 * How many ms should elapse before checking if the browser size has changed?
                 */
                resizeInterval?: number;
                /**
                 * The DOM element that will be sent into full screen mode, or its `id`. If undefined Phaser will create its own div and insert the canvas into it when entering fullscreen mode.
                 */
                fullscreenTarget?: HTMLElement | string | null;
            };

            type GamepadInputConfig = {
                /**
                 * Where the Gamepad Manager listens for gamepad input events.
                 */
                target?: any;
            };

            type ImagesConfig = {
                /**
                 * A base64 encoded image file to use as the 'default' texture.
                 */
                default?: string | undefined | null;
                /**
                 * A base64 encoded image file to use as the 'missing' texture.
                 */
                missing?: string | undefined | null;
                /**
                 * A base64 encoded image file to use as the 'white' texture.
                 */
                white?: string | undefined | null;
            };

            type InputConfig = {
                /**
                 * Keyboard input configuration. `true` uses the default configuration and `false` disables keyboard input.
                 */
                keyboard?: boolean | Phaser.Types.Core.KeyboardInputConfig;
                /**
                 * Mouse input configuration. `true` uses the default configuration and `false` disables mouse input.
                 */
                mouse?: boolean | Phaser.Types.Core.MouseInputConfig;
                /**
                 * Touch input configuration. `true` uses the default configuration and `false` disables touch input.
                 */
                touch?: boolean | Phaser.Types.Core.TouchInputConfig;
                /**
                 * Gamepad input configuration. `true` enables gamepad input.
                 */
                gamepad?: boolean | Phaser.Types.Core.GamepadInputConfig;
                /**
                 * The maximum number of touch pointers. See {@link Phaser.Input.InputManager#pointers}.
                 */
                activePointers?: number;
                /**
                 * The smoothing factor to apply during Pointer movement. See {@link Phaser.Input.Pointer#smoothFactor}.
                 */
                smoothFactor?: number;
                /**
                 * Should Phaser listen for input events on the Window? If you disable this, events like 'POINTER_UP_OUTSIDE' will no longer fire.
                 */
                windowEvents?: boolean;
            };

            type KeyboardInputConfig = {
                /**
                 * Where the Keyboard Manager listens for keyboard input events.
                 */
                target?: any;
                /**
                 * `preventDefault` will be called on every non-modified key which has a key code in this array. By default it is empty.
                 */
                capture?: number[] | null;
            };

            type LoaderConfig = {
                /**
                 * A URL used to resolve paths given to the loader. Example: 'http://labs.phaser.io/assets/'.
                 */
                baseURL?: string;
                /**
                 * A URL path used to resolve relative paths given to the loader. Example: 'images/sprites/'.
                 */
                path?: string;
                /**
                 * The maximum number of resources the loader will start loading at once.
                 */
                maxParallelDownloads?: number;
                /**
                 * 'anonymous', 'use-credentials', or `undefined`. If you're not making cross-origin requests, leave this as `undefined`. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes}.
                 */
                crossOrigin?: string | undefined;
                /**
                 * The response type of the XHR request, e.g. `blob`, `text`, etc.
                 */
                responseType?: string;
                /**
                 * Should the XHR request use async or not?
                 */
                async?: boolean;
                /**
                 * Optional username for all XHR requests.
                 */
                user?: string;
                /**
                 * Optional password for all XHR requests.
                 */
                password?: string;
                /**
                 * Optional XHR timeout value, in ms.
                 */
                timeout?: number;
                /**
                 * An optional array of schemes that the Loader considers as being 'local' files. Defaults to: `[ 'file://', 'capacitor://' ]` if not specified.
                 */
                localScheme?: string[];
                /**
                 * Optional XHR withCredentials value.
                 */
                withCredentials?: boolean;
                /**
                 * Optional load type for image, `XHR` is default, or `HTMLImageElement` for a lightweight way.
                 */
                imageLoadType?: string;
                /**
                 * The number of times to retry the file load if it fails.
                 */
                maxRetries?: number;
            };

            type MouseInputConfig = {
                /**
                 * Where the Mouse Manager listens for mouse input events. The default is the game canvas.
                 */
                target?: any;
                /**
                 * If `true` the DOM `mousedown` event will have `preventDefault` set.
                 */
                preventDefaultDown?: boolean;
                /**
                 * If `true` the DOM `mouseup` event will have `preventDefault` set.
                 */
                preventDefaultUp?: boolean;
                /**
                 * If `true` the DOM `mousemove` event will have `preventDefault` set.
                 */
                preventDefaultMove?: boolean;
                /**
                 * If `true` the DOM `wheel` event will have `preventDefault` set.
                 */
                preventDefaultWheel?: boolean;
            };

            /**
             * This callback type is completely empty, a no-operation.
             */
            type NOOP = ()=>void;

            type PhysicsConfig = {
                /**
                 * The default physics system. It will be started for each scene. Phaser provides 'arcade', 'impact', and 'matter'.
                 */
                default?: string;
                /**
                 * Arcade Physics configuration.
                 */
                arcade?: Phaser.Types.Physics.Arcade.ArcadeWorldConfig;
                /**
                 * Matter Physics configuration.
                 */
                matter?: Phaser.Types.Physics.Matter.MatterWorldConfig;
            };

            type PluginObject = {
                /**
                 * Global plugins to install.
                 */
                global?: Phaser.Types.Core.PluginObjectItem[] | null;
                /**
                 * Scene plugins to install.
                 */
                scene?: Phaser.Types.Core.PluginObjectItem[] | null;
                /**
                 * The default set of scene plugins (names).
                 */
                default?: string[];
                /**
                 * Plugins to *add* to the default set of scene plugins.
                 */
                defaultMerge?: string[];
            };

            type PluginObjectItem = {
                /**
                 * A key to identify the plugin in the Plugin Manager.
                 */
                key?: string;
                /**
                 * The plugin itself. Usually a class/constructor.
                 */
                plugin?: any;
                /**
                 * Whether the plugin should be started automatically.
                 */
                start?: boolean;
                /**
                 * For a scene plugin, add the plugin to the scene's systems object under this key (`this.sys.KEY`, from the scene).
                 */
                systemKey?: string;
                /**
                 * For a scene plugin, add the plugin to the scene object under this key (`this.KEY`, from the scene).
                 */
                sceneKey?: string;
                /**
                 * If this plugin is to be injected into the Scene Systems, this is the property key map used.
                 */
                mapping?: string;
                /**
                 * Arbitrary data passed to the plugin's init() method.
                 */
                data?: any;
            };

            type RenderConfig = {
                /**
                 * When set to `true`, WebGL uses linear interpolation to draw scaled or rotated textures, giving a smooth appearance. When set to `false`, WebGL uses nearest-neighbor interpolation, giving a crisper appearance. `false` also disables antialiasing of the game canvas itself, if the browser supports it, when the game canvas is scaled.
                 */
                antialias?: boolean;
                /**
                 * Sets the `antialias` property when the WebGL context is created. Setting this value does not impact any subsequent textures that are created, or the canvas style attributes.
                 */
                antialiasGL?: boolean;
                /**
                 * When set to `true` it will create a desynchronized context for both 2D and WebGL. See https://developers.google.com/web/updates/2019/05/desynchronized for details.
                 */
                desynchronized?: boolean;
                /**
                 * Sets `antialias` to false and `roundPixels` to true. This is the best setting for pixel-art games.
                 */
                pixelArt?: boolean;
                /**
                 * WebGL only. Sets `antialias` to true and `pixelArt` to false. Texture-based Game Objects use special shader setting that preserve blocky pixels, but smooth the edges between the pixels. This is only visible when objects are scaled up; otherwise, `antialias` is simpler.
                 */
                smoothPixelArt?: boolean;
                /**
                 * Draw texture-based Game Objects at only whole-integer positions. Game Objects without textures, like Graphics, ignore this property.
                 */
                roundPixels?: boolean;
                /**
                 * On textured objects with lighting, this enables self-shadowing based on the diffuse map.
                 */
                selfShadow?: boolean;
                /**
                 * Threshold for combining points into a single path in the WebGL renderer for Graphics objects. This can be overridden at the Graphics object level.
                 */
                pathDetailThreshold?: number;
                /**
                 * Whether the game canvas will be transparent. Boolean that indicates if the canvas contains an alpha channel. If set to false, the browser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images.
                 */
                transparent?: boolean;
                /**
                 * Whether the game canvas will be cleared between each rendering frame.
                 */
                clearBeforeRender?: boolean;
                /**
                 * If the value is true the WebGL buffers will not be cleared and will preserve their values until cleared or overwritten by the author.
                 */
                preserveDrawingBuffer?: boolean;
                /**
                 * In WebGL mode, the drawing buffer contains colors with pre-multiplied alpha.
                 */
                premultipliedAlpha?: boolean;
                /**
                 * Avert stuttering during shader compilation, by enabling parallel shader compilation, where supported. Objects which request a shader that is not yet ready will not be drawn. This prevents stutter, but may cause "pop-in" of objects unless you use a pre-touch strategy.
                 */
                skipUnreadyShaders?: boolean;
                /**
                 * Let the browser abort creating a WebGL context if it judges performance would be unacceptable.
                 */
                failIfMajorPerformanceCaveat?: boolean;
                /**
                 * "high-performance", "low-power" or "default". A hint to the browser on how much device power the game might use.
                 */
                powerPreference?: string;
                /**
                 * The default WebGL batch size. Represents the number of _quads_ that can be added to a single batch.
                 */
                batchSize?: number;
                /**
                 * The maximum number of lights allowed to be visible within range of a single Camera in the LightManager.
                 */
                maxLights?: number;
                /**
                 * When in WebGL mode, this sets the maximum number of GPU Textures to use. The default, -1, will use all available units. The WebGL1 spec says all browsers should provide a minimum of 8.
                 */
                maxTextures?: number;
                /**
                 * The mipmap magFilter to be used when creating WebGL textures. Don't set unless you wish to create mipmaps. Set to one of the following: 'NEAREST', 'LINEAR', 'NEAREST_MIPMAP_NEAREST', 'LINEAR_MIPMAP_NEAREST', 'NEAREST_MIPMAP_LINEAR' or 'LINEAR_MIPMAP_LINEAR'.
                 */
                mipmapFilter?: string;
                /**
                 * Whether to regenerate mipmaps for framebuffers. If this is false, framebuffers will not use mipmaps. If this is true, framebuffers will use the `mipmapFilter` setting, and regenerate mipmaps if redrawn. This affects filters and DynamicTextures. Mipmap generation is expensive (10 microseconds or more per texture), so be careful with this setting.
                 */
                mipmapRegeneration?: boolean;
                /**
                 * If iOS or Android detected, automatically restrict WebGL to use 1 texture per batch. This can help performance on some devices.
                 */
                autoMobileTextures?: boolean;
                /**
                 * A map of custom Render Nodes to be added to the WebGL Renderer. The values will be added to the RenderNodeManager, using the keys as the names.
                 */
                renderNodes?: {[key: string]: Phaser.Types.Core.RenderNodesConfig};
            };

            type RenderNodesConfig = {
                /**
                 * A key to be used as the name of the RenderNode.
                 */
                key?: string;
                /**
                 * The Render Node function itself.
                 */
                function?: any;
            };

            type ScaleConfig = {
                /**
                 * The base width of your game. Can be an integer or a string: '100%'. If a string it will only work if you have set a parent element that has a size.
                 */
                width?: number | string;
                /**
                 * The base height of your game. Can be an integer or a string: '100%'. If a string it will only work if you have set a parent element that has a size.
                 */
                height?: number | string;
                /**
                 * The zoom value of the game canvas.
                 */
                zoom?: Phaser.Scale.ZoomType | number;
                /**
                 * The DOM element that will contain the game canvas, or its `id`. If undefined, or if the named element doesn't exist, the game canvas is inserted directly into the document body. If `null` no parent will be used and you are responsible for adding the canvas to your environment.
                 */
                parent?: HTMLElement | string | null;
                /**
                 * Is the Scale Manager allowed to adjust the CSS height property of the parent and/or document body to be 100%?
                 */
                expandParent?: boolean;
                /**
                 * The scale mode.
                 */
                mode?: Phaser.Scale.ScaleModeType;
                /**
                 * The minimum width and height the canvas can be scaled down to.
                 */
                min?: WidthHeight;
                /**
                 * The maximum width the canvas can be scaled up to.
                 */
                max?: WidthHeight;
                /**
                 * Set the snapping values used by the Scale Manager when resizing the canvas. See `ScaleManager.setSnap` for details.
                 */
                snap?: WidthHeight;
                /**
                 * Automatically round the display and style sizes of the canvas. This can help with performance in lower-powered devices.
                 */
                autoRound?: boolean;
                /**
                 * Automatically center the canvas within the parent?
                 */
                autoCenter?: Phaser.Scale.CenterType;
                /**
                 * How many ms should elapse before checking if the browser size has changed?
                 */
                resizeInterval?: number;
                /**
                 * The DOM element that will be sent into full screen mode, or its `id`. If undefined Phaser will create its own div and insert the canvas into it when entering fullscreen mode.
                 */
                fullscreenTarget?: HTMLElement | string | null;
            };

            type TimeStepCallback = (time: number, average: number)=>void;

            type TouchInputConfig = {
                /**
                 * Where the Touch Manager listens for touch input events. The default is the game canvas.
                 */
                target?: any;
                /**
                 * Whether touch input events have preventDefault() called on them.
                 */
                capture?: boolean;
            };

            type WidthHeight = {
                /**
                 * The width.
                 */
                width?: number;
                /**
                 * The height.
                 */
                height?: number;
            };

        }

        namespace Curves {
            type EllipseCurveConfig = {
                /**
                 * The x coordinate of the ellipse.
                 */
                x?: number;
                /**
                 * The y coordinate of the ellipse.
                 */
                y?: number;
                /**
                 * The horizontal radius of the ellipse.
                 */
                xRadius?: number;
                /**
                 * The vertical radius of the ellipse.
                 */
                yRadius?: number;
                /**
                 * The start angle of the ellipse, in degrees.
                 */
                startAngle?: number;
                /**
                 * The end angle of the ellipse, in degrees.
                 */
                endAngle?: number;
                /**
                 * Sets if the ellipse rotation is clockwise (true) or anti-clockwise (false)
                 */
                clockwise?: boolean;
                /**
                 * The rotation of the ellipse, in degrees.
                 */
                rotation?: number;
            };

            type JSONCurve = {
                /**
                 * The type of the curve
                 */
                type: string;
                /**
                 * The arrays of points like `[x1, y1, x2, y2]`
                 */
                points: number[];
            };

            type JSONEllipseCurve = {
                /**
                 * The type of the curve.
                 */
                type: string;
                /**
                 * The x coordinate of the ellipse.
                 */
                x: number;
                /**
                 * The y coordinate of the ellipse.
                 */
                y: number;
                /**
                 * The horizontal radius of ellipse.
                 */
                xRadius: number;
                /**
                 * The vertical radius of ellipse.
                 */
                yRadius: number;
                /**
                 * The start angle of the ellipse, in degrees.
                 */
                startAngle: number;
                /**
                 * The end angle of the ellipse, in degrees.
                 */
                endAngle: number;
                /**
                 * Sets if the ellipse rotation is clockwise (true) or anti-clockwise (false)
                 */
                clockwise: boolean;
                /**
                 * The rotation of ellipse, in degrees.
                 */
                rotation: number;
            };

            type JSONPath = {
                /**
                 * The type of the path.
                 */
                type: string;
                /**
                 * The X coordinate of the curve's starting point.
                 */
                x: number;
                /**
                 * The Y coordinate of the path's starting point.
                 */
                y: number;
                /**
                 * The path is auto closed.
                 */
                autoClose: boolean;
                /**
                 * The list of the curves
                 */
                curves: Phaser.Types.Curves.JSONCurve[];
            };

        }

        namespace Display {
            type ColorBandConfig = {
                /**
                 * The color at the start of the band. Specify a color integer, hex string, array of RGB or RGBA in range 0-1, or a color.
                 */
                colorStart?: number | string | number[] | Phaser.Display.Color;
                /**
                 * The color at the end of the band. Defaults to `colorStart`.
                 */
                colorEnd?: number | string | number[] | Phaser.Display.Color;
                /**
                 * The start point of this band within a ColorRamp. This value should be normalized within the ramp, between 0 (ramp start) and 1 (ramp end).
                 */
                start?: number;
                /**
                 * The middle point of this band within a ColorRamp. This value should be normalized within the band, between 0 (band start) and 1 (band end). Middle point alters the shape of the color interpolation.
                 */
                middle?: number;
                /**
                 * The end point of this band within a ColorRamp. This value should be normalized within the ramp, between 0 (ramp start) and 1 (ramp end).
                 */
                end?: number;
                /**
                 * The size of this band within a ColorRamp. This value should be normalized within the ramp, between 0 (ramp start) and 1 (ramp end). This is used if `end` is not specified. If being used to construct a ColorRamp, it can also set the `start` of the next band.
                 */
                size?: number;
                /**
                 * The color interpolation.
                 * This can be one of the following codes:
                 * 
                 * - 0: LINEAR - a straight blend.
                 * - 1: CURVED - color changes quickly at start and end,
                 *   flattening in the middle. Good for convex surfaces.
                 * - 2: SINUSOIDAL - color changes quickly in the middle,
                 *   flattening at start and end. Good for smooth transitions.
                 * - 3: CURVE_START - color changes quickly at the start,
                 *   flattening at the end.
                 * - 4: CURVE_END - color changes quickly at the end,
                 *   flattening at the start.
                 * 
                 * Under the hood, these are similar to the circular easing function.
                 */
                interpolation?: number;
                /**
                 * The color space where interpolation should be done.
                 * This can be one of the following codes:
                 * 
                 * - 0: RGBA - channels are blended directly.
                 *   This can be inaccurate.
                 * - 1: HSVA_NEAREST - colors are blended in HSVA space,
                 *   better preserving saturation and lightness.
                 *   The hue is blended with the shortest angle, e.g. red and blue
                 *   blend via purple, not green.
                 * - 2: HSVA_PLUS - as HSVA_NEAREST, but hue angle always increases.
                 * - 3: HSVA_MINUS - as HSVA_NEAREST, but hue angle always decreases.
                 */
                colorSpace?: number;
            };

            type ColorObject = {
                /**
                 * The red color value in the range 0 to 255.
                 */
                r: number;
                /**
                 * The green color value in the range 0 to 255.
                 */
                g: number;
                /**
                 * The blue color value in the range 0 to 255.
                 */
                b: number;
                /**
                 * The alpha color value in the range 0 to 255.
                 */
                a: number;
                /**
                 * The combined color value.
                 */
                color: number;
            };

            type HSVColorObject = {
                /**
                 * The hue color value. A number between 0 and 1
                 */
                h: number;
                /**
                 * The saturation color value. A number between 0 and 1
                 */
                s: number;
                /**
                 * The lightness color value. A number between 0 and 1
                 */
                v: number;
            };

            type InputColorObject = {
                /**
                 * The red color value in the range 0 to 255.
                 */
                r?: number;
                /**
                 * The green color value in the range 0 to 255.
                 */
                g?: number;
                /**
                 * The blue color value in the range 0 to 255.
                 */
                b?: number;
                /**
                 * The alpha color value in the range 0 to 255.
                 */
                a?: number;
            };

        }

        namespace Filters {
            type BlockyConfig = {
                /**
                 * The size of the blocks. If a number, it sets both x and y to the same value. If a Vector2Like, it sets x and y to the respective values.
                 */
                size?: number | Phaser.Types.Math.Vector2Like;
                /**
                 * The offset of the blocks. If a number, it sets both x and y to the same value. If a Vector2Like, it sets x and y to the respective values.
                 */
                offset?: number | Phaser.Types.Math.Vector2Like;
            };

            type GradientMapConfig = {
                /**
                 * The color ramp to use.
                 */
                ramp?: Phaser.Display.ColorRamp | Phaser.Types.Display.ColorBandConfig | Phaser.Display.ColorBand | (Phaser.Types.Display.ColorBandConfig|Phaser.Display.ColorBand)[];
                /**
                 * Whether to dither the gradient output.
                 */
                dither?: boolean;
                /**
                 * Value to add to each channel.
                 */
                color?: number[];
                /**
                 * Factor to apply to each channel. Try to keep them summing to 1.
                 */
                colorFactor?: number[];
                /**
                 * Whether to unpremultiply color data before processing it.
                 */
                unpremultiply?: boolean;
                /**
                 * How much of the effect to blend over the original.
                 */
                alpha?: number;
            };

            type ImageLightConfig = {
                /**
                 * The texture to use for the ImageLight effect normal map. This should match the object being filtered. The default is flat lighting.
                 */
                normalMap?: string | Phaser.Textures.Texture;
                /**
                 * The texture to use for the ImageLight effect environment map.
                 */
                environmentMap?: string | Phaser.Textures.Texture;
                /**
                 * The initial model matrix. If not provided, a default matrix will be created.
                 */
                modelMatrix?: Phaser.Math.Matrix4;
                /**
                 * The initial rotation of the model in radians.
                 */
                modelRotation?: number;
                /**
                 * The source of the model rotation. If a function, it will be called to get the rotation. If a GameObject, it will be used to get the rotation from the GameObject's world transform. If null, the model rotation will be taken from the modelRotation property.
                 */
                modelRotationSource?: Phaser.GameObjects.GameObject | Phaser.Types.Filters.ImageLightSourceCallback | null;
                /**
                 * The amount of bulge to apply to the ImageLight effect. This distorts the surface slightly, preventing flat areas in the normal map from reflecting a single flat color. A value of 0.1 is often plenty.
                 */
                bulge?: number;
                /**
                 * The color factor to apply to the ImageLight effect. This multiplies the intensity of the light in each color channel. Use values above 1 to substitute for high dynamic range lighting.
                 */
                colorFactor?: number[];
            };

            type ImageLightSourceCallback = ()=>number;

            type KeyConfig = {
                /**
                 * The color to use for the key. It can be a hexcode number or string, an array of 3 numbers between 0 and 1, or a Color object.
                 */
                color?: number | string | number[] | Phaser.Display.Color;
                /**
                 * The amount of alpha to remove. This should be a value between 0 and 1, but you can go outside that range for different effects.
                 */
                alpha?: number;
                /**
                 * Whether to keep the region matching the key color. If true, the region matching the key color will be kept, and the rest will be removed. If false, the region matching the key color will be removed, and the rest will be kept.
                 */
                isolate?: boolean;
                /**
                 * The threshold for the key color. A pixel is considered to be the key color if the difference between the pixel and the key color is less than the threshold. This should be a value between 0 and 1. The default threshold is 1 / 16, which is a good starting point for most images.
                 */
                threshold?: number;
                /**
                 * The feathering amount for the key color. Pixels outside the threshold, but still within the feather, will be a partial match. This should be a value between 0 and 1.
                 */
                feather?: number;
            };

            type NormalToolsConfig = {
                /**
                 * 2D rotation of the normal map in radians. For more advanced controls, manipulate the filter's `viewMatrix` to control 3D rotation.
                 */
                rotation?: number;
                /**
                 * The source of the rotation. If a function, it will be called to get the rotation. If a GameObject, it will be used to get the rotation from the GameObject's world transform. If null, the rotation will not be updated by the filter.]
                 */
                rotationSource?: Phaser.GameObjects.GameObject | Phaser.Types.Filters.NormalToolsSourceCallback | null;
                /**
                 * Manipulate the tendency for normals to face the camera. Higher values bend normals toward the camera; lower values bend them away. This can be useful for suggesting depth in a 2D scene.
                 */
                facingPower?: number;
                /**
                 * If true, the output will be a grayscale texture, with the white area being the areas where the normals are facing the camera, fading to black when they're orthogonal. This can be useful as a base for other effects.
                 */
                outputRatio?: boolean;
                /**
                 * The vector to use for the ratio output. This is the direction in which the ratio will be calculated. The default is the camera's forward direction. Manipulate this to highlight parts of the map which are facing in a specific direction. This is only used if outputRatio is true.
                 */
                ratioVector?: Phaser.Math.Vector3;
                /**
                 * How much of a hemisphere to consider for the ratio output. At 1, the ratio will be calculated for the entire hemisphere. At 0, the ratio will be calculated for a single point. This uses the same algorithm as `PanoramaBlur.radius`. This is only used if outputRatio is true.
                 */
                ratioRadius?: number;
            };

            type NormalToolsSourceCallback = ()=>number;

            type PanoramaBlurConfig = {
                /**
                 * The radius of the blur effect. 1 samples an entire hemisphere; 0 samples a single point.
                 */
                radius?: number;
                /**
                 * The number of samples to take along the X axis. More samples produces a more accurate blur, but at the cost of performance. The X axis in a panorama is usually wider than the Y axis.
                 */
                samplesX?: number;
                /**
                 * The number of samples to take along the Y axis. More samples produces a more accurate blur, but at the cost of performance.
                 */
                samplesY?: number;
                /**
                 * An exponent applied to samples. Power above 1 increases darkness, allowing brighter colors to dominate. Power below 1 increases brightness, reducing the influence of brighter colors. To simulate an HDR environment with bright sunlight that cannot be represented in sRGB color, use low power.
                 */
                power?: number;
            };

            type QuantizeConfig = {
                /**
                 * Number of steps to use per channel.
                 */
                steps?: number[];
                /**
                 * Gamma power to apply per channel.
                 */
                gamma?: number[];
                /**
                 * Offset to apply per channel.
                 */
                offset?: number[];
                /**
                 * Whether to dither the quantization.
                 */
                dither?: boolean;
                /**
                 * Color space mode. 0 is RGBA. 1 is HSVA. Use HSVA for better treatment of hues.
                 */
                mode?: number;
            };

        }

        namespace GameObjects {
            namespace BitmapText {
                /**
                 * The font data for an individual character of a Bitmap Font.
                 * 
                 * Describes the character's position, size, offset and kerning.
                 * 
                 * As of version 3.50 it also includes the WebGL texture uv data.
                 */
                type BitmapFontCharacterData = {
                    /**
                     * The x position of the character.
                     */
                    x: number;
                    /**
                     * The y position of the character.
                     */
                    y: number;
                    /**
                     * The width of the character.
                     */
                    width: number;
                    /**
                     * The height of the character.
                     */
                    height: number;
                    /**
                     * The center x position of the character.
                     */
                    centerX: number;
                    /**
                     * The center y position of the character.
                     */
                    centerY: number;
                    /**
                     * The x offset of the character.
                     */
                    xOffset: number;
                    /**
                     * The y offset of the character.
                     */
                    yOffset: number;
                    /**
                     * WebGL texture u0.
                     */
                    u0: number;
                    /**
                     * WebGL texture v0.
                     */
                    v0: number;
                    /**
                     * WebGL texture u1.
                     */
                    u1: number;
                    /**
                     * WebGL texture v1.
                     */
                    v1: number;
                    /**
                     * Extra data for the character.
                     */
                    data: object;
                    /**
                     * Kerning values, keyed by character code.
                     */
                    kerning: {[key: string]: number};
                };

                /**
                 * Bitmap Font data that can be used by a BitmapText Game Object.
                 */
                type BitmapFontData = {
                    /**
                     * The name of the font.
                     */
                    font: string;
                    /**
                     * The size of the font.
                     */
                    size: number;
                    /**
                     * The line height of the font.
                     */
                    lineHeight: number;
                    /**
                     * Whether this font is a retro font (monospace).
                     */
                    retroFont: boolean;
                    /**
                     * The character data of the font, keyed by character code. Each character datum includes a position, size, offset and more.
                     */
                    chars: {[key: number]:  Phaser.Types.GameObjects.BitmapText.BitmapFontCharacterData};
                };

                /**
                 * A single entry from the `BitmapTextSize` characters array.
                 * 
                 * The position and dimensions take the font size into account,
                 * but are not translated into the local space of the Game Object itself.
                 */
                type BitmapTextCharacter = {
                    /**
                     * The index of this character within the BitmapText wrapped text string.
                     */
                    i: number;
                    /**
                     * The index of this character within the BitmapText text string.
                     */
                    idx: number;
                    /**
                     * The character.
                     */
                    char: string;
                    /**
                     * The character code of the character.
                     */
                    code: number;
                    /**
                     * The x position of the character in the BitmapText.
                     */
                    x: number;
                    /**
                     * The y position of the character in the BitmapText.
                     */
                    y: number;
                    /**
                     * The width of the character.
                     */
                    w: number;
                    /**
                     * The height of the character.
                     */
                    h: number;
                    /**
                     * The top of the line this character is on.
                     */
                    t: number;
                    /**
                     * The right-most point of this character, including xAdvance.
                     */
                    r: number;
                    /**
                     * The bottom of the line this character is on.
                     */
                    b: number;
                    /**
                     * The line number the character appears on.
                     */
                    line: number;
                    /**
                     * Reference to the glyph object this character is using.
                     */
                    glyph: Phaser.Types.GameObjects.BitmapText.BitmapFontCharacterData;
                };

                type BitmapTextConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The key of the font to use from the BitmapFont cache.
                     */
                    font?: string;
                    /**
                     * The string, or array of strings, to be set as the content of this Bitmap Text.
                     */
                    text?: string;
                    /**
                     * The font size to set.
                     */
                    size?: number | false;
                };

                /**
                 * Details about the line data in the `BitmapTextSize` object.
                 */
                type BitmapTextLines = {
                    /**
                     * The width of the shortest line of text.
                     */
                    shortest: number;
                    /**
                     * The width of the longest line of text.
                     */
                    longest: number;
                    /**
                     * The height of a line of text.
                     */
                    height: number;
                    /**
                     * An array where each entry contains the length of that line of text.
                     */
                    lengths: number[];
                };

                type BitmapTextSize = {
                    /**
                     * The position and size of the BitmapText, taking into account the position and scale of the Game Object.
                     */
                    global: Phaser.Types.GameObjects.BitmapText.GlobalBitmapTextSize;
                    /**
                     * The position and size of the BitmapText, taking just the font size into account.
                     */
                    local: Phaser.Types.GameObjects.BitmapText.LocalBitmapTextSize;
                    /**
                     * Data about the lines of text within the BitmapText.
                     */
                    lines: Phaser.Types.GameObjects.BitmapText.BitmapTextLines;
                    /**
                     * An array containing per-character data. Only populated if `includeChars` is `true` in the `getTextBounds` call.
                     */
                    characters: Phaser.Types.GameObjects.BitmapText.BitmapTextCharacter[];
                    /**
                     * An array containing the word data from the BitmapText.
                     */
                    words: Phaser.Types.GameObjects.BitmapText.BitmapTextWord[];
                    /**
                     * The scale of the BitmapText font being rendered vs. font size in the text data.
                     */
                    scale: number;
                    /**
                     * The scale X value of the BitmapText.
                     */
                    scaleX: number;
                    /**
                     * The scale Y value of the BitmapText.
                     */
                    scaleY: number;
                    /**
                     * The wrapped text, if wrapping enabled and required.
                     */
                    wrappedText: string;
                };

                /**
                 * Details about a single world entry in the `BitmapTextSize` object words array.
                 */
                type BitmapTextWord = {
                    /**
                     * The x position of the word in the BitmapText.
                     */
                    x: number;
                    /**
                     * The y position of the word in the BitmapText.
                     */
                    y: number;
                    /**
                     * The width of the word.
                     */
                    w: number;
                    /**
                     * The height of the word.
                     */
                    h: number;
                    /**
                     * The index of the first character of this word within the entire string. Note: this index factors in spaces, quotes, carriage-returns, etc.
                     */
                    i: number;
                    /**
                     * The word.
                     */
                    word: string;
                };

                type DisplayCallbackConfig = {
                    /**
                     * The Dynamic Bitmap Text object that owns this character being rendered.
                     */
                    parent: Phaser.GameObjects.DynamicBitmapText;
                    /**
                     * The tint of the character being rendered. Always zero in Canvas.
                     */
                    tint: Phaser.Types.GameObjects.BitmapText.TintConfig;
                    /**
                     * The tint mode of the character being rendered.
                     */
                    tintMode: Phaser.TintModes;
                    /**
                     * The index of the character being rendered.
                     */
                    index: number;
                    /**
                     * The character code of the character being rendered.
                     */
                    charCode: number;
                    /**
                     * The x position of the character being rendered.
                     */
                    x: number;
                    /**
                     * The y position of the character being rendered.
                     */
                    y: number;
                    /**
                     * The scale of the character being rendered.
                     */
                    scale: number;
                    /**
                     * The rotation of the character being rendered.
                     */
                    rotation: number;
                    /**
                     * Custom data stored with the character being rendered.
                     */
                    data: any;
                };

                type DisplayCallback = (display: Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig)=>Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig;

                /**
                 * The position and size of the Bitmap Text in global space, taking into account the Game Object's scale and world position.
                 */
                type GlobalBitmapTextSize = {
                    /**
                     * The x position of the BitmapText, taking into account the x position and scale of the Game Object.
                     */
                    x: number;
                    /**
                     * The y position of the BitmapText, taking into account the y position and scale of the Game Object.
                     */
                    y: number;
                    /**
                     * The width of the BitmapText, taking into account the x scale of the Game Object.
                     */
                    width: number;
                    /**
                     * The height of the BitmapText, taking into account the y scale of the Game Object.
                     */
                    height: number;
                };

                type JSONBitmapText = Phaser.Types.GameObjects.JSONGameObject & {
                    /**
                     * The name of the font.
                     */
                    font: string;
                    /**
                     * The text that this Bitmap Text displays.
                     */
                    text: string;
                    /**
                     * The size of the font.
                     */
                    fontSize: number;
                    /**
                     * Adds / Removes spacing between characters.
                     */
                    letterSpacing: number;
                    /**
                     * Adds / Removes spacing between lines in multi-line text.
                     */
                    lineSpacing: number;
                    /**
                     * The alignment of the text in a multi-line BitmapText object.
                     */
                    align: number;
                };

                /**
                 * The position and size of the Bitmap Text in local space, taking just the font size into account.
                 */
                type LocalBitmapTextSize = {
                    /**
                     * The x position of the BitmapText.
                     */
                    x: number;
                    /**
                     * The y position of the BitmapText.
                     */
                    y: number;
                    /**
                     * The width of the BitmapText.
                     */
                    width: number;
                    /**
                     * The height of the BitmapText.
                     */
                    height: number;
                };

                type RetroFontConfig = {
                    /**
                     * The key of the image containing the font.
                     */
                    image: string;
                    /**
                     * If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.
                     */
                    "offset.x": number;
                    /**
                     * If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.
                     */
                    "offset.y": number;
                    /**
                     * The width of each character in the font set.
                     */
                    width: number;
                    /**
                     * The height of each character in the font set.
                     */
                    height: number;
                    /**
                     * The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.
                     */
                    chars: string;
                    /**
                     * The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth.
                     */
                    charsPerRow: number;
                    /**
                     * If the characters in the font set have horizontal spacing between them set the required amount here.
                     */
                    "spacing.x": number;
                    /**
                     * If the characters in the font set have vertical spacing between them set the required amount here.
                     */
                    "spacing.y": number;
                    /**
                     * The amount of vertical space to add to the line height of the font.
                     */
                    lineSpacing: number;
                };

                type TintConfig = {
                    /**
                     * The top left tint value. Always zero in canvas.
                     */
                    topLeft: number;
                    /**
                     * The top right tint value. Always zero in canvas.
                     */
                    topRight: number;
                    /**
                     * The bottom left tint value. Always zero in canvas.
                     */
                    bottomLeft: number;
                    /**
                     * The bottom right tint value. Always zero in canvas.
                     */
                    bottomRight: number;
                };

            }

            namespace Container {
                type ContainerConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * An optional array of Game Objects to add to the Container.
                     */
                    children?: Phaser.GameObjects.GameObject[];
                };

            }

            namespace Gradient {
                type GradientConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The configuration object this Gradient will use.
                     */
                    config?: string | Phaser.Types.GameObjects.Gradient.GradientQuadConfig;
                    /**
                     * The width of the Game Object.
                     */
                    width?: number;
                    /**
                     * The height of the Game Object.
                     */
                    height?: number;
                };

                type GradientQuadConfig = {
                    /**
                     * Configurations for or instances of ColorBands to use in the gradient. These are used to create a `ColorRamp`.
                     */
                    bands?: Phaser.Types.Display.ColorBandConfig | Phaser.Display.ColorBand | (Phaser.Types.Display.ColorBandConfig|Phaser.Display.ColorBand)[];
                    /**
                     * The gradient offset. This advances or withdraws the gradient along its shape.
                     */
                    offset?: number;
                    /**
                     * The repeat mode. Gradient progress is evaluated as a number, where 0 is the start of the `shape` vector and 1 is the end. Note that conic gradients never leave the range 0-1 unless offset is applied. They may look weird if you do. Repeat mode tells us how to handle that number below 0/above 1. This can be one of the following:
                     *   - 0 (EXTEND): values are clamped between 0 and 1, so the ends of the gradient become flat color.
                     *   - 1 (TRUNCATE): values are discarded outside 0-1, so the ends of the gradient become transparent.
                     *   - 2 (SAWTOOTH): values are modulo 1, so the gradient repeats.
                     *   - 3 (TRIANGULAR): values rise to 1 then fall to 0, so the gradient goes smoothly back and forth.
                     */
                    repeatMode?: number;
                    /**
                     * The shape mode. Shapes are based on the `shape` vector. This can be one of the following:
                     * - 0 (LINEAR): a ribbon where the shape points from one side to the other.
                     *   Commonly use for skies etc.
                     * - 1 (BILINEAR): like LINEAR, but reflected in both directions.
                     *   Useful for gentle waves, reflections etc.
                     * - 2 (RADIAL): gradient spreads out from the `start`,
                     *   to the radius described by `shape`.
                     *   Useful for glows, ripples etc.
                     * - 3 (CONIC_SYMMETRIC): gradient is determined by angle to `shape`,
                     *   going from 0 along the shape vector to 1 opposite it.
                     *   Useful for sharp-looking features or light effects.
                     * - 4 (CONIC_ASYMMETRIC): gradient is determined by angle to `shape`,
                     *   going from 0 to 1 with a full rotation. This creates a seam.
                     *   Good for creating colors that change with angle,
                     *   like speed meters.
                     */
                    shapeMode?: number;
                    /**
                     * The start of the gradient, where 0 is top/left and 1 is bottom/right.
                     */
                    start?: Phaser.Types.Math.Vector2Like;
                    /**
                     * The shape of the gradient, as a vector pointing from the start. By default the gradient crosses the width of its object.
                     */
                    shape?: Phaser.Types.Math.Vector2Like;
                    /**
                     * The length of the gradient. This is used if `shape` is not defined.
                     */
                    length?: number;
                    /**
                     * The direction of the gradient. This is used if `shape` is not defined.
                     */
                    direction?: number;
                    /**
                     * Whether to dither the gradient. Dither can eliminate banding by introducing noise to the output. This effect can be lost when the Gradient is transformed or scaled, so it's only enabled when you want it.
                     */
                    dither?: boolean;
                };

            }

            namespace Graphics {
                /**
                 * Graphics fill style settings.
                 */
                type FillStyle = {
                    /**
                     * The fill color.
                     */
                    color?: number;
                    /**
                     * The fill alpha.
                     */
                    alpha?: number;
                };

                /**
                 * Graphics line style (or stroke style) settings.
                 */
                type LineStyle = {
                    /**
                     * The stroke width.
                     */
                    width?: number;
                    /**
                     * The stroke color.
                     */
                    color?: number;
                    /**
                     * The stroke alpha.
                     */
                    alpha?: number;
                };

                /**
                 * Options for the Graphics Game Object.
                 */
                type Options = Phaser.Types.GameObjects.Graphics.Styles & {
                    /**
                     * The x coordinate of the Graphics.
                     */
                    x?: number;
                    /**
                     * The y coordinate of the Graphics.
                     */
                    y?: number;
                };

                type RoundedRectRadius = {
                    /**
                     * Top left corner radius. Draw concave arc if this radius is negative.
                     */
                    tl?: number;
                    /**
                     * Top right corner radius. Draw concave arc if this radius is negative.
                     */
                    tr?: number;
                    /**
                     * Bottom right corner radius. Draw concave arc if this radius is negative.
                     */
                    br?: number;
                    /**
                     * Bottom left corner radius. Draw concave arc if this radius is negative.
                     */
                    bl?: number;
                };

                /**
                 * Graphics style settings.
                 */
                type Styles = {
                    /**
                     * The style applied to shape outlines.
                     */
                    lineStyle?: Phaser.Types.GameObjects.Graphics.LineStyle;
                    /**
                     * The style applied to shape areas.
                     */
                    fillStyle?: Phaser.Types.GameObjects.Graphics.FillStyle;
                };

                /**
                 * A point with a width, used to describe a point on a line.
                 */
                type WidePoint = {
                    /**
                     * The x coordinate of the point.
                     */
                    x?: number;
                    /**
                     * The y coordinate of the point.
                     */
                    y?: number;
                    /**
                     * The width of the point.
                     */
                    width?: number;
                };

            }

            namespace Group {
                type GroupCallback = (item: Phaser.GameObjects.GameObject)=>void;

                type GroupClassTypeConstructor = (scene: Phaser.Scene, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number)=>void;

                type GroupConfig = {
                    /**
                     * Sets {@link Phaser.GameObjects.Group#classType}.
                     */
                    classType?: Function | null;
                    /**
                     * Sets {@link Phaser.GameObjects.Group#name}.
                     */
                    name?: string | null;
                    /**
                     * Sets {@link Phaser.GameObjects.Group#active}.
                     */
                    active?: boolean | null;
                    /**
                     * Sets {@link Phaser.GameObjects.Group#maxSize}.
                     */
                    maxSize?: number | null;
                    /**
                     * Sets {@link Phaser.GameObjects.Group#defaultKey}.
                     */
                    defaultKey?: string | null;
                    /**
                     * Sets {@link Phaser.GameObjects.Group#defaultFrame}.
                     */
                    defaultFrame?: string | number | null;
                    /**
                     * Sets {@link Phaser.GameObjects.Group#runChildUpdate}.
                     */
                    runChildUpdate?: boolean | null;
                    /**
                     * Sets {@link Phaser.GameObjects.Group#createCallback}.
                     */
                    createCallback?: Phaser.Types.GameObjects.Group.GroupCallback | null;
                    /**
                     * Sets {@link Phaser.GameObjects.Group#removeCallback}.
                     */
                    removeCallback?: Phaser.Types.GameObjects.Group.GroupCallback | null;
                    /**
                     * Sets {@link Phaser.GameObjects.Group#createMultipleCallback}.
                     */
                    createMultipleCallback?: Phaser.Types.GameObjects.Group.GroupMultipleCreateCallback | null;
                };

                /**
                 * The total number of objects created will be
                 * 
                 *     key.length * frame.length * frameQuantity * (yoyo ? 2 : 1) * (1 + repeat)
                 * 
                 * If `max` is nonzero, then the total created will not exceed `max`.
                 * 
                 * `key` is required. {@link Phaser.GameObjects.Group#defaultKey} is not used.
                 */
                type GroupCreateConfig = {
                    /**
                     * The texture key of each new Game Object. Must be provided or not objects will be created.
                     */
                    key: string | string[];
                    /**
                     * The class of each new Game Object.
                     */
                    classType?: Function | null;
                    /**
                     * The texture frame of each new Game Object.
                     */
                    frame?: string | string[] | number | number[] | null;
                    /**
                     * The number of Game Objects to create. If set, this overrides the `frameQuantity` value. Use `frameQuantity` for more advanced control.
                     */
                    quantity?: number | null;
                    /**
                     * The visible state of each new Game Object.
                     */
                    visible?: boolean | null;
                    /**
                     * The active state of each new Game Object.
                     */
                    active?: boolean | null;
                    /**
                     * The number of times each `key` × `frame` combination will be *repeated* (after the first combination).
                     */
                    repeat?: number | null;
                    /**
                     * Select a `key` at random.
                     */
                    randomKey?: boolean | null;
                    /**
                     * Select a `frame` at random.
                     */
                    randomFrame?: boolean | null;
                    /**
                     * Select keys and frames by moving forward then backward through `key` and `frame`.
                     */
                    yoyo?: boolean | null;
                    /**
                     * The number of times each `frame` should be combined with one `key`.
                     */
                    frameQuantity?: number | null;
                    /**
                     * The maximum number of new Game Objects to create. 0 is no maximum.
                     */
                    max?: number | null;
                    /**
                     * Options as named in {@link Phaser.Actions.SetXY}.
                     */
                    setXY?: object | null;
                    /**
                     * Options as named in {@link Phaser.Actions.SetRotation}.
                     */
                    setRotation?: object | null;
                    /**
                     * Options as named in {@link Phaser.Actions.SetScale}.
                     */
                    setScale?: object | null;
                    /**
                     * Options as named in {@link Phaser.Actions.SetOrigin}.
                     */
                    setOrigin?: object | null;
                    /**
                     * Options as named in {@link Phaser.Actions.SetAlpha}.
                     */
                    setAlpha?: object | null;
                    /**
                     * Options as named in {@link Phaser.Actions.SetDepth}.
                     */
                    setDepth?: object | null;
                    /**
                     * Options as named in {@link Phaser.Actions.SetScrollFactor}.
                     */
                    setScrollFactor?: object | null;
                    /**
                     * A geometric shape that defines the hit area for the Game Object.
                     */
                    hitArea?: any | null;
                    /**
                     * A callback to be invoked when the Game Object is interacted with.
                     */
                    hitAreaCallback?: Phaser.Types.Input.HitAreaCallback | null;
                    /**
                     * Align the new Game Objects in a grid using these settings.
                     */
                    gridAlign?: false | Phaser.Types.Actions.GridAlignConfig | null;
                };

                type GroupMultipleCreateCallback = (items: Phaser.GameObjects.GameObject[])=>void;

            }

            namespace NineSlice {
                type NineSliceConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                     */
                    key?: string | Phaser.Textures.Texture;
                    /**
                     * An optional frame from the Texture this Game Object is rendering with.
                     */
                    frame?: string | number;
                    /**
                     * The width of the Nine Slice Game Object. You can adjust the width post-creation.
                     */
                    width?: number;
                    /**
                     * The height of the Nine Slice Game Object. If this is a 3 slice object the height will be fixed to the height of the texture and cannot be changed.
                     */
                    height?: number;
                    /**
                     * The size of the left vertical column (A).
                     */
                    leftWidth?: number;
                    /**
                     * The size of the right vertical column (B).
                     */
                    rightWidth?: number;
                    /**
                     * The size of the top horiztonal row (C). Set to zero or undefined to create a 3 slice object.
                     */
                    topHeight?: number;
                    /**
                     * The size of the bottom horiztonal row (D). Set to zero or undefined to create a 3 slice object.
                     */
                    bottomHeight?: number;
                    /**
                     * Enable tile mode on the horizontal axis.
                     */
                    tileX?: boolean;
                    /**
                     * Enable tile mode on the vertical axis.
                     */
                    tileY?: boolean;
                };

            }

            namespace NoiseCell2D {
                type NoiseCell2DConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The configuration object this NoiseCell2D will use.
                     */
                    config?: string | Phaser.Types.GameObjects.NoiseCell2D.NoiseCell2DQuadConfig;
                    /**
                     * The width of the Game Object.
                     */
                    width?: number;
                    /**
                     * The height of the Game Object.
                     */
                    height?: number;
                };

                type NoiseCell2DQuadConfig = {
                    /**
                     * The number of cells in each dimension.
                     */
                    noiseCells?: number[];
                    /**
                     * How many cells in each dimension before the pattern repeats. `noiseCells` must be integers for this to work properly. By default, this is the same as `noiseCells`.
                     */
                    noiseWrap?: number[];
                    /**
                     * The offset of the noise texture.
                     */
                    noiseOffset?: number[];
                    /**
                     * The variation of the cells away from a perfect grid.
                     */
                    noiseVariation?: number[];
                    /**
                     * How many octaves of noise to render, creating a more detailed output.
                     */
                    noiseIterations?: number;
                    /**
                     * Which mode to render. 0 is sharp edged cells. 1 is flat colored cells. 2 is soft edged cells.
                     */
                    noiseMode?: number;
                    /**
                     * How smooth to render in mode 2.
                     */
                    noiseSmoothing?: number;
                    /**
                     * Whether to convert the noise to a normal map.
                     */
                    noiseNormalMap?: boolean;
                    /**
                     * How much curvature to include in the normal map, if `noiseNormalMap` is enabled.
                     */
                    noiseNormalScale?: number;
                    /**
                     * The color at the middle of the cells.
                     */
                    noiseColorStart?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * The color at the edge of the cells.
                     */
                    noiseColorEnd?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * The seed which determines the cell pattern. A different seed creates an entirely different pattern.
                     */
                    noiseSeed?: number[];
                };

            }

            namespace NoiseCell3D {
                type NoiseCell3DConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The configuration object this NoiseCell3D will use.
                     */
                    config?: string | Phaser.Types.GameObjects.NoiseCell3D.NoiseCell3DQuadConfig;
                    /**
                     * The width of the Game Object.
                     */
                    width?: number;
                    /**
                     * The height of the Game Object.
                     */
                    height?: number;
                };

                type NoiseCell3DQuadConfig = {
                    /**
                     * The number of cells in each dimension.
                     */
                    noiseCells?: number[];
                    /**
                     * How many cells in each dimension before the pattern repeats. `noiseCells` must be integers for this to work properly. By default, this is the same as `noiseCells`.
                     */
                    noiseWrap?: number[];
                    /**
                     * The offset of the noise texture.
                     */
                    noiseOffset?: number[];
                    /**
                     * The variation of the cells away from a perfect grid.
                     */
                    noiseVariation?: number[];
                    /**
                     * How many octaves of noise to render, creating a more detailed output.
                     */
                    noiseIterations?: number;
                    /**
                     * Which mode to render. 0 is sharp edged cells. 1 is flat colored cells. 2 is soft edged cells.
                     */
                    noiseMode?: number;
                    /**
                     * How smooth to render in mode 2.
                     */
                    noiseSmoothing?: number;
                    /**
                     * Whether to convert the noise to a normal map.
                     */
                    noiseNormalMap?: boolean;
                    /**
                     * How much curvature to include in the normal map, if `noiseNormalMap` is enabled.
                     */
                    noiseNormalScale?: number;
                    /**
                     * The color at the middle of the cells.
                     */
                    noiseColorStart?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * The color at the edge of the cells.
                     */
                    noiseColorEnd?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * The seed which determines the cell pattern. A different seed creates an entirely different pattern.
                     */
                    noiseSeed?: number[];
                };

            }

            namespace NoiseCell4D {
                type NoiseCell4DConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The configuration object this NoiseCell4D will use.
                     */
                    config?: string | Phaser.Types.GameObjects.NoiseCell4D.NoiseCell4DQuadConfig;
                    /**
                     * The width of the Game Object.
                     */
                    width?: number;
                    /**
                     * The height of the Game Object.
                     */
                    height?: number;
                };

                type NoiseCell4DQuadConfig = {
                    /**
                     * The number of cells in each dimension.
                     */
                    noiseCells?: number[];
                    /**
                     * How many cells in each dimension before the pattern repeats. `noiseCells` must be integers for this to work properly. By default, this is the same as `noiseCells`.
                     */
                    noiseWrap?: number[];
                    /**
                     * The offset of the noise texture.
                     */
                    noiseOffset?: number[];
                    /**
                     * The variation of the cells away from a perfect grid.
                     */
                    noiseVariation?: number[];
                    /**
                     * How many octaves of noise to render, creating a more detailed output.
                     */
                    noiseIterations?: number;
                    /**
                     * Which mode to render. 0 is sharp edged cells. 1 is flat colored cells. 2 is soft edged cells.
                     */
                    noiseMode?: number;
                    /**
                     * How smooth to render in mode 2.
                     */
                    noiseSmoothing?: number;
                    /**
                     * Whether to convert the noise to a normal map.
                     */
                    noiseNormalMap?: boolean;
                    /**
                     * How much curvature to include in the normal map, if `noiseNormalMap` is enabled.
                     */
                    noiseNormalScale?: number;
                    /**
                     * The color at the middle of the cells.
                     */
                    noiseColorStart?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * The color at the edge of the cells.
                     */
                    noiseColorEnd?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * The seed which determines the cell pattern. A different seed creates an entirely different pattern.
                     */
                    noiseSeed?: number[];
                };

            }

            namespace NoiseSimplex2D {
                type NoiseSimplex2DConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The configuration object this NoiseSimplex2D will use.
                     */
                    config?: string | Phaser.Types.GameObjects.NoiseSimplex2D.NoiseSimplex2DQuadConfig;
                    /**
                     * The width of the Game Object.
                     */
                    width?: number;
                    /**
                     * The height of the Game Object.
                     */
                    height?: number;
                };

                type NoiseSimplex2DQuadConfig = {
                    /**
                     * The number of cells in each dimension.
                     */
                    noiseCells?: number[];
                    /**
                     * How many cells in each dimension before the pattern repeats. By default, this is the same as `noiseCells`.
                     */
                    noisePeriod?: number[];
                    /**
                     * The offset of the noise texture.
                     */
                    noiseOffset?: number[];
                    /**
                     * The initial flow of the noise field. Use this to evolve the field along a period.
                     */
                    noiseFlow?: number;
                    /**
                     * How much turbulence to apply to the noise field.
                     */
                    noiseWarpAmount?: number;
                    /**
                     * How many octaves of noise to render, creating a more detailed output.
                     */
                    noiseIterations?: number;
                    /**
                     * How many octaves of noise to apply as turbulence, if `noiseWarpAmount` is greater than 0.
                     */
                    noiseWarpIterations?: number;
                    /**
                     * Whether to convert the noise to a normal map.
                     */
                    noiseNormalMap?: boolean;
                    /**
                     * How much curvature to include in the normal map, if `noiseNormalMap` is enabled.
                     */
                    noiseNormalScale?: number;
                    /**
                     * The color at the middle of the cells.
                     */
                    noiseColorStart?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * The color at the edge of the cells.
                     */
                    noiseColorEnd?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * How much to increase detail per octave.
                     */
                    noiseDetailPower?: number;
                    /**
                     * How much to increase flow per octave.
                     */
                    noiseFlowPower?: number;
                    /**
                     * How much to shrink the contribution per octave.
                     */
                    noiseContributionPower?: number;
                    /**
                     * How much to increase warp detail per octave.
                     */
                    noiseWarpDetailPower?: number;
                    /**
                     * How much to increase warp flow per octave.
                     */
                    noiseWarpFlowPower?: number;
                    /**
                     * How much to shrink the warp contribution per octave.
                     */
                    noiseWarpContributionPower?: number;
                    /**
                     * How much to scale the noise value for output.
                     */
                    noiseValueFactor?: number;
                    /**
                     * How much to add to the noise value for output.
                     */
                    noiseValueAdd?: number;
                    /**
                     * Exponent to apply to the noise value for output.
                     */
                    noiseValuePower?: number;
                    /**
                     * The hash seed. Each seed creates a different pattern.
                     */
                    noiseSeed?: number[];
                };

            }

            namespace NoiseSimplex3D {
                type NoiseSimplex3DConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The configuration object this NoiseSimplex3D will use.
                     */
                    config?: string | Phaser.Types.GameObjects.NoiseSimplex3D.NoiseSimplex3DQuadConfig;
                    /**
                     * The width of the Game Object.
                     */
                    width?: number;
                    /**
                     * The height of the Game Object.
                     */
                    height?: number;
                };

                type NoiseSimplex3DQuadConfig = {
                    /**
                     * The number of cells in each dimension.
                     */
                    noiseCells?: number[];
                    /**
                     * How many cells in each dimension before the pattern repeats. By default, this is the same as `noiseCells`.
                     */
                    noisePeriod?: number[];
                    /**
                     * The offset of the noise texture.
                     */
                    noiseOffset?: number[];
                    /**
                     * The initial flow of the noise field. Use this to evolve the field along a period.
                     */
                    noiseFlow?: number;
                    /**
                     * How much turbulence to apply to the noise field.
                     */
                    noiseWarpAmount?: number;
                    /**
                     * How many octaves of noise to render, creating a more detailed output.
                     */
                    noiseIterations?: number;
                    /**
                     * How many octaves of noise to apply as turbulence, if `noiseWarpAmount` is greater than 0.
                     */
                    noiseWarpIterations?: number;
                    /**
                     * Whether to convert the noise to a normal map.
                     */
                    noiseNormalMap?: boolean;
                    /**
                     * How much curvature to include in the normal map, if `noiseNormalMap` is enabled.
                     */
                    noiseNormalScale?: number;
                    /**
                     * The color at the middle of the cells.
                     */
                    noiseColorStart?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * The color at the edge of the cells.
                     */
                    noiseColorEnd?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * How much to increase detail per octave.
                     */
                    noiseDetailPower?: number;
                    /**
                     * How much to increase flow per octave.
                     */
                    noiseFlowPower?: number;
                    /**
                     * How much to shrink the contribution per octave.
                     */
                    noiseContributionPower?: number;
                    /**
                     * How much to increase warp detail per octave.
                     */
                    noiseWarpDetailPower?: number;
                    /**
                     * How much to increase warp flow per octave.
                     */
                    noiseWarpFlowPower?: number;
                    /**
                     * How much to shrink the warp contribution per octave.
                     */
                    noiseWarpContributionPower?: number;
                    /**
                     * How much to scale the noise value for output.
                     */
                    noiseValueFactor?: number;
                    /**
                     * How much to add to the noise value for output.
                     */
                    noiseValueAdd?: number;
                    /**
                     * Exponent to apply to the noise value for output.
                     */
                    noiseValuePower?: number;
                    /**
                     * The hash seed. Each seed creates a different pattern. The numbers must be integers.
                     */
                    noiseSeed?: number[];
                };

            }

            namespace Noise {
                type NoiseConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The configuration object this Noise will use.
                     */
                    config?: string | Phaser.Types.GameObjects.Noise.NoiseQuadConfig;
                    /**
                     * The width of the Game Object.
                     */
                    width?: number;
                    /**
                     * The height of the Game Object.
                     */
                    height?: number;
                };

                type NoiseQuadConfig = {
                    /**
                     * The offset of the noise texture.
                     */
                    noiseOffset?: number[];
                    /**
                     * The exponent of the noise values. Lower values remove low values; higher values remove high values.
                     */
                    noisePower?: number;
                    /**
                     * The color at the middle of the cells.
                     */
                    noiseColorStart?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * The color at the edge of the cells.
                     */
                    noiseColorEnd?: number | string | number[] | Phaser.Display.Color;
                    /**
                     * Whether to render random noise in each color channel.
                     */
                    noiseRandomChannels?: boolean;
                    /**
                     * Whether to render random normal vectors. This overrides `noiseRandomChannels`.
                     */
                    noiseRandomNormal?: boolean;
                };

            }

            namespace Particles {
                type DeathZoneObject = Phaser.GameObjects.Particles.Zones.DeathZone | Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig | Phaser.Types.GameObjects.Particles.DeathZoneSource;

                type DeathZoneSource = {
                    contains: Phaser.Types.GameObjects.Particles.DeathZoneSourceCallback;
                };

                type DeathZoneSourceCallback = (x: number, y: number)=>boolean;

                type EdgeZoneSource = {
                    /**
                     * A function placing points on the sources edge or edges.
                     */
                    getPoints: Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback;
                };

                type EdgeZoneSourceCallback = (quantity: number, stepRate?: number)=>Phaser.Types.Math.Vector2Like[];

                type EmitZoneData = Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig | Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone;

                type EmitZoneObject = Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone;

                type EmitterOpCustomEmitConfig = {
                    /**
                     * A callback that is invoked each time the emitter emits a particle.
                     */
                    onEmit: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback;
                };

                type EmitterOpCustomUpdateConfig = {
                    /**
                     * A callback that is invoked each time the emitter emits a particle.
                     */
                    onEmit?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback;
                    /**
                     * A callback that is invoked each time the emitter updates.
                     */
                    onUpdate: Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback;
                };

                /**
                 * Defines an operation yielding a value incremented continuously across a range.
                 */
                type EmitterOpEaseConfig = {
                    /**
                     * The starting value.
                     */
                    start: number;
                    /**
                     * The ending value.
                     */
                    end: number;
                    /**
                     * If true, the particle starts with a minimum random value between the start and end values.
                     */
                    random?: boolean;
                    /**
                     * The ease to find. This can be either a string from the EaseMap, or a custom function.
                     */
                    ease?: string | Function;
                    /**
                     * An optional array of ease parameters to go with the ease.
                     */
                    easeParams?: number[];
                };

                /**
                 * Defines an operation yielding a value incremented continuously across an interpolated data set.
                 */
                type EmitterOpInterpolationConfig = {
                    /**
                     * The array of number values to interpolate through.
                     */
                    values: number[];
                    /**
                     * The interpolation function to use. Typically one of `linear`, `bezier` or `catmull` or a custom function.
                     */
                    interpolation?: string | Function;
                    /**
                     * An optional ease function to use. This can be either a string from the EaseMap, or a custom function.
                     */
                    ease?: string | Function;
                    /**
                     * An optional array of ease parameters to go with the ease.
                     */
                    easeParams?: number[];
                };

                /**
                 * The returned value sets what the property will be at the START of the particle's life, on emit.
                 */
                type EmitterOpOnEmitCallback = (particle?: Phaser.GameObjects.Particles.Particle, key?: string, value?: number)=>number;

                type EmitterOpOnEmitType = number | number[] | Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback | Phaser.Types.GameObjects.Particles.EmitterOpRandomConfig | Phaser.Types.GameObjects.Particles.EmitterOpRandomMinMaxConfig | Phaser.Types.GameObjects.Particles.EmitterOpSteppedConfig | Phaser.Types.GameObjects.Particles.EmitterOpCustomEmitConfig;

                /**
                 * The returned value updates the property for the duration of the particle's life.
                 */
                type EmitterOpOnUpdateCallback = (particle: Phaser.GameObjects.Particles.Particle, key: string, t: number, value: number)=>number;

                type EmitterOpOnUpdateType = Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback | Phaser.Types.GameObjects.Particles.EmitterOpEaseConfig | Phaser.Types.GameObjects.Particles.EmitterOpCustomUpdateConfig | Phaser.Types.GameObjects.Particles.EmitterOpInterpolationConfig;

                /**
                 * Defines an operation yielding a random value within a range.
                 */
                type EmitterOpRandomConfig = {
                    /**
                     * The minimum and maximum values, as [min, max].
                     */
                    random: number[];
                };

                /**
                 * Defines an operation yielding a random value within a range.
                 */
                type EmitterOpRandomMinMaxConfig = {
                    /**
                     * The minimum value.
                     */
                    min: number;
                    /**
                     * The maximum value.
                     */
                    max: number;
                    /**
                     * If true, only integers are selected from the range.
                     */
                    int?: boolean;
                };

                /**
                 * Defines an operation yielding a value incremented by steps across a range.
                 */
                type EmitterOpSteppedConfig = {
                    /**
                     * The starting value.
                     */
                    start: number;
                    /**
                     * The ending value.
                     */
                    end: number;
                    /**
                     * The number of steps between start and end.
                     */
                    steps: number;
                };

                type GravityWellConfig = {
                    /**
                     * The x coordinate of the Gravity Well, in world space.
                     */
                    x?: number;
                    /**
                     * The y coordinate of the Gravity Well, in world space.
                     */
                    y?: number;
                    /**
                     * The strength of the gravity force - larger numbers produce a stronger force.
                     */
                    power?: number;
                    /**
                     * The minimum distance for which the gravity force is calculated.
                     */
                    epsilon?: number;
                    /**
                     * The gravitational force of this Gravity Well.
                     */
                    gravity?: number;
                };

                type ParticleClassConstructor = (emitter: Phaser.GameObjects.Particles.ParticleEmitter)=>void;

                type ParticleData = {
                    tint?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    alpha?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    rotate?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    scaleX?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    scaleY?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    x?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    y?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    accelerationX?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    accelerationY?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    maxVelocityX?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    maxVelocityY?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    moveToX?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    moveToY?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                    bounce?: Phaser.Types.GameObjects.Particles.ParticleDataValue;
                };

                type ParticleDataValue = {
                    /**
                     * The minimum value.
                     */
                    min: number;
                    /**
                     * The maximum value.
                     */
                    max: number;
                };

                type ParticleDeathCallback = (particle: Phaser.GameObjects.Particles.Particle)=>void;

                type ParticleEmitterAnimConfig = {
                    /**
                     * One or more animations names, or Play Animation Config objects.
                     */
                    anims?: string | string[] | Phaser.Types.Animations.PlayAnimationConfig | Phaser.Types.Animations.PlayAnimationConfig[];
                    /**
                     * Whether animations will be assigned consecutively (true) or at random (false).
                     */
                    cycle?: boolean;
                    /**
                     * The number of consecutive particles receiving each animation, when `cycle` is true.
                     */
                    quantity?: number;
                };

                type ParticleEmitterBounds = {
                    /**
                     * The left edge of the rectangle.
                     */
                    x: number;
                    /**
                     * The top edge of the rectangle.
                     */
                    y: number;
                    /**
                     * The width of the rectangle.
                     */
                    width: number;
                    /**
                     * The height of the rectangle.
                     */
                    height: number;
                };

                type ParticleEmitterBoundsAlt = {
                    /**
                     * The left edge of the rectangle.
                     */
                    x: number;
                    /**
                     * The top edge of the rectangle.
                     */
                    y: number;
                    /**
                     * The width of the rectangle.
                     */
                    w: number;
                    /**
                     * The height of the rectangle.
                     */
                    h: number;
                };

                type ParticleEmitterCallback = (particle: Phaser.GameObjects.Particles.Particle, emitter: Phaser.GameObjects.Particles.ParticleEmitter)=>void;

                type ParticleEmitterConfig = {
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#active}. Setting this to false will stop the emitter from running at all. If you just wish to stop particles from emitting, set `emitting` property instead.
                     */
                    active?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#blendMode}.
                     */
                    blendMode?: Phaser.BlendModes | string;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope} and {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope}.
                     */
                    callbackScope?: any;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#collideBottom}.
                     */
                    collideBottom?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#collideLeft}.
                     */
                    collideLeft?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#collideRight}.
                     */
                    collideRight?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#collideTop}.
                     */
                    collideTop?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallback}.
                     */
                    deathCallback?: Function;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope}.
                     */
                    deathCallbackScope?: any;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallback}.
                     */
                    emitCallback?: Function;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope}.
                     */
                    emitCallbackScope?: any;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#follow}.
                     */
                    follow?: Phaser.Types.Math.Vector2Like;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency}.
                     */
                    frequency?: number;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#gravityX}.
                     */
                    gravityX?: number;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#gravityY}.
                     */
                    gravityY?: number;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxParticles}.
                     */
                    maxParticles?: number;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxAliveParticles}.
                     */
                    maxAliveParticles?: number;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#name}.
                     */
                    name?: string;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#emitting}.
                     */
                    emitting?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop}.
                     */
                    particleBringToTop?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleClass}.
                     */
                    particleClass?: Function;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#radial}.
                     */
                    radial?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#timeScale}.
                     */
                    timeScale?: number;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#trackVisible}.
                     */
                    trackVisible?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#visible}.
                     */
                    visible?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationX}.
                     */
                    accelerationX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationY}.
                     */
                    accelerationY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleAlpha}.
                     */
                    alpha?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleAngle} (emit only).
                     */
                    angle?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#bounce}.
                     */
                    bounce?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#delay} (emit only).
                     */
                    delay?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#hold} (emit only).
                     */
                    hold?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#lifespan} (emit only).
                     */
                    lifespan?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX}.
                     */
                    maxVelocityX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY}.
                     */
                    maxVelocityY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToX}. If set, overrides `angle` and `speed` properties.
                     */
                    moveToX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToY}. If set, overrides `angle` and `speed` properties.
                     */
                    moveToY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity} (emit only).
                     */
                    quantity?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleRotate}.
                     */
                    rotate?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * As {@link Phaser.GameObjects.Particles.ParticleEmitter#setScale}.
                     */
                    scale?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleScaleX}.
                     */
                    scaleX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleScaleY}.
                     */
                    scaleY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * As {@link Phaser.GameObjects.Particles.ParticleEmitter#setSpeed} (emit only).
                     */
                    speed?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#speedX} (emit only).
                     */
                    speedX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#speedY} (emit only).
                     */
                    speedY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleTint}.
                     */
                    tint?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * An array of color values that the Particles interpolate through during their life. If set, overrides any `tint` property.
                     */
                    color?: number[];
                    /**
                     * The string-based name of the Easing function to use if you have enabled Particle color interpolation via the `color` property, otherwise has no effect.
                     */
                    colorEase?: string;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleX}.
                     */
                    x?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleY}.
                     */
                    y?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType;
                    /**
                     * As {@link Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone}.
                     */
                    emitZone?: Phaser.Types.GameObjects.Particles.EmitZoneData | Phaser.Types.GameObjects.Particles.EmitZoneData[];
                    /**
                     * As {@link Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone}.
                     */
                    deathZone?: Phaser.Types.GameObjects.Particles.DeathZoneObject | Phaser.Types.GameObjects.Particles.DeathZoneObject[];
                    /**
                     * As {@link Phaser.GameObjects.Particles.ParticleEmitter#setBounds}.
                     */
                    bounds?: Phaser.Types.GameObjects.Particles.ParticleEmitterBounds | Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt;
                    /**
                     * Offset coordinates that assigns to {@link Phaser.GameObjects.Particles.ParticleEmitter#followOffset}.
                     */
                    followOffset?: Phaser.Types.Math.Vector2Like;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}.
                     */
                    anim?: string | string[] | Phaser.Types.GameObjects.Particles.ParticleEmitterAnimConfig;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.
                     */
                    frame?: number | number[] | string | string[] | Phaser.Textures.Frame | Phaser.Textures.Frame[] | Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#texture}. Overrides any texture already set on the Emitter.
                     */
                    texture?: string | Phaser.Textures.Texture;
                    /**
                     * Creates specified number of inactive particles and adds them to this emitter's pool. {@link Phaser.GameObjects.Particles.ParticleEmitter#reserve}
                     */
                    reserve?: number;
                    /**
                     * If you wish to 'fast forward' the emitter in time, set this value to a number representing the amount of ms the emitter should advance. Doing so implicitly sets `emitting` to `true`.
                     */
                    advance?: number;
                    /**
                     * Limit the emitter to emit particles for a maximum of `duration` ms. Default to zero, meaning 'forever'.
                     */
                    duration?: number;
                    /**
                     * Limit the emitter to emit this exact number of particles and then stop. Default to zero, meaning no limit.
                     */
                    stopAfter?: number;
                    /**
                     * A custom callback that sorts particles prior to rendering. Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#sortCallback}.
                     */
                    sortCallback?: Phaser.Types.GameObjects.Particles.ParticleSortCallback;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#sortOrderAsc}.
                     */
                    sortOrderAsc?: boolean;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#sortProperty}.
                     */
                    sortProperty?: string;
                    /**
                     * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#tintMode}.
                     */
                    tintMode?: Phaser.TintModes;
                };

                type ParticleEmitterCreatorConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The key of the Texture this Emitter will use to render particles, as stored in the Texture Manager.
                     */
                    key?: string;
                    /**
                     * The Particle Emitter configuration object.
                     */
                    config?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig;
                };

                type ParticleEmitterDeathZoneConfig = {
                    /**
                     * A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.DeathZone#source}.
                     */
                    source: Phaser.Types.GameObjects.Particles.DeathZoneSource;
                    /**
                     * 'onEnter' or 'onLeave'.
                     */
                    type?: string;
                };

                type ParticleEmitterEdgeZoneConfig = {
                    /**
                     * A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}.
                     */
                    source: Phaser.Types.GameObjects.Particles.EdgeZoneSource;
                    /**
                     * 'edge'.
                     */
                    type: string;
                    /**
                     * The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.
                     */
                    quantity: number;
                    /**
                     * The distance between each particle. When set, `quantity` is implied and should be set to 0.
                     */
                    stepRate?: number;
                    /**
                     * Whether particles are placed from start to end and then end to start.
                     */
                    yoyo?: boolean;
                    /**
                     * Whether one endpoint will be removed if it's identical to the other.
                     */
                    seamless?: boolean;
                    /**
                     * The total number of particles this zone will emit before passing over to the next emission zone in the Emitter.
                     */
                    total?: number;
                };

                type ParticleEmitterFrameConfig = {
                    /**
                     * Array of texture frames.
                     */
                    frames?: number[] | string[] | Phaser.Textures.Frame[];
                    /**
                     * Whether texture frames will be assigned consecutively (true) or at random (false).
                     */
                    cycle?: boolean;
                    /**
                     * The number of consecutive particles receiving each texture frame, when `cycle` is true.
                     */
                    quantity?: number;
                };

                type ParticleEmitterOps = {
                    /**
                     * The accelerationX EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    accelerationX: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The accelerationY EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    accelerationY: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The alpha EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    alpha: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The angle EmitterOp instance. This is an onEmit operator only.
                     */
                    angle: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The bounce EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    bounce: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The color EmitterColorOp instance. This is an onEmit and onUpdate operator.
                     */
                    color: Phaser.GameObjects.Particles.EmitterColorOp;
                    /**
                     * The delay EmitterOp instance. This is an onEmit operator only.
                     */
                    delay: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The hold EmitterOp instance. This is an onEmit operator only.
                     */
                    hold: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The lifespan EmitterOp instance. This is an onEmit operator only.
                     */
                    lifespan: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The maxVelocityX EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    maxVelocityX: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The maxVelocityY EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    maxVelocityY: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The moveToX EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    moveToX: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The moveToY EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    moveToY: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The quantity EmitterOp instance. This is an onEmit operator only.
                     */
                    quantity: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The rotate EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    rotate: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The scaleX EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    scaleX: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The scaleY EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    scaleY: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The speedX EmitterOp instance. This is an onEmit operator only.
                     */
                    speedX: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The speedY EmitterOp instance. This is an onEmit operator only.
                     */
                    speedY: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The tint EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    tint: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The x EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    x: Phaser.GameObjects.Particles.EmitterOp;
                    /**
                     * The y EmitterOp instance. This is an onEmit and onUpdate operator.
                     */
                    y: Phaser.GameObjects.Particles.EmitterOp;
                };

                type ParticleEmitterRandomZoneConfig = {
                    /**
                     * A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.RandomZone#source}.
                     */
                    source: Phaser.Types.GameObjects.Particles.RandomZoneSource;
                    /**
                     * 'random'.
                     */
                    type?: string;
                };

                type ParticleSortCallback = (a: Phaser.GameObjects.Particles.Particle, b: Phaser.GameObjects.Particles.Particle)=>void;

                type RandomZoneSource = {
                    /**
                     * A function modifying its point argument.
                     */
                    getRandomPoint: Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback;
                };

                type RandomZoneSourceCallback = (point: Phaser.Types.Math.Vector2Like)=>void;

            }

            namespace PathFollower {
                /**
                 * Settings for a PathFollower.
                 */
                type PathConfig = {
                    /**
                     * The duration of the path follow in ms. Must be `> 0`.
                     */
                    duration?: number;
                    /**
                     * The start position of the path follow, between 0 and 1. Must be less than `to`.
                     */
                    from?: number;
                    /**
                     * The end position of the path follow, between 0 and 1. Must be more than `from`.
                     */
                    to?: number;
                    /**
                     * Whether to position the PathFollower on the Path using its path offset.
                     */
                    positionOnPath?: boolean;
                    /**
                     * Should the PathFollower automatically rotate to point in the direction of the Path?
                     */
                    rotateToPath?: boolean;
                    /**
                     * If the PathFollower is rotating to match the Path, this value is added to the rotation value. This allows you to rotate objects to a path but control the angle of the rotation as well.
                     */
                    rotationOffset?: number;
                    /**
                     * Current start position of the path follow, must be between `from` and `to`.
                     */
                    startAt?: number;
                };

            }

            namespace RenderTexture {
                type RenderTextureConfig = {
                    /**
                     * The x coordinate of the RenderTextures position.
                     */
                    x?: number;
                    /**
                     * The y coordinate of the RenderTextures position.
                     */
                    y?: number;
                    /**
                     * The width of the RenderTexture.
                     */
                    width?: number;
                    /**
                     * The height of the RenderTexture.
                     */
                    height?: number;
                };

            }

            namespace Rope {
                type RopeConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. If not given, `__DEFAULT` is used.
                     */
                    key?: string;
                    /**
                     * An optional frame from the Texture this Game Object is rendering with.
                     */
                    frame?: string | integer | null;
                    /**
                     * An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. See `setPoints` to set this post-creation.
                     */
                    points?: integer | Phaser.Types.Math.Vector2Like[];
                    /**
                     * Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)?
                     */
                    horizontal?: boolean;
                    /**
                     * An optional array containing the color data for this Rope. You should provide one color value per pair of vertices.
                     */
                    colors?: number[];
                    /**
                     * An optional array containing the alpha data for this Rope. You should provide one alpha value per pair of vertices.
                     */
                    alphas?: number[];
                };

            }

            namespace Shader {
                type ShaderConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The configuration object this Shader will use. It can also be a key that corresponds to a shader in the shader cache, which will be used as `fragmentKey` in a new config object.
                     */
                    config: string | Phaser.Types.GameObjects.Shader.ShaderQuadConfig;
                    /**
                     * The width of the Game Object.
                     */
                    width?: number;
                    /**
                     * The height of the Game Object.
                     */
                    height?: number;
                };

                type ShaderQuadConfig = {
                    /**
                     * The name of the render node. This is also used for `shaderName` if not set.
                     */
                    name: string;
                    /**
                     * The name of the shader. This is used as the stub for the internal shader name. If another shader with the same name exists, that will be used instead, so it's best to use a unique name.
                     */
                    shaderName?: string;
                    /**
                     * The fragment shader source code. This overrides anything set in `fragmentKey`.
                     */
                    fragmentSource?: string;
                    /**
                     * The vertex shader source code. This overrides anything set in `vertexKey`.
                     */
                    vertexSource?: string;
                    /**
                     * The key of the fragment shader source to use from the shader cache.
                     */
                    fragmentKey?: string;
                    /**
                     * The key of the vertex shader source to use from the shader cache.
                     */
                    vertexKey?: string;
                    /**
                     * A function that sets any uniform values that the shader needs. It takes two parameters: `setUniform` and `drawingContext`. `setUniform` is a function `(name: string, value: any) => void` that you can call to set a uniform value. `drawingContext` is the current drawing context.
                     */
                    setupUniforms?: Function;
                    /**
                     * An object containing the initial uniform values to set. The keys are the uniform names, and the values are the uniform values. This is used to set up the shader before it is rendered for the first time.
                     */
                    initialUniforms?: object;
                    /**
                     * Additional snippets to add to the shader. An advanced configuration option. You can use `updateShaderConfig` to edit these at render time, resulting in different shaders.
                     */
                    shaderAdditions?: Phaser.Types.Renderer.WebGL.ShaderAdditionConfig[];
                    /**
                     * A function that updates the shader configuration. An advanced configuration option. It takes three parameters: `drawingContext`, `gameObject`, `renderNode`. `drawingContext` is the current drawing context. `gameObject` is the object which is rendering. `renderNode` is the ShaderQuad render node which invoked the function.
                     */
                    updateShaderConfig?: Function;
                };

            }

            namespace Sprite {
                type SpriteConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                     */
                    key?: string | Phaser.Textures.Texture;
                    /**
                     * An optional frame from the Texture this Game Object is rendering with.
                     */
                    frame?: string | number;
                    /**
                     * The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object.
                     */
                    anims?: string | Phaser.Animations.Animation | Phaser.Types.Animations.PlayAnimationConfig;
                    /**
                     * This property is used exclusively by `Tilemap.createFromTiles`. Set to `true` if this Sprite is being created by a Tilemap and is part of a spritesheet.
                     */
                    useSpriteSheet?: boolean;
                };

            }

            namespace SpriteGPULayer {
                type Member = {
                    /**
                     * The x position of the member.
                     */
                    x: number | Phaser.Types.GameObjects.SpriteGPULayer.MemberAnimation;
                    /**
                     * The y position of the member.
                     */
                    y: number | Phaser.Types.GameObjects.SpriteGPULayer.MemberAnimation;
                    /**
                     * The rotation of the member.
                     */
                    rotation: number | Phaser.Types.GameObjects.SpriteGPULayer.MemberAnimation;
                    /**
                     * The x scale of the member.
                     */
                    scaleX: number | Phaser.Types.GameObjects.SpriteGPULayer.MemberAnimation;
                    /**
                     * The y scale of the member.
                     */
                    scaleY: number | Phaser.Types.GameObjects.SpriteGPULayer.MemberAnimation;
                    /**
                     * The X pivot of the frame. Default 0.5, in the range 0 to 1 across the frame. If the frame has a custom pivot, it will offset this value.
                     */
                    originX: number;
                    /**
                     * The Y pivot of the frame. Default 0.5, in the range 0 to 1 across the frame. If the frame has a custom pivot, it will offset this value.
                     */
                    originY: number;
                    /**
                     * The tint mode of the member.
                     */
                    tintMode: Phaser.TintModes;
                    /**
                     * The time the member was created. This is measured from the initialization of `layer.timeElapsed`. Use this to control members added after the layer was created.
                     */
                    creationTime: number;
                    /**
                     * The horizontal camera scroll factor of the member.
                     */
                    scrollFactorX: number;
                    /**
                     * The vertical camera scroll factor y of the member.
                     */
                    scrollFactorY: number;
                    /**
                     * The frame of the member. You can pass a frame name, the index of the frame in its texture, or a `Phaser.Types.Textures.Frame` object. The frame must exist in the texture the member is using.
                     */
                    frame: string | number | Object;
                    /**
                     * The animation to use. If not set, the member will use `frame` as a static texture.
                     */
                    animation?: string | number;
                    /**
                     * The tint blend mode of the member. 0 is no tint (equivalent to white), 1 is full tint. Use this to animate tint values, which are otherwise too complex to animate.
                     */
                    tintBlend: number | Phaser.Types.GameObjects.SpriteGPULayer.MemberAnimation;
                    /**
                     * The bottom-left tint color of the member, as a 24-bit RGB value.
                     */
                    tintBottomLeft: number;
                    /**
                     * The top-left tint color of the member, as a 24-bit RGB value.
                     */
                    tintTopLeft: number;
                    /**
                     * The bottom-right tint color of the member, as a 24-bit RGB value.
                     */
                    tintBottomRight: number;
                    /**
                     * The top-right tint color of the member, as a 24-bit RGB value.
                     */
                    tintTopRight: number;
                    /**
                     * The bottom-left alpha value of the member, in the range 0-1.
                     */
                    alphaBottomLeft: number;
                    /**
                     * The top-left alpha value of the member, in the range 0-1.
                     */
                    alphaTopLeft: number;
                    /**
                     * The bottom-right alpha value of the member, in the range 0-1.
                     */
                    alphaBottomRight: number;
                    /**
                     * The top-right alpha value of the member, in the range 0-1.
                     */
                    alphaTopRight: number;
                    /**
                     * The alpha value of the member, in the range 0-1. This multiplies all four corner alpha values, and can be animated.
                     */
                    alpha: number | Phaser.Types.GameObjects.SpriteGPULayer.MemberAnimation;
                };

                type MemberAnimation = {
                    /**
                     * The base value of the animation.
                     */
                    base?: number;
                    /**
                     * The ease value of the animation. This must be a key or value of `SpriteGPULayer.EASE`, e.g. 'Linear', 'Quad.easeIn', etc.
                     */
                    ease?: number | string;
                    /**
                     * The amplitude of the animation.
                     */
                    amplitude?: number;
                    /**
                     * The duration of the animation, in milliseconds. Must be non-negative.
                     */
                    duration?: number;
                    /**
                     * The delay of the animation, in milliseconds.
                     */
                    delay?: number;
                    /**
                     * Whether the animation loops from 0-1 (optionally using yoyo from 0-1-1), or continues beyond 1. Non-looping animations can be useful for one-off particle effects.
                     */
                    loop?: boolean;
                    /**
                     * Whether the animation runs backwards when it completes. If false, it starts over from the beginning.
                     */
                    yoyo?: boolean;
                    /**
                     * The gravity factor of the animation. This is used instead of `amplitude` if the ease is 'Gravity'.
                     */
                    gravityFactor?: number;
                    /**
                     * The velocity of the animation. Must be an integer. This is used instead of `amplitude` if the ease is 'Gravity'.
                     */
                    velocity?: number;
                };

                type SetAnimation = {
                    /**
                     * The name of the animation.
                     */
                    name: string;
                    /**
                     * An array containing the frames of the animation.
                     */
                    frames: number[] | string[];
                    /**
                     * The duration of the animation, in milliseconds. Must be non-negative.
                     */
                    duration: number;
                };

                type SpriteGPULayerConfig = {
                    /**
                     * The size of the SpriteGPULayer; the number of quads reserved in memory. This can be increased later.
                     */
                    size: number;
                    /**
                     * The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                     */
                    key?: string | Phaser.Textures.Texture;
                    /**
                     * The alpha (opacity) of the Game Object.
                     */
                    alpha?: number;
                    /**
                     * The blend mode of the GameObject.
                     */
                    blendMode?: number;
                    /**
                     * The visible state of the Game Object.
                     */
                    visible?: boolean;
                };

            }

            namespace Text {
                /**
                 * Results object from a call to GetTextSize.
                 */
                type GetTextSizeObject = {
                    /**
                     * The width of the longest line in the Text object.
                     */
                    width: number;
                    /**
                     * The height of the Text object.
                     */
                    height: number;
                    /**
                     * The number of lines in the Text object.
                     */
                    lines: number;
                    /**
                     * An array of the lines for each line in the Text object.
                     */
                    lineWidths: number[];
                    /**
                     * The line spacing of the Text object.
                     */
                    lineSpacing: number;
                    /**
                     * The height of a line factoring in font and stroke.
                     */
                    lineHeight: number;
                };

                type TextConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The text this Text object will display.
                     */
                    text?: string | string[];
                    /**
                     * The Text style configuration object.
                     */
                    style?: Phaser.Types.GameObjects.Text.TextStyle;
                    /**
                     * A Text Padding object.
                     */
                    padding?: Phaser.Types.GameObjects.Text.TextPadding;
                };

                /**
                 * Font metrics for a Text Style object.
                 */
                type TextMetrics = {
                    /**
                     * The ascent of the font.
                     */
                    ascent: number;
                    /**
                     * The descent of the font.
                     */
                    descent: number;
                    /**
                     * The size of the font.
                     */
                    fontSize: number;
                };

                /**
                 * A Text Padding configuration object as used by the Text Style.
                 */
                type TextPadding = {
                    /**
                     * If set this value is used for both the left and right padding.
                     */
                    x?: number;
                    /**
                     * If set this value is used for both the top and bottom padding.
                     */
                    y?: number;
                    /**
                     * The amount of padding added to the left of the Text object.
                     */
                    left?: number;
                    /**
                     * The amount of padding added to the right of the Text object.
                     */
                    right?: number;
                    /**
                     * The amount of padding added to the top of the Text object.
                     */
                    top?: number;
                    /**
                     * The amount of padding added to the bottom of the Text object.
                     */
                    bottom?: number;
                };

                /**
                 * A Text Shadow configuration object as used by the Text Style.
                 */
                type TextShadow = {
                    /**
                     * The horizontal offset of the shadow.
                     */
                    offsetX?: number;
                    /**
                     * The vertical offset of the shadow.
                     */
                    offsetY?: number;
                    /**
                     * The color of the shadow, given as a CSS string value.
                     */
                    color?: string;
                    /**
                     * The amount of blur applied to the shadow. Leave as zero for a hard shadow.
                     */
                    blur?: number;
                    /**
                     * Apply the shadow to the stroke effect on the Text object?
                     */
                    stroke?: boolean;
                    /**
                     * Apply the shadow to the fill effect on the Text object?
                     */
                    fill?: boolean;
                };

                /**
                 * A Text Style configuration object as used by the Text Game Object.
                 */
                type TextStyle = {
                    /**
                     * The font the Text object will render with. This is a Canvas style font string.
                     */
                    fontFamily?: string;
                    /**
                     * The font size, as a CSS size string.
                     */
                    fontSize?: number | string;
                    /**
                     * Any addition font styles, such as 'bold'.
                     */
                    fontStyle?: string;
                    /**
                     * The font family or font settings to set. Overrides the other font settings.
                     */
                    font?: string;
                    /**
                     * A solid fill color that is rendered behind the Text object. Given as a CSS string color such as `#ff0`.
                     */
                    backgroundColor?: string;
                    /**
                     * The color the Text is drawn in. Given as a CSS string color such as `#fff` or `rgb()`.
                     */
                    color?: string | CanvasGradient | CanvasPattern;
                    /**
                     * The color used to stroke the Text if the `strokeThickness` property is greater than zero.
                     */
                    stroke?: string | CanvasGradient | CanvasPattern;
                    /**
                     * The thickness of the stroke around the Text. Set to zero for no stroke.
                     */
                    strokeThickness?: number;
                    /**
                     * The Text shadow configuration object.
                     */
                    shadow?: Phaser.Types.GameObjects.Text.TextShadow;
                    /**
                     * A Text Padding object.
                     */
                    padding?: Phaser.Types.GameObjects.Text.TextPadding;
                    /**
                     * The alignment of the Text. This only impacts multi-line text. Either `left`, `right`, `center` or `justify`.
                     */
                    align?: string;
                    /**
                     * The maximum number of lines to display within the Text object.
                     */
                    maxLines?: number;
                    /**
                     * Force the Text object to have the exact width specified in this property. Leave as zero for it to change accordingly to content.
                     */
                    fixedWidth?: number;
                    /**
                     * Force the Text object to have the exact height specified in this property. Leave as zero for it to change accordingly to content.
                     */
                    fixedHeight?: number;
                    /**
                     * Sets the resolution (DPI setting) of the Text object. Leave at zero for it to use the game resolution.
                     */
                    resolution?: number;
                    /**
                     * Set to `true` if this Text object should render from right-to-left.
                     */
                    rtl?: boolean;
                    /**
                     * This is the string used to aid Canvas in calculating the height of the font.
                     */
                    testString?: string;
                    /**
                     * The amount of horizontal padding added to the width of the text when calculating the font metrics.
                     */
                    baselineX?: number;
                    /**
                     * The amount of vertical padding added to the height of the text when calculating the font metrics.
                     */
                    baselineY?: number;
                    /**
                     * The Text Word wrap configuration object.
                     */
                    wordWrap?: Phaser.Types.GameObjects.Text.TextWordWrap;
                    /**
                     * A Text Metrics object. Use this to avoid expensive font size calculations in text heavy games.
                     */
                    metrics?: Phaser.Types.GameObjects.Text.TextMetrics;
                    /**
                     * The amount to add to the font height to achieve the overall line height.
                     */
                    lineSpacing?: number;
                    /**
                     * The amount to add to the spacing between characters. Can be a negative or positive number.
                     */
                    letterSpacing?: number;
                };

                /**
                 * A Text Word Wrap configuration object as used by the Text Style configuration.
                 */
                type TextWordWrap = {
                    /**
                     * The width at which text should be considered for word-wrapping.
                     */
                    width?: number;
                    /**
                     * Provide a custom callback when word wrapping is enabled.
                     */
                    callback?: TextStyleWordWrapCallback;
                    /**
                     * The context in which the word wrap callback is invoked.
                     */
                    callbackScope?: any;
                    /**
                     * Use basic or advanced word wrapping?
                     */
                    useAdvancedWrap?: boolean;
                };

            }

            namespace TileSprite {
                type TileSpriteConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The x coordinate of the Tile Sprite.
                     */
                    x?: number;
                    /**
                     * The y coordinate of the Tile Sprite.
                     */
                    y?: number;
                    /**
                     * The width of the Tile Sprite. If zero it will use the size of the texture frame.
                     */
                    width?: number;
                    /**
                     * The height of the Tile Sprite. If zero it will use the size of the texture frame.
                     */
                    height?: number;
                    /**
                     * The key of the Texture this Tile Sprite will use to render with, as stored in the Texture Manager.
                     */
                    key?: string;
                    /**
                     * An optional frame from the Texture this Tile Sprite is rendering with.
                     */
                    frame?: number | string | Phaser.Textures.Frame;
                };

            }

            type DecomposeMatrixResults = {
                /**
                 * The translated x value.
                 */
                translateX: number;
                /**
                 * The translated y value.
                 */
                translateY: number;
                /**
                 * The rotation value.
                 */
                rotation: number;
                /**
                 * The scale x value.
                 */
                scaleX: number;
                /**
                 * The scale y value.
                 */
                scaleY: number;
            };

            type FiltersInternalExternal = {
                /**
                 * The internal filter list of the Game Object. These filters are applied first, in the local space of the Game Object.
                 */
                internal: Phaser.GameObjects.Components.FilterList;
                /**
                 * The external filter list of the Game Object. These filters are applied last, in the parent space of the Game Object.
                 */
                external: Phaser.GameObjects.Components.FilterList;
            };

            type GameObjectConfig = {
                /**
                 * The x position of the Game Object.
                 */
                x?: number | object;
                /**
                 * The y position of the Game Object.
                 */
                y?: number | object;
                /**
                 * The depth of the GameObject.
                 */
                depth?: number;
                /**
                 * The horizontally flipped state of the Game Object.
                 */
                flipX?: boolean;
                /**
                 * The vertically flipped state of the Game Object.
                 */
                flipY?: boolean;
                /**
                 * The scale of the GameObject.
                 */
                scale?: number | object | null;
                /**
                 * The scroll factor of the GameObject.
                 */
                scrollFactor?: number | object | null;
                /**
                 * The rotation angle of the Game Object, in radians.
                 */
                rotation?: number | object;
                /**
                 * The rotation angle of the Game Object, in degrees.
                 */
                angle?: number | object | null;
                /**
                 * The alpha (opacity) of the Game Object.
                 */
                alpha?: number | object;
                /**
                 * The origin of the Game Object.
                 */
                origin?: number | object | null;
                /**
                 * The scale mode of the GameObject.
                 */
                scaleMode?: number;
                /**
                 * The blend mode of the GameObject.
                 */
                blendMode?: number;
                /**
                 * The visible state of the Game Object.
                 */
                visible?: boolean;
                /**
                 * Add the GameObject to the scene.
                 */
                add?: boolean;
            };

            type GetCalcMatrixResults = {
                /**
                 * The calculated Camera external matrix (where the camera is on the screen).
                 */
                cameraExternal: Phaser.GameObjects.Components.TransformMatrix;
                /**
                 * The calculated Camera view matrix, including scroll modified by scroll factor.
                 */
                camera: Phaser.GameObjects.Components.TransformMatrix;
                /**
                 * The calculated Sprite (Game Object) matrix (world position).
                 */
                sprite: Phaser.GameObjects.Components.TransformMatrix;
                /**
                 * The calculated results matrix, factoring all others in.
                 */
                calc: Phaser.GameObjects.Components.TransformMatrix;
            };

            type JSONGameObject = {
                /**
                 * The name of this Game Object.
                 */
                name: string;
                /**
                 * A textual representation of this Game Object, i.e. `sprite`.
                 */
                type: string;
                /**
                 * The x position of this Game Object.
                 */
                x: number;
                /**
                 * The y position of this Game Object.
                 */
                y: number;
                /**
                 * The scale of this Game Object
                 */
                scale: object;
                /**
                 * The horizontal scale of this Game Object.
                 */
                "scale.x": number;
                /**
                 * The vertical scale of this Game Object.
                 */
                "scale.y": number;
                /**
                 * The origin of this Game Object.
                 */
                origin: object;
                /**
                 * The horizontal origin of this Game Object.
                 */
                "origin.x": number;
                /**
                 * The vertical origin of this Game Object.
                 */
                "origin.y": number;
                /**
                 * The horizontally flipped state of the Game Object.
                 */
                flipX: boolean;
                /**
                 * The vertically flipped state of the Game Object.
                 */
                flipY: boolean;
                /**
                 * The angle of this Game Object in radians.
                 */
                rotation: number;
                /**
                 * The alpha value of the Game Object.
                 */
                alpha: number;
                /**
                 * The visible state of the Game Object.
                 */
                visible: boolean;
                /**
                 * The Scale Mode being used by this Game Object.
                 */
                scaleMode: number;
                /**
                 * Sets the Blend Mode being used by this Game Object.
                 */
                blendMode: number | string;
                /**
                 * The texture key of this Game Object.
                 */
                textureKey: string;
                /**
                 * The frame key of this Game Object.
                 */
                frameKey: string;
                /**
                 * The data of this Game Object.
                 */
                data: object;
            };

            /**
             * A function which performs a rendering operation on the given Game Object.
             * This is usually the `renderWebGL` method of the Game Object itself,
             * but `Phaser.GameObjects.Components.RenderSteps` allows you to define
             * a series of steps that are run in sequence.
             * The function is not expected to run in any particular scope,
             * so it should not use `this`. Instead, all required properties should be
             * accessed via `gameObject`.
             */
            type RenderWebGLStep = (renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number)=>void;

            namespace Video {
                type VideoConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * Optional key of the Video this Game Object will play, as stored in the Video Cache.
                     */
                    key?: string;
                };

            }

            namespace Zone {
                type ZoneConfig = Phaser.Types.GameObjects.GameObjectConfig & {
                    /**
                     * The width of the Game Object.
                     */
                    width?: number;
                    /**
                     * The height of the Game Object.
                     */
                    height?: number;
                };

            }

        }

        namespace Geom {
        }

        namespace Input {
            namespace Gamepad {
                /**
                 * The Gamepad object, as extracted from GamepadEvent.
                 */
                type Pad = {
                    /**
                     * The ID of the Gamepad.
                     */
                    id: string;
                    /**
                     * The index of the Gamepad.
                     */
                    index: number;
                };

            }

            namespace Keyboard {
                type CursorKeys = {
                    /**
                     * A Key object mapping to the UP arrow key.
                     */
                    up: Phaser.Input.Keyboard.Key;
                    /**
                     * A Key object mapping to the DOWN arrow key.
                     */
                    down: Phaser.Input.Keyboard.Key;
                    /**
                     * A Key object mapping to the LEFT arrow key.
                     */
                    left: Phaser.Input.Keyboard.Key;
                    /**
                     * A Key object mapping to the RIGHT arrow key.
                     */
                    right: Phaser.Input.Keyboard.Key;
                    /**
                     * A Key object mapping to the SPACE BAR key.
                     */
                    space: Phaser.Input.Keyboard.Key;
                    /**
                     * A Key object mapping to the SHIFT key.
                     */
                    shift: Phaser.Input.Keyboard.Key;
                };

                type KeyComboConfig = {
                    /**
                     * If they press the wrong key do we reset the combo?
                     */
                    resetOnWrongKey?: boolean;
                    /**
                     * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled.
                     */
                    maxKeyDelay?: number;
                    /**
                     * If previously matched and they press the first key of the combo again, will it reset?
                     */
                    resetOnMatch?: boolean;
                    /**
                     * If the combo matches, will it delete itself?
                     */
                    deleteOnMatch?: boolean;
                };

                type KeyboardKeydownCallback = (event: KeyboardEvent)=>void;

            }

            /**
             * A Phaser Input Event Data object.
             * 
             * This object is passed to the registered event listeners and allows you to stop any further propagation.
             */
            type EventData = {
                /**
                 * The cancelled state of this Event.
                 */
                cancelled?: boolean;
                /**
                 * Call this method to stop this event from passing any further down the event chain.
                 */
                stopPropagation: Function;
            };

            type HitAreaCallback = (hitArea: any, x: number, y: number, gameObject: Phaser.GameObjects.GameObject)=>boolean;

            type InputConfiguration = {
                /**
                 * The object / shape to use as the Hit Area. If not given it will try to create a Rectangle based on the texture frame.
                 */
                hitArea?: any;
                /**
                 * The callback that determines if the pointer is within the Hit Area shape or not.
                 */
                hitAreaCallback?: Phaser.Types.Input.HitAreaCallback;
                /**
                 * If `true` the Interactive Object will be set to be draggable and emit drag events.
                 */
                draggable?: boolean;
                /**
                 * If `true` the Interactive Object will be set to be a drop zone for draggable objects.
                 */
                dropZone?: boolean;
                /**
                 * If `true` the Interactive Object will set the `pointer` hand cursor when a pointer is over it. This is a short-cut for setting `cursor: 'pointer'`.
                 */
                useHandCursor?: boolean;
                /**
                 * The CSS string to be used when the cursor is over this Interactive Object.
                 */
                cursor?: string;
                /**
                 * If `true` a pixel perfect function will be set for the hit area callback. Only works with image texture based Game Objects, not Render Textures.
                 */
                pixelPerfect?: boolean;
                /**
                 * If `pixelPerfect` is set, this is the alpha tolerance threshold value used in the callback. A value of 255 will match only fully opaque pixels.
                 */
                alphaTolerance?: number;
            };

            type InputPluginContainer = {
                /**
                 * The unique name of this plugin in the input plugin cache.
                 */
                key: string;
                /**
                 * The plugin to be stored. Should be the source object, not instantiated.
                 */
                plugin: Function;
                /**
                 * If this plugin is to be injected into the Input Plugin, this is the property key map used.
                 */
                mapping?: string;
            };

            type InteractiveObject = {
                /**
                 * The Game Object to which this Interactive Object is bound.
                 */
                gameObject: Phaser.GameObjects.GameObject;
                /**
                 * Is this Interactive Object currently enabled for input events?
                 */
                enabled: boolean;
                /**
                 * Is this Interactive Object draggable? Enable with `InputPlugin.setDraggable`.
                 */
                draggable: boolean;
                /**
                 * Is this Interactive Object a drag-targets drop zone? Set when the object is created.
                 */
                dropZone: boolean;
                /**
                 * Should this Interactive Object change the cursor (via css) when over? (desktop only)
                 */
                cursor: boolean | string;
                /**
                 * An optional drop target for a draggable Interactive Object.
                 */
                target: Phaser.GameObjects.GameObject | null;
                /**
                 * The most recent Camera to be tested against this Interactive Object.
                 */
                camera: Phaser.Cameras.Scene2D.Camera;
                /**
                 * The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle.
                 */
                hitArea: any;
                /**
                 * The 'contains' check callback that the hit area shape will use for all hit tests.
                 */
                hitAreaCallback: Phaser.Types.Input.HitAreaCallback;
                /**
                 * If this Interactive Object has been enabled for debug, via `InputPlugin.enableDebug` then this property holds its debug shape.
                 */
                hitAreaDebug: Phaser.GameObjects.Shape;
                /**
                 * Was the hitArea for this Interactive Object created based on texture size (false), or a custom shape? (true)
                 */
                customHitArea: boolean;
                /**
                 * The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.
                 */
                localX: number;
                /**
                 * The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.
                 */
                localY: number;
                /**
                 * The current drag state of this Interactive Object. 0 = Not being dragged, 1 = being checked for drag, or 2 = being actively dragged.
                 */
                dragState: 0 | 1 | 2;
                /**
                 * The x coordinate of the Game Object that owns this Interactive Object when the drag started.
                 */
                dragStartX: number;
                /**
                 * The y coordinate of the Game Object that owns this Interactive Object when the drag started.
                 */
                dragStartY: number;
                /**
                 * The x coordinate that the Pointer started dragging this Interactive Object from.
                 */
                dragStartXGlobal: number;
                /**
                 * The y coordinate that the Pointer started dragging this Interactive Object from.
                 */
                dragStartYGlobal: number;
                /**
                 * The x coordinate that this Interactive Object is currently being dragged to.
                 */
                dragX: number;
                /**
                 * The y coordinate that this Interactive Object is currently being dragged to.
                 */
                dragY: number;
            };

        }

        namespace Loader {
            namespace FileTypes {
                type AsepriteFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the texture image file from.
                     */
                    textureURL?: string;
                    /**
                     * The default file extension to use for the image texture if no url is provided.
                     */
                    textureExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the texture image file.
                     */
                    textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * The absolute or relative URL to load the atlas json file from. Or, a well formed JSON object to use instead.
                     */
                    atlasURL?: object | string;
                    /**
                     * The default file extension to use for the atlas json if no url is provided.
                     */
                    atlasExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the atlas json file.
                     */
                    atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type AtlasJSONFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the texture image file from.
                     */
                    textureURL?: string;
                    /**
                     * The default file extension to use for the image texture if no url is provided.
                     */
                    textureExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the texture image file.
                     */
                    textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * The filename of an associated normal map. It uses the same path and url to load as the texture image.
                     */
                    normalMap?: string;
                    /**
                     * The absolute or relative URL to load the atlas json file from. Or, a well formed JSON object to use instead.
                     */
                    atlasURL?: object | string;
                    /**
                     * The default file extension to use for the atlas json if no url is provided.
                     */
                    atlasExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the atlas json file.
                     */
                    atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type AtlasXMLFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the texture image file from.
                     */
                    textureURL?: string;
                    /**
                     * The default file extension to use for the image texture if no url is provided.
                     */
                    textureExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the texture image file.
                     */
                    textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * The filename of an associated normal map. It uses the same path and url to load as the texture image.
                     */
                    normalMap?: string;
                    /**
                     * The absolute or relative URL to load the atlas xml file from.
                     */
                    atlasURL?: string;
                    /**
                     * The default file extension to use for the atlas xml if no url is provided.
                     */
                    atlasExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the atlas xml file.
                     */
                    atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type AudioFileConfig = {
                    /**
                     * The key of the file. Must be unique within the Loader and Audio Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URLs to load the audio files from.
                     */
                    url?: string | string[] | Phaser.Types.Loader.FileTypes.AudioFileURLConfig | Phaser.Types.Loader.FileTypes.AudioFileURLConfig[];
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * The optional AudioContext this file will use to process itself.
                     */
                    context?: AudioContext;
                };

                type AudioFileURLConfig = {
                    /**
                     * The audio file format. See property names in {@link Phaser.Device.Audio}.
                     */
                    type: string;
                    /**
                     * The absolute or relative URL of the audio file.
                     */
                    url: string;
                };

                type AudioSpriteFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Audio Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.
                     */
                    jsonURL: string;
                    /**
                     * Extra XHR Settings specifically for the json file.
                     */
                    jsonXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * The absolute or relative URL to load the audio file from.
                     */
                    audioURL?: Object;
                    /**
                     * The audio configuration options.
                     */
                    audioConfig?: any;
                    /**
                     * Extra XHR Settings specifically for the audio file.
                     */
                    audioXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type BinaryFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Binary Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * Optional type to cast the binary file to once loaded. For example, `Uint8Array`.
                     */
                    dataType?: any;
                };

                type BitmapFontFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the texture image file from.
                     */
                    textureURL?: string;
                    /**
                     * The default file extension to use for the image texture if no url is provided.
                     */
                    textureExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the texture image file.
                     */
                    textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * The filename of an associated normal map. It uses the same path and url to load as the texture image.
                     */
                    normalMap?: string;
                    /**
                     * The absolute or relative URL to load the font data xml file from.
                     */
                    fontDataURL?: string;
                    /**
                     * The default file extension to use for the font data xml if no url is provided.
                     */
                    fontDataExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the font data xml file.
                     */
                    fontDataXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type CSSFileConfig = {
                    /**
                     * The key of the file. Must be unique within the Loader.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type CompressedTextureFileEntry = {
                    /**
                     * The texture compression base format that the browser must support in order to load this file. Can be any of: 'ETC', 'ETC1', 'ATC', 'ASTC', 'BPTC', 'RGTC', 'PVRTC', 'S3TC', 'S3TCSRGB' or the fallback format of 'IMG'.
                     */
                    format?: string;
                    /**
                     * The container format, either PVR or KTX. If not given it will try to extract it from the textureURL extension.
                     */
                    type?: string;
                    /**
                     * The URL of the compressed texture file to load.
                     */
                    textureURL?: string;
                    /**
                     * Optional URL of a texture atlas JSON data file. If not given, the texture will be loaded as a single image.
                     */
                    atlasURL?: string;
                    /**
                     * Optional URL of a multi-texture atlas JSON data file as created by Texture Packer Pro.
                     */
                    multiAtlasURL?: string;
                    /**
                     * Optional path to use when loading the textures defined in the multi atlas data.
                     */
                    multiPath?: string;
                    /**
                     * Optional Base URL to use when loading the textures defined in the multi atlas data.
                     */
                    multiBaseURL?: string;
                };

                type CompressedTextureFileConfig = {
                    /**
                     * The string, or file entry object, for an ETC format texture.
                     */
                    ETC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                    /**
                     * The string, or file entry object, for an ETC1 format texture.
                     */
                    ETC1?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                    /**
                     * The string, or file entry object, for an ATC format texture.
                     */
                    ATC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                    /**
                     * The string, or file entry object, for an ASTC format texture.
                     */
                    ASTC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                    /**
                     * The string, or file entry object, for an BPTC format texture.
                     */
                    BPTC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                    /**
                     * The string, or file entry object, for an RGTC format texture.
                     */
                    RGTC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                    /**
                     * The string, or file entry object, for an PVRTC format texture.
                     */
                    PVRTC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                    /**
                     * The string, or file entry object, for an S3TC format texture.
                     */
                    S3TC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                    /**
                     * The string, or file entry object, for an S3TCSRGB format texture.
                     */
                    S3TCSRGB?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                    /**
                     * The string, or file entry object, for the fallback image file.
                     */
                    IMG?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                };

                type FontFileConfig = {
                    /**
                     * The key of the file. Must be unique within the Loader.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * The font type. Should be a string, like 'truetype' or 'opentype'.
                     */
                    format?: string;
                    /**
                     * An optional object containing font descriptors for the Font Face.
                     */
                    descriptors?: object;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type GLSLFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Text Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type HTMLFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Text Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type HTMLTextureFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * The width of the texture the HTML will be rendered to.
                     */
                    width?: number;
                    /**
                     * The height of the texture the HTML will be rendered to.
                     */
                    height?: number;
                };

                type ImageFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * The filename of an associated normal map. It uses the same path and url to load as the image.
                     */
                    normalMap?: string;
                    /**
                     * The frame configuration object. Only provided for, and used by, Sprite Sheets.
                     */
                    frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type ImageFrameConfig = {
                    /**
                     * The width of the frame in pixels.
                     */
                    frameWidth: number;
                    /**
                     * The height of the frame in pixels. Uses the `frameWidth` value if not provided.
                     */
                    frameHeight?: number;
                    /**
                     * The first frame to start parsing from.
                     */
                    startFrame?: number;
                    /**
                     * The frame to stop parsing at. If not provided it will calculate the value based on the image and frame dimensions.
                     */
                    endFrame?: number;
                    /**
                     * The margin in the image. This is the space around the edge of the frames.
                     */
                    margin?: number;
                    /**
                     * The spacing between each frame in the image.
                     */
                    spacing?: number;
                };

                type JSONFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the JSON Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly added to the Cache.
                     */
                    url?: string | any;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it.
                     */
                    dataKey?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type MultiAtlasFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the multi atlas json file from. Or, a well formed JSON object.
                     */
                    atlasURL?: string;
                    /**
                     * An alias for 'atlasURL'. If given, it overrides anything set in 'atlasURL'.
                     */
                    url?: string;
                    /**
                     * The default file extension to use for the atlas json if no url is provided.
                     */
                    atlasExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the atlas json file.
                     */
                    atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * Optional path to use when loading the textures defined in the atlas data.
                     */
                    path?: string;
                    /**
                     * Optional Base URL to use when loading the textures defined in the atlas data.
                     */
                    baseURL?: string;
                    /**
                     * Extra XHR Settings specifically for the texture files.
                     */
                    textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type MultiScriptFileConfig = {
                    /**
                     * The key of the file. Must be unique within the Loader.
                     */
                    key: string;
                    /**
                     * An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.
                     */
                    url?: string[];
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for these files.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type OBJFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the OBJ Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load this file from. If undefined or `null` it will be set to `<key>.obj`, i.e. if `key` was "alien" then the URL will be "alien.obj".
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Flip the UV coordinates stored in the model data?
                     */
                    flipUV?: boolean;
                    /**
                     * An optional absolute or relative URL to the object material file from. If undefined or `null`, no material file will be loaded.
                     */
                    matURL?: string;
                    /**
                     * The default material file extension to use if no url is provided.
                     */
                    matExtension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type PCTAtlasFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the PCT atlas data file from.
                     */
                    atlasURL?: string;
                    /**
                     * An alias for 'atlasURL'. If given, it overrides anything set in 'atlasURL'.
                     */
                    url?: string;
                    /**
                     * The default file extension to use for the atlas data if no url is provided.
                     */
                    atlasExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the atlas json file.
                     */
                    atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * Optional path to use when loading the textures defined in the atlas data.
                     */
                    path?: string;
                    /**
                     * Optional Base URL to use when loading the textures defined in the atlas data.
                     */
                    baseURL?: string;
                    /**
                     * Extra XHR Settings specifically for the texture files.
                     */
                    textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type PackFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the JSON Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly processed.
                     */
                    url?: string | any;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * If specified instead of the whole JSON file being parsed, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it.
                     */
                    dataKey?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type PackFileSection = {
                    /**
                     * The files to load. See {@link Phaser.Types.Loader.FileTypes}.
                     */
                    files: Phaser.Types.Loader.FileConfig[];
                    /**
                     * A URL used to resolve paths in `files`. Example: 'http://labs.phaser.io/assets/'.
                     */
                    baseURL?: string;
                    /**
                     * The default {@link Phaser.Types.Loader.FileConfig} `type`.
                     */
                    defaultType?: string;
                    /**
                     * A URL path used to resolve relative paths in `files`. Example: 'images/sprites/'.
                     */
                    path?: string;
                    /**
                     * An optional prefix that is automatically prepended to each file key.
                     */
                    prefix?: string;
                };

                type PluginFileConfig = {
                    /**
                     * The key of the file. Must be unique within the Loader.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Automatically start the plugin after loading?
                     */
                    start?: boolean;
                    /**
                     * If this plugin is to be injected into the Scene, this is the property key used.
                     */
                    mapping?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type SVGFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * The svg size configuration object.
                     */
                    svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig;
                };

                type SVGSizeConfig = {
                    /**
                     * An optional width. The SVG will be resized to this size before being rendered to a texture.
                     */
                    width?: number;
                    /**
                     * An optional height. The SVG will be resized to this size before being rendered to a texture.
                     */
                    height?: number;
                    /**
                     * An optional scale. If given it overrides the width / height properties. The SVG is scaled by the scale factor before being rendered to a texture.
                     */
                    scale?: number;
                };

                type SceneFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Text Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type ScenePluginFileConfig = {
                    /**
                     * The key of the file. Must be unique within the Loader.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from. Or, a Scene Plugin.
                     */
                    url?: string | Function;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * If this plugin is to be added to Scene.Systems, this is the property key for it.
                     */
                    systemKey?: string;
                    /**
                     * If this plugin is to be added to the Scene, this is the property key for it.
                     */
                    sceneKey?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type ScriptFileConfig = {
                    /**
                     * The key of the file. Must be unique within the Loader.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * The script type. Should be either 'script' for classic JavaScript, or 'module' if the file contains an exported module.
                     */
                    type?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type SpriteSheetFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * The filename of an associated normal map. It uses the same path and url to load as the image.
                     */
                    normalMap?: string;
                    /**
                     * The frame configuration object.
                     */
                    frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type TextFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Text Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type TilemapCSVFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Tilemap Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type TilemapImpactFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Tilemap Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type TilemapJSONFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Tilemap Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from. Or, a well formed JSON object.
                     */
                    url?: object | string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type UnityAtlasFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Texture Manager.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the texture image file from.
                     */
                    textureURL?: string;
                    /**
                     * The default file extension to use for the image texture if no url is provided.
                     */
                    textureExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the texture image file.
                     */
                    textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                    /**
                     * The filename of an associated normal map. It uses the same path and url to load as the texture image.
                     */
                    normalMap?: string;
                    /**
                     * The absolute or relative URL to load the atlas data file from.
                     */
                    atlasURL?: string;
                    /**
                     * The default file extension to use for the atlas data if no url is provided.
                     */
                    atlasExtension?: string;
                    /**
                     * Extra XHR Settings specifically for the atlas data file.
                     */
                    atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

                type VideoFileConfig = {
                    /**
                     * The key to use for this file, or a file configuration object.
                     */
                    key: string | Phaser.Types.Loader.FileTypes.VideoFileConfig;
                    /**
                     * The absolute or relative URLs to load the video files from.
                     */
                    url?: string | string[] | Phaser.Types.Loader.FileTypes.VideoFileURLConfig | Phaser.Types.Loader.FileTypes.VideoFileURLConfig[];
                    /**
                     * Does the video have an audio track? If not you can enable auto-playing on it.
                     */
                    noAudio?: boolean;
                };

                type VideoFileURLConfig = {
                    /**
                     * The video file format. See property names in {@link Phaser.Device.Video}.
                     */
                    type: string;
                    /**
                     * The absolute or relative URL of the video file.
                     */
                    url: string;
                };

                type XMLFileConfig = {
                    /**
                     * The key of the file. Must be unique within both the Loader and the Text Cache.
                     */
                    key: string;
                    /**
                     * The absolute or relative URL to load the file from.
                     */
                    url?: string;
                    /**
                     * The default file extension to use if no url is provided.
                     */
                    extension?: string;
                    /**
                     * Extra XHR Settings specifically for this file.
                     */
                    xhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                };

            }

            type FileConfig = {
                /**
                 * The name of the Loader method that loads this file, e.g., 'image', 'json', 'spritesheet'.
                 */
                type: string;
                /**
                 * Reference to the cache instance responsible for this file type. Or false if you don't need to retrieve files from your game; e.g.: Font files tracked by the browser.
                 */
                cache: Phaser.Cache.BaseCache | false;
                /**
                 * Unique cache key (unique within its file type)
                 */
                key: string;
                /**
                 * The URL of the file, not including baseURL.
                 */
                url?: object | string;
                /**
                 * The path of the file, not including the baseURL.
                 */
                path?: string;
                /**
                 * The default extension this file uses.
                 */
                extension?: string;
                /**
                 * The responseType to be used by the XHR request.
                 */
                responseType?: XMLHttpRequestResponseType;
                /**
                 * Custom XHR Settings specific to this file and merged with the Loader defaults.
                 */
                xhrSettings?: Phaser.Types.Loader.XHRSettingsObject | false;
                /**
                 * A config object that can be used by file types to store transitional data.
                 */
                config?: any;
                /**
                 * The absolute or relative URL to load the texture image file from.
                 */
                textureURL?: string;
                /**
                 * The default file extension to use for the image texture if no url is provided.
                 */
                textureExtension?: string;
                /**
                 * Extra XHR Settings specifically for the texture image file.
                 */
                textureXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                /**
                 * The absolute or relative URL to load the atlas json file from. Or, a well formed JSON object to use instead.
                 */
                atlasURL?: object | string;
                /**
                 * The default file extension to use for the atlas json if no url is provided.
                 */
                atlasExtension?: string;
                /**
                 * Extra XHR Settings specifically for the atlas json file.
                 */
                atlasXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                /**
                 * The filename of an associated normal map. It uses the same path and url to load as the texture image.
                 */
                normalMap?: string;
                /**
                 * The optional AudioContext this file will use to process itself (only used by Sound objects).
                 */
                context?: AudioContext;
                /**
                 * The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.
                 */
                jsonURL?: string;
                /**
                 * Extra XHR Settings specifically for the json file.
                 */
                jsonXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                /**
                 * The absolute or relative URL to load the audio file from.
                 */
                audioURL?: Object;
                /**
                 * The audio configuration options.
                 */
                audioConfig?: any;
                /**
                 * Extra XHR Settings specifically for the audio file.
                 */
                audioXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                /**
                 * Optional type to cast the binary file to once loaded. For example, `Uint8Array`.
                 */
                dataType?: any;
                /**
                 * The absolute or relative URL to load the font data xml file from.
                 */
                fontDataURL?: string;
                /**
                 * The default file extension to use for the font data xml if no url is provided.
                 */
                fontDataExtension?: string;
                /**
                 * Extra XHR Settings specifically for the font data xml file.
                 */
                fontDataXhrSettings?: Phaser.Types.Loader.XHRSettingsObject;
                /**
                 * The string, or file entry object, for an ETC format texture.
                 */
                ETC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The string, or file entry object, for an ETC1 format texture.
                 */
                ETC1?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The string, or file entry object, for an ATC format texture.
                 */
                ATC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The string, or file entry object, for an ASTC format texture.
                 */
                ASTC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The string, or file entry object, for an BPTC format texture.
                 */
                BPTC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The string, or file entry object, for an RGTC format texture.
                 */
                RGTC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The string, or file entry object, for an PVRTC format texture.
                 */
                PVRTC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The string, or file entry object, for an S3TC format texture.
                 */
                S3TC?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The string, or file entry object, for an S3TCSRGB format texture.
                 */
                S3TCSRGB?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The string, or file entry object, for the fallback image file.
                 */
                IMG?: Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | string;
                /**
                 * The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle.
                 */
                shaderType?: string;
                /**
                 * The width of the texture the HTML will be rendered to.
                 */
                width?: number;
                /**
                 * The height of the texture the HTML will be rendered to.
                 */
                height?: number;
                /**
                 * The frame configuration object. Only provided for, and used by, Sprite Sheets.
                 */
                frameConfig?: Phaser.Types.Loader.FileTypes.ImageFrameConfig;
                /**
                 * If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it.
                 */
                dataKey?: string;
                /**
                 * Optional Base URL to use when loading the textures defined in the atlas data.
                 */
                baseURL?: string;
                /**
                 * Flip the UV coordinates stored in the model data?
                 */
                flipUV?: boolean;
                /**
                 * An optional absolute or relative URL to the object material file from. If undefined or `null`, no material file will be loaded.
                 */
                matURL?: string;
                /**
                 * The default material file extension to use if no url is provided.
                 */
                matExtension?: string;
                /**
                 * Automatically start the plugin after loading?
                 */
                start?: boolean;
                /**
                 * If this plugin is to be injected into the Scene, this is the property key used.
                 */
                mapping?: string;
                /**
                 * If this plugin is to be added to Scene.Systems, this is the property key for it.
                 */
                systemKey?: string;
                /**
                 * If this plugin is to be added to the Scene, this is the property key for it.
                 */
                sceneKey?: string;
                /**
                 * The svg size configuration object.
                 */
                svgConfig?: Phaser.Types.Loader.FileTypes.SVGSizeConfig;
                /**
                 * The number of times to retry the file load if it fails.
                 */
                maxRetries?: number;
            };

            type XHRSettingsObject = {
                /**
                 * The response type of the XHR request, i.e. `blob`, `text`, etc.
                 */
                responseType: XMLHttpRequestResponseType;
                /**
                 * Should the XHR request use async or not?
                 */
                async?: boolean;
                /**
                 * Optional username for the XHR request.
                 */
                user?: string;
                /**
                 * Optional password for the XHR request.
                 */
                password?: string;
                /**
                 * Optional XHR timeout value.
                 */
                timeout?: number;
                /**
                 * This value is used to populate the XHR `setRequestHeader` and is undefined by default.
                 */
                headers?: object | undefined;
                /**
                 * This value is used to populate the XHR `setRequestHeader` and is undefined by default.
                 */
                header?: string | undefined;
                /**
                 * This value is used to populate the XHR `setRequestHeader` and is undefined by default.
                 */
                headerValue?: string | undefined;
                /**
                 * This value is used to populate the XHR `setRequestHeader` and is undefined by default.
                 */
                requestedWith?: string | undefined;
                /**
                 * Provide a custom mime-type to use instead of the default.
                 */
                overrideMimeType?: string | undefined;
                /**
                 * The withCredentials property indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. Setting withCredentials has no effect on same-site requests.
                 */
                withCredentials?: boolean;
            };

        }

        namespace Math {
            type HashCellConfig = {
                /**
                 * The algorithm to use. 0 is TRIG. 1 is PCG. 2 is PCG_FLOAT.
                 */
                algorithm?: number;
                /**
                 * The number of cells in the range 0-1, on each axis (XYZW). Unused axes need not be defined.
                 */
                noiseCells?: number[];
                /**
                 * Whether to wrap the cells smoothly. If a number array, the cells repeat after that many. If `true, the wrap is set to equal `noiseCells`.
                 */
                noiseWrap?: boolean | number[];
                /**
                 * The variation of the cells away from a perfect grid. Unused axes need not be defined.
                 */
                noiseVariation?: number[];
                /**
                 * How many octaves of noise to render, creating a more detailed output.
                 */
                noiseIterations?: number;
                /**
                 * Which mode to render. 0 is sharp edged cells. 1 is flat colored cells. 2 is soft edged cells.
                 */
                noiseMode?: number;
                /**
                 * How smooth to render in mode 2.
                 */
                noiseSmoothing?: number;
                /**
                 * The seed which determines the cell pattern. A different seed creates an entirely different pattern. You only need numbers equal to the square of the input vector's length (1, 4, 9, or 16).
                 */
                noiseSeed?: number[];
            };

            type HashSimplexConfig = {
                /**
                 * The number of cells in each dimension.
                 */
                noiseCells?: number[];
                /**
                 * How many cells in each dimension before the pattern repeats. By default, this is the same as `noiseCells`.
                 */
                noisePeriod?: number[];
                /**
                 * The initial flow of the noise field. Use this to evolve the field along a period.
                 */
                noiseFlow?: number;
                /**
                 * How much turbulence to apply to the noise field.
                 */
                noiseWarpAmount?: number;
                /**
                 * How many octaves of noise to render, creating a more detailed output.
                 */
                noiseIterations?: number;
                /**
                 * How many octaves of noise to apply as turbulence, if `noiseWarpAmount` is greater than 0.
                 */
                noiseWarpIterations?: number;
                /**
                 * How much to increase detail per octave.
                 */
                noiseDetailPower?: number;
                /**
                 * How much to increase flow per octave.
                 */
                noiseFlowPower?: number;
                /**
                 * How much to shrink the contribution per octave.
                 */
                noiseContributionPower?: number;
                /**
                 * How much to increase warp detail per octave.
                 */
                noiseWarpDetailPower?: number;
                /**
                 * How much to increase warp flow per octave.
                 */
                noiseWarpFlowPower?: number;
                /**
                 * How much to shrink the warp contribution per octave.
                 */
                noiseWarpContributionPower?: number;
                /**
                 * The hash seed. Each seed creates a different pattern. The numbers must be integers.
                 */
                noiseSeed?: number[];
            };

            type RectangleLike = {
                /**
                 * The x component.
                 */
                x: number;
                /**
                 * The y component.
                 */
                y: number;
                /**
                 * The width component.
                 */
                width: number;
                /**
                 * The height component.
                 */
                height: number;
            };

            type SinCosTable = {
                /**
                 * The sine value.
                 */
                sin: number;
                /**
                 * The cosine value.
                 */
                cos: number;
                /**
                 * The length.
                 */
                length: number;
            };

            type Vector2Like = {
                /**
                 * The x component.
                 */
                x: number;
                /**
                 * The y component.
                 */
                y: number;
            };

            type Vector3Like = {
                /**
                 * The x component.
                 */
                x?: number;
                /**
                 * The y component.
                 */
                y?: number;
                /**
                 * The z component.
                 */
                z?: number;
            };

            type Vector4Like = {
                /**
                 * The x component.
                 */
                x?: number;
                /**
                 * The y component.
                 */
                y?: number;
                /**
                 * The z component.
                 */
                z?: number;
                /**
                 * The w component.
                 */
                w?: number;
            };

        }

        namespace Physics {
            namespace Arcade {
                type ArcadeBodyBounds = {
                    /**
                     * The left edge.
                     */
                    x: number;
                    /**
                     * The upper edge.
                     */
                    y: number;
                    /**
                     * The right edge.
                     */
                    right: number;
                    /**
                     * The lower edge.
                     */
                    bottom: number;
                };

                type ArcadeBodyCollision = {
                    /**
                     * True if the Body is not colliding.
                     */
                    none: boolean;
                    /**
                     * True if the Body is colliding on its upper edge.
                     */
                    up: boolean;
                    /**
                     * True if the Body is colliding on its lower edge.
                     */
                    down: boolean;
                    /**
                     * True if the Body is colliding on its left edge.
                     */
                    left: boolean;
                    /**
                     * True if the Body is colliding on its right edge.
                     */
                    right: boolean;
                };

                /**
                 * An Arcade Physics Collider Type.
                 */
                type ArcadeColliderType = Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody | Phaser.GameObjects.GameObject | Phaser.GameObjects.Group | Phaser.Physics.Arcade.Sprite | Phaser.Physics.Arcade.Image | Phaser.Physics.Arcade.StaticGroup | Phaser.Physics.Arcade.Group | Phaser.Tilemaps.TilemapLayer | (Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.Physics.Arcade.Sprite|Phaser.Physics.Arcade.Image|Phaser.Physics.Arcade.StaticGroup|Phaser.Physics.Arcade.Group|Phaser.Tilemaps.TilemapLayer)[];

                type ArcadePhysicsCallback = (object1: Phaser.Types.Physics.Arcade.GameObjectWithBody | Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody | Phaser.Tilemaps.Tile, object2: Phaser.Types.Physics.Arcade.GameObjectWithBody | Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody | Phaser.Tilemaps.Tile)=>void;

                type ArcadeWorldConfig = {
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#fps}.
                     */
                    fps?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#fixedStep}.
                     */
                    fixedStep?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#timeScale}.
                     */
                    timeScale?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#gravity}.
                     */
                    gravity?: Phaser.Types.Math.Vector2Like;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#bounds bounds.x}.
                     */
                    x?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#bounds bounds.y}.
                     */
                    y?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#bounds bounds.width}.
                     */
                    width?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#bounds bounds.height}.
                     */
                    height?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#checkCollision}.
                     */
                    checkCollision?: Phaser.Types.Physics.Arcade.CheckCollisionObject;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#OVERLAP_BIAS}.
                     */
                    overlapBias?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#TILE_BIAS}.
                     */
                    tileBias?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#forceX}.
                     */
                    forceX?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#isPaused}.
                     */
                    isPaused?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#debug}.
                     */
                    debug?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#defaults debugShowBody}.
                     */
                    debugShowBody?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#defaults debugShowStaticBody}.
                     */
                    debugShowStaticBody?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#defaults debugShowStaticBody}.
                     */
                    debugShowVelocity?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#defaults bodyDebugColor}.
                     */
                    debugBodyColor?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#defaults staticBodyDebugColor}.
                     */
                    debugStaticBodyColor?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#defaults velocityDebugColor}.
                     */
                    debugVelocityColor?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#maxEntries}.
                     */
                    maxEntries?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.World#useTree}.
                     */
                    useTree?: boolean;
                    /**
                     * If enabled, you need to call `World.update` yourself.
                     */
                    customUpdate?: boolean;
                };

                type ArcadeWorldDefaults = {
                    /**
                     * Set to `true` to render dynamic body outlines to the debug display.
                     */
                    debugShowBody: boolean;
                    /**
                     * Set to `true` to render static body outlines to the debug display.
                     */
                    debugShowStaticBody: boolean;
                    /**
                     * Set to `true` to render body velocity markers to the debug display.
                     */
                    debugShowVelocity: boolean;
                    /**
                     * The color of dynamic body outlines when rendered to the debug display.
                     */
                    bodyDebugColor: number;
                    /**
                     * The color of static body outlines when rendered to the debug display.
                     */
                    staticBodyDebugColor: number;
                    /**
                     * The color of the velocity markers when rendered to the debug display.
                     */
                    velocityDebugColor: number;
                };

                type ArcadeWorldTreeMinMax = {
                    /**
                     * The minimum x value used in RTree searches.
                     */
                    minX: number;
                    /**
                     * The minimum y value used in RTree searches.
                     */
                    minY: number;
                    /**
                     * The maximum x value used in RTree searches.
                     */
                    maxX: number;
                    /**
                     * The maximum y value used in RTree searches.
                     */
                    maxY: number;
                };

                type CheckCollisionObject = {
                    /**
                     * Will bodies collide with the top side of the world bounds?
                     */
                    up: boolean;
                    /**
                     * Will bodies collide with the bottom side of the world bounds?
                     */
                    down: boolean;
                    /**
                     * Will bodies collide with the left side of the world bounds?
                     */
                    left: boolean;
                    /**
                     * Will bodies collide with the right side of the world bounds?
                     */
                    right: boolean;
                };

                type GameObjectWithBody = Phaser.GameObjects.GameObject & {
                    body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody;
                };

                type GameObjectWithDynamicBody = Phaser.GameObjects.GameObject & {
                    body: Phaser.Physics.Arcade.Body;
                };

                type GameObjectWithStaticBody = Phaser.GameObjects.GameObject & {
                    body: Phaser.Physics.Arcade.StaticBody;
                };

                type ImageWithDynamicBody = Phaser.Physics.Arcade.Image & {
                    body: Phaser.Physics.Arcade.Body;
                };

                type ImageWithStaticBody = Phaser.Physics.Arcade.Image & {
                    body: Phaser.Physics.Arcade.StaticBody;
                };

                type PhysicsGroupConfig = Phaser.Types.GameObjects.Group.GroupConfig & {
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#collideWorldBounds}.
                     */
                    collideWorldBounds?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#setBoundsRectangle setBoundsRectangle}.
                     */
                    customBoundsRectangle?: Phaser.Geom.Rectangle;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#acceleration acceleration.x}.
                     */
                    accelerationX?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#acceleration acceleration.y}.
                     */
                    accelerationY?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#allowDrag}.
                     */
                    allowDrag?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#allowGravity}.
                     */
                    allowGravity?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#allowRotation}.
                     */
                    allowRotation?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#useDamping useDamping}.
                     */
                    useDamping?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#bounce bounce.x}.
                     */
                    bounceX?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#bounce bounce.y}.
                     */
                    bounceY?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#drag drag.x}.
                     */
                    dragX?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#drag drag.y}.
                     */
                    dragY?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#enable enable}.
                     */
                    enable?: boolean;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#gravity gravity.x}.
                     */
                    gravityX?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#gravity gravity.y}.
                     */
                    gravityY?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#friction friction.x}.
                     */
                    frictionX?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#friction friction.y}.
                     */
                    frictionY?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#maxSpeed maxSpeed}.
                     */
                    maxSpeed?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#maxVelocity maxVelocity.x}.
                     */
                    maxVelocityX?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#maxVelocity maxVelocity.y}.
                     */
                    maxVelocityY?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#velocity velocity.x}.
                     */
                    velocityX?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#velocity velocity.y}.
                     */
                    velocityY?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#angularVelocity}.
                     */
                    angularVelocity?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#angularAcceleration}.
                     */
                    angularAcceleration?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#angularDrag}.
                     */
                    angularDrag?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#mass}.
                     */
                    mass?: number;
                    /**
                     * Sets {@link Phaser.Physics.Arcade.Body#immovable}.
                     */
                    immovable?: boolean;
                };

                type PhysicsGroupDefaults = {
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setCollideWorldBounds}.
                     */
                    setCollideWorldBounds: boolean;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setBoundsRectangle}.
                     */
                    setBoundsRectangle: Phaser.Geom.Rectangle;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setAccelerationX}.
                     */
                    setAccelerationX: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setAccelerationY}.
                     */
                    setAccelerationY: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setAllowDrag}.
                     */
                    setAllowDrag: boolean;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setAllowGravity}.
                     */
                    setAllowGravity: boolean;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setAllowRotation}.
                     */
                    setAllowRotation: boolean;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setDamping}.
                     */
                    setDamping: boolean;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setBounceX}.
                     */
                    setBounceX: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setBounceY}.
                     */
                    setBounceY: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setDragX}.
                     */
                    setDragX: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setDragY}.
                     */
                    setDragY: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setEnable}.
                     */
                    setEnable: boolean;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setGravityX}.
                     */
                    setGravityX: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setGravityY}.
                     */
                    setGravityY: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setFrictionX}.
                     */
                    setFrictionX: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setFrictionY}.
                     */
                    setFrictionY: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setMaxSpeed}.
                     */
                    setMaxSpeed: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setVelocityX}.
                     */
                    setVelocityX: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setVelocityY}.
                     */
                    setVelocityY: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setAngularVelocity}.
                     */
                    setAngularVelocity: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setAngularAcceleration}.
                     */
                    setAngularAcceleration: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setAngularDrag}.
                     */
                    setAngularDrag: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setMass}.
                     */
                    setMass: number;
                    /**
                     * As {@link Phaser.Physics.Arcade.Body#setImmovable}.
                     */
                    setImmovable: boolean;
                };

                type SpriteWithDynamicBody = Phaser.Physics.Arcade.Sprite & {
                    body: Phaser.Physics.Arcade.Body;
                };

                type SpriteWithStaticBody = Phaser.Physics.Arcade.Sprite & {
                    body: Phaser.Physics.Arcade.StaticBody;
                };

            }

            namespace Matter {
                type MatterBody = MatterJS.BodyType | Phaser.GameObjects.GameObject | Phaser.Physics.Matter.Image | Phaser.Physics.Matter.Sprite | Phaser.Physics.Matter.TileBody;

                type MatterBodyConfig = {
                    /**
                     * An arbitrary string-based name to help identify this body.
                     */
                    label?: string;
                    /**
                     * Set this Game Object to create and use a new Body based on the configuration object given.
                     */
                    shape?: string | Phaser.Types.Physics.Matter.MatterSetBodyConfig;
                    /**
                     * An array of bodies that make up this body. The first body in the array must always be a self reference to the current body instance. All bodies in the `parts` array together form a single rigid compound body.
                     */
                    parts?: MatterJS.BodyType[];
                    /**
                     * An object reserved for storing plugin-specific properties.
                     */
                    plugin?: any;
                    /**
                     * An object for storing wrap boundaries.
                     */
                    wrapBounds?: any;
                    /**
                     * A number specifying the angle of the body, in radians.
                     */
                    angle?: number;
                    /**
                     * An array of `Vector` objects that specify the convex hull of the rigid body. These should be provided about the origin `(0, 0)`.
                     */
                    vertices?: Phaser.Types.Math.Vector2Like[];
                    /**
                     * A `Vector` that specifies the current world-space position of the body.
                     */
                    position?: Phaser.Types.Math.Vector2Like;
                    /**
                     * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`.
                     */
                    force?: Phaser.Types.Math.Vector2Like;
                    /**
                     * A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`.
                     */
                    torque?: number;
                    /**
                     * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically.
                     */
                    isSensor?: boolean;
                    /**
                     * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed.
                     */
                    isStatic?: boolean;
                    /**
                     * A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine).
                     */
                    sleepThreshold?: number;
                    /**
                     * A `Number` that defines the density of the body, that is its mass per unit area. If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object. This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood).
                     */
                    density?: number;
                    /**
                     * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`.
                     */
                    restitution?: number;
                    /**
                     * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`. A value of `0` means that the body may slide indefinitely. A value of `1` means the body may come to a stop almost instantly after a force is applied.
                     */
                    friction?: number;
                    /**
                     * A `Number` that defines the static friction of the body (in the Coulomb friction model). A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used. The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary. This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction.
                     */
                    frictionStatic?: number;
                    /**
                     * A `Number` that defines the air friction of the body (air resistance). A value of `0` means the body will never slow as it moves through space. The higher the value, the faster a body slows when moving through space.
                     */
                    frictionAir?: number;
                    /**
                     * An `Object` that specifies the collision filtering properties of this body.
                     */
                    collisionFilter?: Phaser.Types.Physics.Matter.MatterCollisionFilter;
                    /**
                     * A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies. Avoid changing this value unless you understand the purpose of `slop` in physics engines. The default should generally suffice, although very large bodies may require larger values for stable stacking.
                     */
                    slop?: number;
                    /**
                     * A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed.
                     */
                    timeScale?: number;
                    /**
                     * A number, or array of numbers, to chamfer the vertices of the body, or a full Chamfer configuration object.
                     */
                    chamfer?: number | number[] | Phaser.Types.Physics.Matter.MatterChamferConfig;
                    /**
                     * The radius of this body if a circle.
                     */
                    circleRadius?: number;
                    /**
                     * A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead. If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`).
                     */
                    mass?: number;
                    /**
                     * A `Number` that defines the inverse mass of the body (`1 / mass`). If you modify this value, you must also modify the `body.mass` property.
                     */
                    inverseMass?: number;
                    /**
                     * A `Vector` that specifies the initial scale of the body.
                     */
                    scale?: Phaser.Types.Math.Vector2Like;
                    /**
                     * A `Vector` that scales the influence of World gravity when applied to this body.
                     */
                    gravityScale?: Phaser.Types.Math.Vector2Like;
                    /**
                     * A boolean that toggles if this body should ignore world gravity or not.
                     */
                    ignoreGravity?: boolean;
                    /**
                     * A boolean that toggles if this body should ignore pointer / mouse constraints or not.
                     */
                    ignorePointer?: boolean;
                    /**
                     * The Debug Render configuration object for this body.
                     */
                    render?: Phaser.Types.Physics.Matter.MatterBodyRenderConfig;
                    /**
                     * A callback that is invoked when this Body starts colliding with any other Body. You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`.
                     */
                    onCollideCallback?: Function;
                    /**
                     * A callback that is invoked when this Body stops colliding with any other Body. You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`.
                     */
                    onCollideEndCallback?: Function;
                    /**
                     * A callback that is invoked for the duration that this Body is colliding with any other Body. You can register callbacks by providing a function of type `( pair: Matter.Pair) => void`.
                     */
                    onCollideActiveCallback?: Function;
                    /**
                     * A collision callback dictionary used by the `Body.setOnCollideWith` function.
                     */
                    onCollideWith?: any;
                };

                type MatterBodyRenderConfig = {
                    /**
                     * Should this body be rendered by the Debug Renderer?
                     */
                    visible?: boolean;
                    /**
                     * The opacity of the body and all parts within it.
                     */
                    opacity?: number;
                    /**
                     * The color value of the fill when rendering this body.
                     */
                    fillColor?: number;
                    /**
                     * The opacity of the fill when rendering this body, a value between 0 and 1.
                     */
                    fillOpacity?: number;
                    /**
                     * The color value of the line stroke when rendering this body.
                     */
                    lineColor?: number;
                    /**
                     * The opacity of the line when rendering this body, a value between 0 and 1.
                     */
                    lineOpacity?: number;
                    /**
                     * If rendering lines, the thickness of the line.
                     */
                    lineThickness?: number;
                    /**
                     * Controls the offset between the body and the parent Game Object, if it has one.
                     */
                    sprite?: object;
                    /**
                     * The horizontal offset between the body and the parent Game Object texture, if it has one.
                     */
                    "sprite.xOffset"?: number;
                    /**
                     * The vertical offset between the body and the parent Game Object texture, if it has one.
                     */
                    "sprite.yOffset"?: number;
                };

                type MatterBodyTileOptions = {
                    /**
                     * Whether or not the newly created body should be made static. This defaults to true since typically tiles should not be moved.
                     */
                    isStatic?: boolean;
                    /**
                     * Whether or not to add the newly created body (or existing body if options.body is used) to the Matter world.
                     */
                    addToWorld?: boolean;
                };

                type MatterChamferConfig = {
                    /**
                     * A single number, or an array, to specify the radius for each vertex.
                     */
                    radius?: number | number[];
                    /**
                     * The quality of the chamfering. -1 means 'auto'.
                     */
                    quality?: number;
                    /**
                     * The minimum quality of the chamfering. The higher this value, the more vertices are created.
                     */
                    qualityMin?: number;
                    /**
                     * The maximum quality of the chamfering. The higher this value, the more vertices are created.
                     */
                    qualityMax?: number;
                };

                type MatterCollisionData = {
                    /**
                     * Have the pair collided or not?
                     */
                    collided: boolean;
                    /**
                     * A reference to the first body involved in the collision.
                     */
                    bodyA: MatterJS.BodyType;
                    /**
                     * A reference to the second body involved in the collision.
                     */
                    bodyB: MatterJS.BodyType;
                    /**
                     * A reference to the dominant axis body.
                     */
                    axisBody: MatterJS.BodyType;
                    /**
                     * The index of the dominant collision axis vector (edge normal)
                     */
                    axisNumber: number;
                    /**
                     * The depth of the collision on the minimum overlap.
                     */
                    depth: number;
                    /**
                     * A reference to the parent of Body A, or to Body A itself if it has no parent.
                     */
                    parentA: MatterJS.BodyType;
                    /**
                     * A reference to the parent of Body B, or to Body B itself if it has no parent.
                     */
                    parentB: MatterJS.BodyType;
                    /**
                     * The collision normal, facing away from Body A.
                     */
                    normal: MatterJS.Vector;
                    /**
                     * The tangent of the collision normal.
                     */
                    tangent: MatterJS.Vector;
                    /**
                     * The penetration distances between the two bodies.
                     */
                    penetration: MatterJS.Vector;
                    /**
                     * An array of support points, either exactly one or two points.
                     */
                    supports: MatterJS.Vector[];
                    /**
                     * The resulting inverse mass from the collision.
                     */
                    inverseMass: number;
                    /**
                     * The resulting friction from the collision.
                     */
                    friction: number;
                    /**
                     * The resulting static friction from the collision.
                     */
                    frictionStatic: number;
                    /**
                     * The resulting restitution from the collision.
                     */
                    restitution: number;
                    /**
                     * The resulting slop from the collision.
                     */
                    slop: number;
                };

                /**
                 * An `Object` that specifies the collision filtering properties of this body.
                 * 
                 * Collisions between two bodies will obey the following rules:
                 * - If the two bodies have the same non-zero value of `collisionFilter.group`,
                 *   they will always collide if the value is positive, and they will never collide
                 *   if the value is negative.
                 * - If the two bodies have different values of `collisionFilter.group` or if one
                 *   (or both) of the bodies has a value of 0, then the category/mask rules apply as follows:
                 * 
                 * Each body belongs to a collision category, given by `collisionFilter.category`. This
                 * value is used as a bit field and the category should have only one bit set, meaning that
                 * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32
                 * different collision categories available.
                 * 
                 * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies
                 * the categories it collides with (the value is the bitwise AND value of all these categories).
                 * 
                 * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's
                 * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0`
                 * are both true.
                 */
                type MatterCollisionFilter = {
                    /**
                     * A bit field that specifies the collision category this body belongs to. The category value should have only one bit set, for example `0x0001`. This means there are up to 32 unique collision categories available.
                     */
                    category?: number;
                    /**
                     * A bit mask that specifies the collision categories this body may collide with.
                     */
                    mask?: number;
                    /**
                     * An Integer `Number`, that specifies the collision group this body belongs to.
                     */
                    group?: number;
                };

                type MatterCollisionPair = {
                    /**
                     * The unique auto-generated collision pair id. A combination of the body A and B IDs.
                     */
                    id: string;
                    /**
                     * A reference to the first body involved in the collision.
                     */
                    bodyA: MatterJS.BodyType;
                    /**
                     * A reference to the second body involved in the collision.
                     */
                    bodyB: MatterJS.BodyType;
                    /**
                     * An array containing all of the active contacts between bodies A and B.
                     */
                    contacts: MatterJS.Vector[];
                    /**
                     * The amount of separation that occurred between bodies A and B.
                     */
                    separation: number;
                    /**
                     * Is the collision still active or not?
                     */
                    isActive: boolean;
                    /**
                     * Has Matter determined the collision are being active yet?
                     */
                    confirmedActive: boolean;
                    /**
                     * Is either body A or B a sensor?
                     */
                    isSensor: boolean;
                    /**
                     * The timestamp when the collision pair was created.
                     */
                    timeCreated: number;
                    /**
                     * The timestamp when the collision pair was most recently updated.
                     */
                    timeUpdated: number;
                    /**
                     * The collision data object.
                     */
                    collision: Phaser.Types.Physics.Matter.MatterCollisionData;
                    /**
                     * The resulting inverse mass from the collision.
                     */
                    inverseMass: number;
                    /**
                     * The resulting friction from the collision.
                     */
                    friction: number;
                    /**
                     * The resulting static friction from the collision.
                     */
                    frictionStatic: number;
                    /**
                     * The resulting restitution from the collision.
                     */
                    restitution: number;
                    /**
                     * The resulting slop from the collision.
                     */
                    slop: number;
                };

                type MatterConstraintConfig = {
                    /**
                     * An arbitrary string-based name to help identify this constraint.
                     */
                    label?: string;
                    /**
                     * The first possible `Body` that this constraint is attached to.
                     */
                    bodyA?: MatterJS.BodyType;
                    /**
                     * The second possible `Body` that this constraint is attached to.
                     */
                    bodyB?: MatterJS.BodyType;
                    /**
                     * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position.
                     */
                    pointA?: Phaser.Types.Math.Vector2Like;
                    /**
                     * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position.
                     */
                    pointB?: Phaser.Types.Math.Vector2Like;
                    /**
                     * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts like a soft spring.
                     */
                    stiffness?: number;
                    /**
                     * A `Number` that specifies the angular stiffness of the constraint.
                     */
                    angularStiffness?: number;
                    /**
                     * The angleA of the constraint. If bodyA is set, the angle of bodyA is used instead.
                     */
                    angleA?: number;
                    /**
                     * The angleB of the constraint. If bodyB is set, the angle of bodyB is used instead.
                     */
                    angleB?: number;
                    /**
                     * A `Number` that specifies the damping of the constraint, i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. Damping will only be apparent when the constraint also has a very low `stiffness`. A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation. A value of `0` means the constraint will apply no damping.
                     */
                    damping?: number;
                    /**
                     * A `Number` that specifies the target resting length of the constraint. It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.
                     */
                    length?: number;
                    /**
                     * An object reserved for storing plugin-specific properties.
                     */
                    plugin?: any;
                    /**
                     * The Debug Render configuration object for this constraint.
                     */
                    render?: Phaser.Types.Physics.Matter.MatterConstraintRenderConfig;
                };

                type MatterConstraintRenderConfig = {
                    /**
                     * Should this constraint be rendered by the Debug Renderer?
                     */
                    visible?: boolean;
                    /**
                     * If this constraint has anchors, should they be rendered? Pin constraints never have anchors.
                     */
                    anchors?: boolean;
                    /**
                     * The color value of the line stroke when rendering this constraint.
                     */
                    lineColor?: number;
                    /**
                     * The opacity of the line when rendering this constraint, a value between 0 and 1.
                     */
                    lineOpacity?: number;
                    /**
                     * If rendering lines, the thickness of the line.
                     */
                    lineThickness?: number;
                    /**
                     * The size of the circles drawn when rendering pin constraints.
                     */
                    pinSize?: number;
                    /**
                     * The size of the circles drawn as the constraint anchors.
                     */
                    anchorSize?: number;
                    /**
                     * The color value of constraint anchors.
                     */
                    anchorColor?: number;
                };

                type MatterDebugConfig = {
                    /**
                     * Render all of the body axes?
                     */
                    showAxes?: boolean;
                    /**
                     * Render just a single body axis?
                     */
                    showAngleIndicator?: boolean;
                    /**
                     * The color of the body angle / axes lines.
                     */
                    angleColor?: number;
                    /**
                     * Render the broadphase grid?
                     */
                    showBroadphase?: boolean;
                    /**
                     * The color of the broadphase grid.
                     */
                    broadphaseColor?: number;
                    /**
                     * Render the bounds of the bodies in the world?
                     */
                    showBounds?: boolean;
                    /**
                     * The color of the body bounds.
                     */
                    boundsColor?: number;
                    /**
                     * Render the velocity of the bodies in the world?
                     */
                    showVelocity?: boolean;
                    /**
                     * The color of the body velocity line.
                     */
                    velocityColor?: number;
                    /**
                     * Render the collision points and normals for colliding pairs.
                     */
                    showCollisions?: boolean;
                    /**
                     * The color of the collision points.
                     */
                    collisionColor?: number;
                    /**
                     * Render lines showing the separation between bodies.
                     */
                    showSeparation?: boolean;
                    /**
                     * The color of the body separation line.
                     */
                    separationColor?: number;
                    /**
                     * Render the dynamic bodies in the world to the Graphics object?
                     */
                    showBody?: boolean;
                    /**
                     * Render the static bodies in the world to the Graphics object?
                     */
                    showStaticBody?: boolean;
                    /**
                     * When rendering bodies, render the internal edges as well?
                     */
                    showInternalEdges?: boolean;
                    /**
                     * Render the bodies using a fill color.
                     */
                    renderFill?: boolean;
                    /**
                     * Render the bodies using a line stroke.
                     */
                    renderLine?: boolean;
                    /**
                     * The color value of the fill when rendering dynamic bodies.
                     */
                    fillColor?: number;
                    /**
                     * The opacity of the fill when rendering dynamic bodies, a value between 0 and 1.
                     */
                    fillOpacity?: number;
                    /**
                     * The color value of the line stroke when rendering dynamic bodies.
                     */
                    lineColor?: number;
                    /**
                     * The opacity of the line when rendering dynamic bodies, a value between 0 and 1.
                     */
                    lineOpacity?: number;
                    /**
                     * If rendering lines, the thickness of the line.
                     */
                    lineThickness?: number;
                    /**
                     * The color value of the fill when rendering static bodies.
                     */
                    staticFillColor?: number;
                    /**
                     * The color value of the line stroke when rendering static bodies.
                     */
                    staticLineColor?: number;
                    /**
                     * Render any sleeping bodies (dynamic or static) in the world to the Graphics object?
                     */
                    showSleeping?: boolean;
                    /**
                     * The amount to multiply the opacity of sleeping static bodies by.
                     */
                    staticBodySleepOpacity?: number;
                    /**
                     * The color value of the fill when rendering sleeping dynamic bodies.
                     */
                    sleepFillColor?: number;
                    /**
                     * The color value of the line stroke when rendering sleeping dynamic bodies.
                     */
                    sleepLineColor?: number;
                    /**
                     * Render bodies or body parts that are flagged as being a sensor?
                     */
                    showSensors?: boolean;
                    /**
                     * The fill color when rendering body sensors.
                     */
                    sensorFillColor?: number;
                    /**
                     * The line color when rendering body sensors.
                     */
                    sensorLineColor?: number;
                    /**
                     * Render the position of non-static bodies?
                     */
                    showPositions?: boolean;
                    /**
                     * The size of the rectangle drawn when rendering the body position.
                     */
                    positionSize?: number;
                    /**
                     * The color value of the rectangle drawn when rendering the body position.
                     */
                    positionColor?: number;
                    /**
                     * Render all world constraints to the Graphics object?
                     */
                    showJoint?: boolean;
                    /**
                     * The color value of joints when `showJoint` is set.
                     */
                    jointColor?: number;
                    /**
                     * The line opacity when rendering joints, a value between 0 and 1.
                     */
                    jointLineOpacity?: number;
                    /**
                     * The line thickness when rendering joints.
                     */
                    jointLineThickness?: number;
                    /**
                     * The size of the circles drawn when rendering pin constraints.
                     */
                    pinSize?: number;
                    /**
                     * The color value of the circles drawn when rendering pin constraints.
                     */
                    pinColor?: number;
                    /**
                     * The color value of spring constraints.
                     */
                    springColor?: number;
                    /**
                     * The color value of constraint anchors.
                     */
                    anchorColor?: number;
                    /**
                     * The size of the circles drawn as the constraint anchors.
                     */
                    anchorSize?: number;
                    /**
                     * When rendering polygon bodies, render the convex hull as well?
                     */
                    showConvexHulls?: boolean;
                    /**
                     * The color value of hulls when `showConvexHulls` is set.
                     */
                    hullColor?: number;
                };

                /**
                 * Configuration for the Matter Physics Runner.
                 * 
                 * Set only one of `fps` and `delta`.
                 * 
                 * `delta` is the size of the Runner's fixed time step (one physics update).
                 * The "frame delta" is the time elapsed since the last game step.
                 * Depending on the size of the frame delta, the Runner makes zero or more updates per game step.
                 */
                type MatterRunnerConfig = {
                    /**
                     * The number of physics updates per second. If set, this overrides `delta`.
                     */
                    fps?: number;
                    /**
                     * The size of the update time step in milliseconds. If `fps` is set, it overrides `delta`.
                     */
                    delta?: number;
                    /**
                     * Whether to smooth the frame delta values.
                     */
                    frameDeltaSmoothing?: boolean;
                    /**
                     * Whether to round the frame delta values to the nearest 1 Hz.
                     */
                    frameDeltaSnapping?: boolean;
                    /**
                     * The number of frame delta values to record, when smoothing is enabled. The 10th to 90th percentiles are sampled.
                     */
                    frameDeltaHistorySize?: number;
                    /**
                     * The maximum number of updates per frame.
                     */
                    maxUpdates?: number;
                    /**
                     * The maximum amount of time to simulate in one frame, in milliseconds.
                     */
                    maxFrameTime?: number;
                    /**
                     * Whether the Matter Runner is enabled.
                     */
                    enabled?: boolean;
                };

                type MatterSetBodyConfig = {
                    /**
                     * The shape type. Either `rectangle`, `circle`, `trapezoid`, `polygon`, `fromVertices`, `fromVerts` or `fromPhysicsEditor`.
                     */
                    type?: string;
                    /**
                     * The horizontal world position to place the body at.
                     */
                    x?: number;
                    /**
                     * The vertical world position to place the body at.
                     */
                    y?: number;
                    /**
                     * The width of the body.
                     */
                    width?: number;
                    /**
                     * The height of the body.
                     */
                    height?: number;
                    /**
                     * The radius of the body. Used by `circle` and `polygon` shapes.
                     */
                    radius?: number;
                    /**
                     * The max sizes of the body. Used by the `circle` shape.
                     */
                    maxSides?: number;
                    /**
                     * Used by the `trapezoid` shape. The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.
                     */
                    slope?: number;
                    /**
                     * Used by the `polygon` shape. The number of sides the polygon will have.
                     */
                    sides?: number;
                    /**
                     * Used by the `fromVerts` shape. The vertices data. Either a path string or an array of vertices.
                     */
                    verts?: string | any[];
                    /**
                     * Used by the `fromVerts` shape. Flag internal edges (coincident part edges)
                     */
                    flagInternal?: boolean;
                    /**
                     * Used by the `fromVerts` shape. Whether Matter.js will discard collinear edges (to improve performance).
                     */
                    removeCollinear?: number;
                    /**
                     * Used by the `fromVerts` shape. During decomposition discard parts that have an area less than this.
                     */
                    minimumArea?: number;
                    /**
                     * Should the new body be automatically added to the world?
                     */
                    addToWorld?: boolean;
                };

                type MatterTileOptions = {
                    /**
                     * An existing Matter body to be used instead of creating a new one.
                     */
                    body?: MatterJS.BodyType;
                    /**
                     * Whether or not the newly created body should be made static. This defaults to true since typically tiles should not be moved.
                     */
                    isStatic?: boolean;
                    /**
                     * Whether or not to add the newly created body (or existing body if options.body is used) to the Matter world.
                     */
                    addToWorld?: boolean;
                };

                type MatterWalls = {
                    /**
                     * The left wall for the Matter World.
                     */
                    left?: MatterJS.BodyType;
                    /**
                     * The right wall for the Matter World.
                     */
                    right?: MatterJS.BodyType;
                    /**
                     * The top wall for the Matter World.
                     */
                    top?: MatterJS.BodyType;
                    /**
                     * The bottom wall for the Matter World.
                     */
                    bottom?: MatterJS.BodyType;
                };

                type MatterWorldConfig = {
                    /**
                     * Sets {@link Phaser.Physics.Matter.World#gravity}.
                     */
                    gravity?: Phaser.Types.Math.Vector2Like;
                    /**
                     * Should the world have bounds enabled by default?
                     */
                    setBounds?: object | boolean;
                    /**
                     * The x coordinate of the world bounds.
                     */
                    "setBounds.x"?: number;
                    /**
                     * The y coordinate of the world bounds.
                     */
                    "setBounds.y"?: number;
                    /**
                     * The width of the world bounds.
                     */
                    "setBounds.width"?: number;
                    /**
                     * The height of the world bounds.
                     */
                    "setBounds.height"?: number;
                    /**
                     * The thickness of the walls of the world bounds.
                     */
                    "setBounds.thickness"?: number;
                    /**
                     * Should the left-side world bounds wall be created?
                     */
                    "setBounds.left"?: boolean;
                    /**
                     * Should the right-side world bounds wall be created?
                     */
                    "setBounds.right"?: boolean;
                    /**
                     * Should the top world bounds wall be created?
                     */
                    "setBounds.top"?: boolean;
                    /**
                     * Should the bottom world bounds wall be created?
                     */
                    "setBounds.bottom"?: boolean;
                    /**
                     * The number of position iterations to perform each update. The higher the value, the higher quality the simulation will be at the expense of performance.
                     */
                    positionIterations?: number;
                    /**
                     * The number of velocity iterations to perform each update. The higher the value, the higher quality the simulation will be at the expense of performance.
                     */
                    velocityIterations?: number;
                    /**
                     * The number of constraint iterations to perform each update. The higher the value, the higher quality the simulation will be at the expense of performance.
                     */
                    constraintIterations?: number;
                    /**
                     * A flag that specifies whether the engine should allow sleeping via the `Matter.Sleeping` module. Sleeping can improve stability and performance, but often at the expense of accuracy.
                     */
                    enableSleeping?: boolean;
                    /**
                     * A `Number` that specifies the current simulation-time in milliseconds starting from `0`. It is incremented on every `Engine.update` by the given `delta` argument.
                     */
                    "timing.timestamp"?: number;
                    /**
                     * A `Number` that specifies the global scaling factor of time for all bodies. A value of `0` freezes the simulation. A value of `0.1` gives a slow-motion effect. A value of `1.2` gives a speed-up effect.
                     */
                    "timing.timeScale"?: number;
                    /**
                     * Toggles if the world is enabled or not.
                     */
                    enabled?: boolean;
                    /**
                     * An optional Number that specifies the time correction factor to apply to the update.
                     */
                    correction?: number;
                    /**
                     * This function is called every time the core game loop steps, which is bound to the Request Animation Frame frequency unless otherwise modified.
                     */
                    getDelta?: Function;
                    /**
                     * Automatically call Engine.update every time the game steps.
                     */
                    autoUpdate?: boolean;
                    /**
                     * Sets the Resolver resting threshold property.
                     */
                    restingThresh?: number;
                    /**
                     * Sets the Resolver resting threshold tangent property.
                     */
                    restingThreshTangent?: number;
                    /**
                     * Sets the Resolver position dampen property.
                     */
                    positionDampen?: number;
                    /**
                     * Sets the Resolver position warming property.
                     */
                    positionWarming?: number;
                    /**
                     * Sets the Resolver friction normal multiplier property.
                     */
                    frictionNormalMultiplier?: number;
                    /**
                     * Controls the Matter Debug Rendering options. If a boolean it will use the default values, otherwise, specify a Debug Config object.
                     */
                    debug?: boolean | Phaser.Types.Physics.Matter.MatterDebugConfig;
                    /**
                     * Sets the Matter Runner options.
                     */
                    runner?: Phaser.Types.Physics.Matter.MatterRunnerConfig;
                };

            }

        }

        namespace Plugins {
            type CorePluginContainer = {
                /**
                 * The unique name of this plugin in the core plugin cache.
                 */
                key: string;
                /**
                 * The plugin to be stored. Should be the source object, not instantiated.
                 */
                plugin: Function;
                /**
                 * If this plugin is to be injected into the Scene Systems, this is the property key map used.
                 */
                mapping?: string;
                /**
                 * Core Scene plugin or a Custom Scene plugin?
                 */
                custom?: boolean;
            };

            type CustomPluginContainer = {
                /**
                 * The unique name of this plugin in the custom plugin cache.
                 */
                key: string;
                /**
                 * The plugin to be stored. Should be the source object, not instantiated.
                 */
                plugin: Function;
            };

            type GlobalPlugin = {
                /**
                 * The unique name of this plugin within the plugin cache.
                 */
                key: string;
                /**
                 * An instance of the plugin.
                 */
                plugin: Function;
                /**
                 * Is the plugin active or not?
                 */
                active?: boolean;
                /**
                 * If this plugin is to be injected into the Scene Systems, this is the property key map used.
                 */
                mapping?: string;
            };

        }

        namespace Renderer {
            namespace Snapshot {
                type SnapshotCallback = (snapshot: Phaser.Display.Color | HTMLImageElement)=>void;

                type SnapshotState = {
                    /**
                     * The function to call after the snapshot is taken.
                     */
                    callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback;
                    /**
                     * The format of the image to create, usually `image/png` or `image/jpeg`.
                     */
                    type?: string;
                    /**
                     * The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.
                     */
                    encoderOptions?: number;
                    /**
                     * The x coordinate to start the snapshot from.
                     */
                    x?: number;
                    /**
                     * The y coordinate to start the snapshot from.
                     */
                    y?: number;
                    /**
                     * The width of the snapshot.
                     */
                    width?: number;
                    /**
                     * The height of the snapshot.
                     */
                    height?: number;
                    /**
                     * Is this a snapshot to get a single pixel, or an area?
                     */
                    getPixel?: boolean;
                    /**
                     * Is this snapshot grabbing from a frame buffer or a canvas?
                     */
                    isFramebuffer?: boolean;
                    /**
                     * The width of the frame buffer, if a frame buffer grab.
                     */
                    bufferWidth?: number;
                    /**
                     * The height of the frame buffer, if a frame buffer grab.
                     */
                    bufferHeight?: number;
                    /**
                     * Should the snapshot be unpremultiplied before being returned? WebGL only.
                     */
                    unpremultiplyAlpha?: boolean;
                };

            }

            namespace WebGL {
                namespace RenderNodes {
                    type SubmitterSpriteGPULayerConfig = {
                        /**
                         * The name of the RenderNode. This should be unique within the manager.
                         */
                        name?: string;
                        /**
                         * The vertex shader source code. If not provided, a default quad shader will be used.
                         */
                        vertexSource?: string;
                        /**
                         * The fragment shader source code. If not provided, a default quad shader will be used.
                         */
                        fragmentSource?: string;
                    };

                    type BatchHandlerConfig = {
                        /**
                         * The name of the RenderNode. This should be unique within the manager.
                         */
                        name: string;
                        /**
                         * The number of instances per batch. Instances are usually quads. This factors into the size of the vertex buffer. The default is based on 16-bit vertex indices, which allows for 65535 vertices. This is divided by `verticesPerInstance` to get the number of instances. Note that no larger number of vertices is possible with 16-bit indices.
                         */
                        instancesPerBatch?: number;
                        /**
                         * The number of unique vertices per instance. This is usually 4 for a quad.
                         */
                        verticesPerInstance?: number;
                        /**
                         * The number of indices per instance. This is used to populate and advance the element buffer. Default quads use 6 indices in the TRIANGLE_STRIP pattern [0, 0, 1, 2, 3, 3] to connect independent quads with degenerate topology. The minimum number is 3.
                         */
                        indicesPerInstance?: number;
                        /**
                         * The maximum number of textures per batch entry. This defaults to the maximum number of textures supported by the renderer. It is used to compile the shader program. At runtime, the manager may suggest a different number, which is interpreted by the node's `updateTextureCount` method.
                         */
                        maxTexturesPerBatch?: number;
                        /**
                         * Whether the index buffer should be created as a dynamic buffer. This is useful for handlers that need to change the index data frequently.
                         */
                        indexBufferDynamic?: boolean;
                        /**
                         * The base name to use for the shader program.
                         */
                        shaderName?: string;
                        /**
                         * The vertex shader source code. If not provided, a default quad shader will be used.
                         */
                        vertexSource?: string;
                        /**
                         * The fragment shader source code. If not provided, a default quad shader will be used.
                         */
                        fragmentSource?: string;
                        /**
                         * An array of shader additions to apply to the shader program.
                         */
                        shaderAdditions?: Phaser.Types.Renderer.WebGL.ShaderAdditionConfig[];
                        /**
                         * An array of shader features to enable in the shader program.
                         */
                        shaderFeatures?: string[];
                        /**
                         * The vertex buffer layout for the batch handler. If not provided, a default quad layout will be used. The `count` property will be determined by the `instancesPerBatch` and `verticesPerInstance` properties. The `location` and `bytes` properties of each attribute will be determined automatically during initialization. You may provide a Partial WebGLAttributeBufferLayout, which will be filled in automatically during initialization.
                         */
                        vertexBufferLayout?: Phaser.Types.Renderer.WebGL.WebGLAttributeBufferLayout | any;
                        /**
                         * An array of attribute names to remove from the vertex buffer layout. This is useful for removing attributes that are not used by the shader program.
                         */
                        vertexBufferLayoutRemove?: string[];
                        /**
                         * An array of additional attribute layouts to add to the vertex buffer layout. This is useful for adding attributes to the default shader program. You may provide a Partial WebGLAttributeLayout, which will be filled in automatically during initialization.
                         */
                        vertexBufferLayoutAdd?: (Phaser.Types.Renderer.WebGL.WebGLAttributeLayout|any)[];
                    };

                    /**
                     * Self-shadowing options for quad rendering.
                     */
                    type BatchHandlerQuadRenderOptionsSelfShadow = {
                        /**
                         * Whether to use self-shadowing.
                         */
                        enabled: boolean;
                        /**
                         * Self-shadowing penumbra strength.
                         */
                        penumbra: number;
                        /**
                         * Self-shadowing texture brightness equivalent to a flat surface.
                         */
                        diffuseFlatThreshold: number;
                    };

                    /**
                     * Lighting options for quad rendering.
                     */
                    type BatchHandlerQuadRenderOptionsLighting = {
                        /**
                         * The normal map texture to render.
                         */
                        normalGLTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;
                        /**
                         * The rotation of the normal map texture.
                         */
                        normalMapRotation: number;
                        /**
                         * Self-shadowing options.
                         */
                        selfShadow?: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerQuadRenderOptionsSelfShadow;
                    };

                    /**
                     * Options to configure shader capabilities for quad rendering.
                     */
                    type BatchHandlerQuadRenderOptions = {
                        /**
                         * Whether to use multi-texturing.
                         */
                        multiTexturing?: boolean;
                        /**
                         * How to treat lighting. If this object is defined, lighting will be activated, and multi-texturing disabled.
                         */
                        lighting?: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerQuadRenderOptionsLighting;
                        /**
                         * Whether to use the smooth pixel art algorithm.
                         */
                        smoothPixelArt?: boolean;
                    };

                    type GameObjectBatcherConfig = {
                        /**
                         * The name of the RenderNode. This should be unique within the manager.
                         */
                        name: string;
                        /**
                         * The batch handler to which this node will send vertex information. The batch handler will be added to the manager if necessary. This is invoked during `run`. It is where shader configuration should be done.
                         */
                        batchHandler?: string | Phaser.Renderer.WebGL.RenderNodes.BatchHandler;
                    };

                    type SubmitterQuadConfig = {
                        /**
                         * The name of this RenderNode.
                         */
                        name?: string;
                        /**
                         * The expected role of this RenderNode.
                         */
                        role?: string;
                        /**
                         * The key of the default batch handler node to use for this RenderNode. This should correspond to a node which extends `BatchHandlerQuad`. It will be derived from the game object whenever the node runs.
                         */
                        batchHandler?: string;
                    };

                    /**
                     * Configuration settings for a DrawingContext.
                     */
                    type DrawingContextOptions = {
                        /**
                         * Whether to automatically clear the framebuffer when the context comes into use. If an array, the elements are whether to clear the color, depth, and stencil buffers respectively.
                         */
                        autoClear?: boolean | boolean[];
                        /**
                         * The blend mode to use when rendering.
                         */
                        blendMode?: number;
                        /**
                         * The camera to use for this context.
                         */
                        camera?: Phaser.Cameras.Scene2D.Camera | null;
                        /**
                         * The color to clear the framebuffer with. This is an array of 4 values: red, green, blue, alpha.
                         */
                        clearColor?: number[];
                        /**
                         * Whether to use the canvas as the framebuffer.
                         */
                        useCanvas?: boolean;
                        /**
                         * The DrawingContext to copy from.
                         */
                        copyFrom?: Phaser.Renderer.WebGL.DrawingContext;
                        /**
                         * Whether to enable mipmaps on the framebuffer texture, if it exists.
                         */
                        enableMipmap?: boolean;
                        /**
                         * The width of the framebuffer, used if `copyFrom` and `useCanvas` are not set. Default is the renderer width.
                         */
                        width?: number;
                        /**
                         * The height of the framebuffer, used if `copyFrom` and `useCanvas` are not set. Default is the renderer height.
                         */
                        height?: number;
                        /**
                         * The pool to return to when this context is no longer needed. Used only for temporary contexts.
                         */
                        pool?: Phaser.Renderer.WebGL.DrawingContextPool;
                    };

                }

                /**
                 * A ShaderAdditionConfig defines an addition to be made to a shader program.
                 * It consists of a name, a set of shader additions, and optional tags.
                 * 
                 * The name is used as a key to identify the shader addition.
                 * It is used as part of a unique identifier for a shader program.
                 * 
                 * The shader additions are key-value pairs of strings,
                 * where the key is the template to which the value is added.
                 * This is found in the base shader program source code as
                 * `#pragma phaserTemplate(key)`.
                 */
                type ShaderAdditionConfig = {
                    /**
                     * The name of the shader addition, used as a key.
                     */
                    name: string;
                    /**
                     * The shader additions to apply. Each addition is a key-value pair of strings, where the key is the template to which the value is added. Keys are applied to both vertex and fragment shader code, if the template exists in both.
                     */
                    additions: object;
                    /**
                     * Optional tags used to describe the shader addition.
                     */
                    tags?: string[];
                    /**
                     * Whether to ignore this addition while compiling a shader.
                     */
                    disable?: boolean;
                };

                type WebGLAttributeLayout = {
                    /**
                     * The name of the attribute, as defined in the shader.
                     */
                    name: string;
                    /**
                     * The number of components per vertex attribute.
                     */
                    size: number;
                    /**
                     * The data type of each component in the array. This can differ from the type in the shader, so long as WebGL can convert the types. If the type is a string, it will be converted to the appropriate GLenum, e.g. 'FLOAT' to gl.FLOAT.
                     */
                    type: GLenum | string;
                    /**
                     * Whether integer data values should be normalized when being cast to a float.
                     */
                    normalized: boolean;
                    /**
                     * The byte offset from the beginning of the buffer.
                     */
                    offset: number;
                    /**
                     * The number of bytes per vertex attribute. This is the size of the type, usually 4 bytes for FLOAT or INT.
                     */
                    bytes?: number;
                    /**
                     * The number of columns in the attribute data. Represent matrices as column vectors and increase columns to match the matrix size.
                     */
                    columns?: number;
                };

                type WebGLAttributeBufferLayout = {
                    /**
                     * The stride of the attribute data.
                     */
                    stride: number;
                    /**
                     * The maximum number of elements in the buffer.
                     */
                    count: number;
                    /**
                     * The usage pattern of the data store. gl.STATIC_DRAW, gl.DYNAMIC_DRAW or gl.STREAM_DRAW. If the type is a string, it will be converted to the appropriate GLenum, e.g. 'STATIC_DRAW' to gl.STATIC_DRAW.
                     */
                    usage: GLenum | string;
                    /**
                     * The instance divisor of the attribute data. This is how many vertices to draw before moving to the next one. It is only used for instanced rendering.
                     */
                    instanceDivisor?: number;
                    /**
                     * The layout of the attribute data.
                     */
                    layout: Phaser.Types.Renderer.WebGL.WebGLAttributeLayout;
                };

                type WebGLBatchEntry = {
                    /**
                     * The vertex count this batch entry starts from.
                     */
                    start: number;
                    /**
                     * The total number of vertices in this batch entry.
                     */
                    count: number;
                    /**
                     * The current texture unit of the batch entry.
                     */
                    unit: number;
                    /**
                     * The maximum number of texture units in this batch entry.
                     */
                    maxUnit: number;
                    /**
                     * An array of WebGLTextureWrapper references used in this batch entry.
                     */
                    texture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper[];
                };

                type WebGLBlendParameters = {
                    /**
                     * Whether blending is enabled.
                     */
                    enabled?: GLboolean;
                    /**
                     * The blend color (RGBA, 0-1).
                     */
                    color?: GLclampf[];
                    /**
                     * The blend equation. The first value is the RGB equation and the second is the alpha equation.
                     */
                    equation?: GLenum[];
                    /**
                     * The blend function. The values are `srcRGB`, `dstRGB`, `srcAlpha`, `dstAlpha`.
                     */
                    func?: GLenum[];
                };

                type WebGLConst = {
                    /**
                     * The data type of the attribute, i.e. `gl.BYTE`, `gl.SHORT`, `gl.UNSIGNED_BYTE`, `gl.FLOAT`, etc.
                     */
                    enum: GLenum;
                    /**
                     * The size, in bytes, of the data type.
                     */
                    size: number;
                };

                type WebGLGlobalParameters = {
                    /**
                     * Resources to be bound.
                     */
                    bindings?: object;
                    /**
                     * The active texture unit.
                     */
                    "bindings.activeTexture"?: GLint;
                    /**
                     * The vertex array buffer to bind.
                     */
                    "bindings.arrayBuffer"?: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;
                    /**
                     * The index array buffer to bind.
                     */
                    "bindings.elementArrayBuffer"?: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;
                    /**
                     * The framebuffer to bind.
                     */
                    "bindings.framebuffer"?: Phaser.Renderer.WebGL.Wrappers.WebGLFramebufferWrapper;
                    /**
                     * The program to bind.
                     */
                    "bindings.program"?: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper;
                    /**
                     * The renderbuffer to bind.
                     */
                    "bindings.renderbuffer"?: WebGLRenderbuffer;
                    /**
                     * The blend parameters to set.
                     */
                    blend?: Phaser.Types.Renderer.WebGL.WebGLBlendParameters;
                    /**
                     * The color to clear the color buffer to. 4 elements, RGBA.
                     */
                    colorClearValue?: Float32Array[];
                    /**
                     * The color writemask to set. 4 elements, RGBA.
                     */
                    colorWritemask?: GLboolean[];
                    /**
                     * Whether to enable culling.
                     */
                    cullFace?: boolean;
                    /**
                     * Whether to enable depth testing.
                     */
                    depthTest?: boolean;
                    /**
                     * Scissor parameters to set.
                     */
                    scissor?: object;
                    /**
                     * Whether to enable scissoring.
                     */
                    "scissor.enable"?: boolean;
                    /**
                     * The scissor rectangle to set. 4 elements, XYWH. Note that these are stored in WebGL format, bottom-up, so the Y coordinate is inverted to screen space.
                     */
                    "scissor.box"?: Int32Array[];
                    /**
                     * The stencil parameters to set.
                     */
                    stencil?: Phaser.Types.Renderer.WebGL.WebGLStencilParameters;
                    /**
                     * Texture settings to set. These take effect when creating a texture.
                     */
                    texturing?: object;
                    /**
                     * Should the texture be flipped on the Y axis?
                     */
                    "texturing.flipY"?: GLboolean;
                    /**
                     * Should the texture be pre-multiplied alpha?
                     */
                    "texturing.premultiplyAlpha"?: GLboolean;
                    /**
                     * Vertex Array Object to bind. This controls the vertex attribute state.
                     */
                    vao?: Phaser.Renderer.WebGL.Wrappers.WebGLVAOWrapper;
                    /**
                     * The viewport to set. 4 elements, XYWH.
                     */
                    viewport?: Int32Array[];
                };

                type WebGLStencilParameters = {
                    /**
                     * Whether stencil testing is enabled.
                     */
                    enabled?: GLboolean;
                    /**
                     * Stencil function parameters.
                     */
                    func?: object;
                    /**
                     * The comparison function.
                     */
                    "func.func": GLenum;
                    /**
                     * The reference value for the stencil test.
                     */
                    "func.ref": GLint;
                    /**
                     * The mask to apply to the stencil test.
                     */
                    "func.mask": GLuint;
                    /**
                     * Stencil operation parameters.
                     */
                    op?: object;
                    /**
                     * The operation to perform if the stencil test fails.
                     */
                    "op.fail": GLenum;
                    /**
                     * The operation to perform if the depth test fails.
                     */
                    "op.zfail": GLenum;
                    /**
                     * The operation to perform if the stencil test passes and the depth test passes or is disabled.
                     */
                    "op.zpass": GLenum;
                    /**
                     * The value to clear the stencil buffer to.
                     */
                    clear?: GLint;
                };

                type WebGLTextureCompression = {
                    /**
                     * Indicates if ASTC compression is supported (mostly iOS).
                     */
                    ASTC: object | undefined;
                    /**
                     * Indicates if ATC compression is supported.
                     */
                    ATC: object | undefined;
                    /**
                     * Indicates if BPTC compression is supported.
                     */
                    BPTC: object | undefined;
                    /**
                     * Indicates if ETC compression is supported (mostly Android).
                     */
                    ETC: object | undefined;
                    /**
                     * Indicates if ETC1 compression is supported (mostly Android).
                     */
                    ETC1: object | undefined;
                    /**
                     * Indicates the browser supports true color images (all browsers).
                     */
                    IMG: object | undefined;
                    /**
                     * Indicates if PVRTC compression is supported (mostly iOS).
                     */
                    PVRTC: object | undefined;
                    /**
                     * Indicates if RGTC compression is supported (mostly iOS).
                     */
                    RGTC: object | undefined;
                    /**
                     * Indicates if S3TC compression is supported on current device (mostly Windows).
                     */
                    S3TC: object | undefined;
                    /**
                     * Indicates if S3TCSRGB compression is supported on current device (mostly Windows).
                     */
                    S3TCSRGB: object | undefined;
                };

                type WebGLUniform = {
                    /**
                     * The location of the uniform.
                     */
                    location: GLint;
                    /**
                     * The type of the uniform.
                     */
                    type: GLenum;
                    /**
                     * The size of the uniform, in elements.
                     */
                    size: GLint;
                    /**
                     * The value of the uniform.
                     */
                    value: number | number[];
                };

                namespace Wrappers {
                    /**
                     * WebGL constants and functions used to set shader uniforms.
                     */
                    type ShaderSetter = {
                        /**
                         * The GL constant describing the data type.
                         */
                        constant: GLenum;
                        /**
                         * The GL constant describing the base data type. This is the same as `constant` for non-array types.
                         */
                        baseType: GLenum;
                        /**
                         * The number of elements in the data type.
                         */
                        size: number;
                        /**
                         * The number of bytes per element in the data type.
                         */
                        bytes: number;
                        /**
                         * The WebGL function to set the uniform.
                         */
                        set: Function;
                        /**
                         * The WebGL function to set the uniform with a value array (vector).
                         */
                        setV: Function;
                        /**
                         * Whether the uniform is a matrix.
                         */
                        isMatrix: boolean;
                    };

                    /**
                     * A collection of ShaderSetter descriptors used to set different types of shader uniforms.
                     */
                    type ShaderSetterConstants = {
                        /**
                         * gl.INT
                         */
                        "0x1404": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.INT_VEC2
                         */
                        "0x8B53": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.INT_VEC3
                         */
                        "0x8B54": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.INT_VEC4
                         */
                        "0x8B55": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.FLOAT
                         */
                        "0x1406": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.FLOAT_VEC2
                         */
                        "0x8B50": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.FLOAT_VEC3
                         */
                        "0x8B51": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.FLOAT_VEC4
                         */
                        "0x8B52": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.UNSIGNED_INT
                         */
                        "0x1405": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.BYTE
                         */
                        "0x1400": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.UNSIGNED_BYTE
                         */
                        "0x1401": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.SHORT
                         */
                        "0x1402": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.UNSIGNED_SHORT
                         */
                        "0x1403": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.BOOL
                         */
                        "0x8B56": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.BOOL_VEC2
                         */
                        "0x8B57": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.BOOL_VEC3
                         */
                        "0x8B58": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.BOOL_VEC4
                         */
                        "0x8B59": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.FLOAT_MAT2
                         */
                        "0x8B5A": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.FLOAT_MAT3
                         */
                        "0x8B5B": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.FLOAT_MAT4
                         */
                        "0x8B5C": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.SAMPLER_2D
                         */
                        "0x8B5E": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                        /**
                         * gl.SAMPLER_CUBE
                         */
                        "0x8B60": Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetter;
                    };

                }

            }

        }

        namespace Scenes {
            type CreateSceneFromObjectConfig = {
                /**
                 * The scene's init callback.
                 */
                init?: Phaser.Types.Scenes.SceneInitCallback;
                /**
                 * The scene's preload callback.
                 */
                preload?: Phaser.Types.Scenes.ScenePreloadCallback;
                /**
                 * The scene's create callback.
                 */
                create?: Phaser.Types.Scenes.SceneCreateCallback;
                /**
                 * The scene's update callback. See {@link Phaser.Scene#update}.
                 */
                update?: Phaser.Types.Scenes.SceneUpdateCallback;
                /**
                 * Any additional properties, which will be copied to the Scene after it's created (except `data` or `sys`).
                 */
                extend?: any;
                /**
                 * Any values, which will be merged into the Scene's Data Manager store.
                 */
                "extend.data"?: any;
            };

            /**
             * Can be defined on your own Scenes. Use it to create your game objects.
             * This method is called by the Scene Manager when the scene starts, after `init()` and `preload()`.
             * If the LoaderPlugin started after `preload()`, then this method is called only after loading is complete.
             */
            type SceneCreateCallback = (this: Phaser.Scene, data: object)=>void;

            /**
             * Can be defined on your own Scenes.
             * This method is called by the Scene Manager when the scene starts, before `preload()` and `create()`.
             */
            type SceneInitCallback = (this: Phaser.Scene, data: object)=>void;

            /**
             * Can be defined on your own Scenes. Use it to load assets.
             * This method is called by the Scene Manager, after `init()` and before `create()`, only if the Scene has a LoaderPlugin.
             * After this method completes, if the LoaderPlugin's queue isn't empty, the LoaderPlugin will start automatically.
             */
            type ScenePreloadCallback = (this: Phaser.Scene)=>void;

            type SceneTransitionConfig = {
                /**
                 * The Scene key to transition to.
                 */
                target: string;
                /**
                 * The duration, in ms, for the transition to last.
                 */
                duration?: number;
                /**
                 * Will the Scene responsible for the transition be sent to sleep on completion (`true`), or stopped? (`false`)
                 */
                sleep?: boolean;
                /**
                 * Will the Scene responsible for the transition be removed from the Scene Manager after the transition completes?
                 */
                remove?: boolean;
                /**
                 * Will the Scenes Input system be able to process events while it is transitioning in or out?
                 */
                allowInput?: boolean;
                /**
                 * Move the target Scene to be above this one before the transition starts.
                 */
                moveAbove?: boolean;
                /**
                 * Move the target Scene to be below this one before the transition starts.
                 */
                moveBelow?: boolean;
                /**
                 * This callback is invoked every frame for the duration of the transition.
                 */
                onUpdate?: Function;
                /**
                 * The context in which the callback is invoked.
                 */
                onUpdateScope?: any;
                /**
                 * This callback is invoked when transition starting.
                 */
                onStart?: Phaser.Types.Scenes.SceneTransitionOnStartCallback;
                /**
                 * The context in which the callback is invoked.
                 */
                onStartScope?: any;
                /**
                 * An object containing any data you wish to be passed to the target scene's init / create methods (if sleep is false) or to the target scene's wake event callback (if sleep is true).
                 */
                data?: any;
            };

            type SceneTransitionOnStartCallback = (this: Phaser.Scene, fromScene: Phaser.Scene, toScene: Phaser.Scene)=>void;

            type SceneType = Phaser.Scene | Phaser.Types.Scenes.SettingsConfig | Phaser.Types.Scenes.CreateSceneFromObjectConfig | Function;

            type SceneUpdateCallback = (this: Phaser.Scene, time: number, delta: number)=>void;

            type SettingsConfig = {
                /**
                 * The unique key of this Scene. Must be unique within the entire Game instance.
                 */
                key?: string;
                /**
                 * Does the Scene start as active or not? An active Scene updates each step.
                 */
                active?: boolean;
                /**
                 * Does the Scene start as visible or not? A visible Scene renders each step.
                 */
                visible?: boolean;
                /**
                 * Files to be loaded before the Scene begins.
                 */
                pack?: false | Phaser.Types.Loader.FileTypes.PackFileSection;
                /**
                 * An optional Camera configuration object.
                 */
                cameras?: Phaser.Types.Cameras.Scene2D.CameraConfig | Phaser.Types.Cameras.Scene2D.CameraConfig[] | null;
                /**
                 * Overwrites the default injection map for a scene.
                 */
                map?: {[key: string]:  string};
                /**
                 * Extends the injection map for a scene.
                 */
                mapAdd?: {[key: string]:  string};
                /**
                 * The physics configuration object for the Scene.
                 */
                physics?: Phaser.Types.Core.PhysicsConfig;
                /**
                 * The loader configuration object for the Scene.
                 */
                loader?: Phaser.Types.Core.LoaderConfig;
                /**
                 * The plugin configuration object for the Scene.
                 */
                plugins?: false | any;
            };

            type SettingsObject = {
                /**
                 * The current status of the Scene. Maps to the Scene constants.
                 */
                status: number;
                /**
                 * The unique key of this Scene. Unique within the entire Game instance.
                 */
                key: string;
                /**
                 * The active state of this Scene. An active Scene updates each step.
                 */
                active: boolean;
                /**
                 * The visible state of this Scene. A visible Scene renders each step.
                 */
                visible: boolean;
                /**
                 * Has the Scene finished booting?
                 */
                isBooted: boolean;
                /**
                 * Is the Scene in a state of transition?
                 */
                isTransition: boolean;
                /**
                 * The Scene this Scene is transitioning from, if set.
                 */
                transitionFrom: Phaser.Scene | null;
                /**
                 * The duration of the transition, if set.
                 */
                transitionDuration: number;
                /**
                 * Is this Scene allowed to receive input during transitions?
                 */
                transitionAllowInput: boolean;
                /**
                 * a data bundle passed to this Scene from the Scene Manager.
                 */
                data: object;
                /**
                 * Files to be loaded before the Scene begins.
                 */
                pack: false | Phaser.Types.Loader.FileTypes.PackFileSection;
                /**
                 * The Camera configuration object.
                 */
                cameras: Phaser.Types.Cameras.Scene2D.CameraConfig | Phaser.Types.Cameras.Scene2D.CameraConfig[] | null;
                /**
                 * The Scene's Injection Map.
                 */
                map: {[key: string]:  string};
                /**
                 * The physics configuration object for the Scene.
                 */
                physics: Phaser.Types.Core.PhysicsConfig;
                /**
                 * The loader configuration object for the Scene.
                 */
                loader: Phaser.Types.Core.LoaderConfig;
                /**
                 * The plugin configuration object for the Scene.
                 */
                plugins: false | any;
            };

        }

        namespace Sound {
            /**
             * Audio sprite sound type.
             */
            type AudioSpriteSound = {
                /**
                 * Local reference to 'spritemap' object form json file generated by audiosprite tool.
                 */
                spritemap: object;
            };

            /**
             * An Audio Data object.
             * 
             * You can pass an array of these objects to the WebAudioSoundManager `decodeAudio` method to have it decode
             * them all at once.
             */
            type DecodeAudioConfig = {
                /**
                 * The string-based key to be used to reference the decoded audio in the audio cache.
                 */
                key: string;
                /**
                 * The audio data, either a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.
                 */
                data: ArrayBuffer | string;
            };

            type EachActiveSoundCallback = (sound: Phaser.Sound.BaseSound, index: number, sounds: Phaser.Sound.BaseSound[])=>void;

            /**
             * Config object containing various sound settings.
             */
            type SoundConfig = {
                /**
                 * Boolean indicating whether the sound should be muted or not.
                 */
                mute?: boolean;
                /**
                 * A value between 0 (silence) and 1 (full volume).
                 */
                volume?: number;
                /**
                 * Defines the speed at which the sound should be played.
                 */
                rate?: number;
                /**
                 * Represents detuning of sound in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
                 */
                detune?: number;
                /**
                 * Position of playback for this sound, in seconds.
                 */
                seek?: number;
                /**
                 * Whether or not the sound or current sound marker should loop.
                 */
                loop?: boolean;
                /**
                 * Time, in seconds, that should elapse before the sound actually starts its playback.
                 */
                delay?: number;
                /**
                 * A value between -1 (full left pan) and 1 (full right pan). 0 means no pan.
                 */
                pan?: number;
                /**
                 * An optional config object containing default spatial sound settings.
                 */
                source?: Phaser.Types.Sound.SpatialSoundConfig;
            };

            /**
             * Marked section of a sound represented by name, and optionally start time, duration, and config object.
             */
            type SoundMarker = {
                /**
                 * Unique identifier of a sound marker.
                 */
                name: string;
                /**
                 * Sound position offset at which playback should start.
                 */
                start?: number;
                /**
                 * Playback duration of this marker.
                 */
                duration?: number;
                /**
                 * An optional config object containing default marker settings.
                 */
                config?: Phaser.Types.Sound.SoundConfig;
            };

            /**
             * Config object containing settings for the source of the spatial sound.
             * 
             * See https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics
             */
            type SpatialSoundConfig = {
                /**
                 * The horizontal position of the audio in a right-hand Cartesian coordinate system.
                 */
                x?: number;
                /**
                 * The vertical position of the audio in a right-hand Cartesian coordinate system.
                 */
                y?: number;
                /**
                 * Represents the longitudinal (back and forth) position of the audio in a right-hand Cartesian coordinate system.
                 */
                z?: number;
                /**
                 * An enumerated value determining which spatialization algorithm to use to position the audio in 3D space.
                 */
                panningModel?: 'equalpower' | 'HRTF';
                /**
                 * Which algorithm to use to reduce the volume of the audio source as it moves away from the listener. Possible values are "linear", "inverse" and "exponential". The default value is "inverse".
                 */
                distanceModel?: 'linear' | 'inverse' | 'exponential';
                /**
                 * The horizontal position of the audio source's vector in a right-hand Cartesian coordinate system.
                 */
                orientationX?: number;
                /**
                 * The vertical position of the audio source's vector in a right-hand Cartesian coordinate system.
                 */
                orientationY?: number;
                /**
                 * Represents the longitudinal (back and forth) position of the audio source's vector in a right-hand Cartesian coordinate system.
                 */
                orientationZ?: number;
                /**
                 * A double value representing the reference distance for reducing volume as the audio source moves further from the listener. For distances greater than this the volume will be reduced based on `rolloffFactor` and `distanceModel`.
                 */
                refDistance?: number;
                /**
                 * The maximum distance between the audio source and the listener, after which the volume is not reduced any further.
                 */
                maxDistance?: number;
                /**
                 * A double value describing how quickly the volume is reduced as the source moves away from the listener. This value is used by all distance models.
                 */
                rolloffFactor?: number;
                /**
                 * The angle, in degrees, of a cone inside of which there will be no volume reduction.
                 */
                coneInnerAngle?: number;
                /**
                 * The angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the `coneOuterGain` property.
                 */
                coneOuterAngle?: number;
                /**
                 * The amount of volume reduction outside the cone defined by the `coneOuterAngle` attribute. Its default value is 0, meaning that no sound can be heard. A value between 0 and 1.
                 */
                coneOuterGain?: number;
                /**
                 * Set this Sound object to automatically track the x/y position of this object. Can be a Phaser Game Object, Vec2 or anything that exposes public x/y properties.
                 */
                follow?: Phaser.Types.Math.Vector2Like;
            };

            /**
             * An entry in the Web Audio Decoding Queue.
             */
            type WebAudioDecodeEntry = {
                /**
                 * The key of the sound.
                 */
                key: string;
                /**
                 * The callback to invoke on successful decoding.
                 */
                success: Function;
                /**
                 * The callback to invoke if the decoding fails.
                 */
                failure: Function;
                /**
                 * Has the decoding of this sound file started?
                 */
                decoding: boolean;
            };

        }

        namespace Textures {
            /**
             * Configuration object for the `DynamicTexture.capture` method.
             */
            type CaptureConfig = {
                /**
                 * The transform to use, after applying other config settings. 'local' uses the GameObject's own properties. 'world' uses the GameObject's `parentContainer` value to compute a world position. A `TransformMatrix` can also be provided, which will be used directly.
                 */
                transform?: 'local' | 'world' | Phaser.GameObjects.Components.TransformMatrix;
                /**
                 * The Camera to use when rendering the GameObject to the DynamicTexture. If not specified, uses the DynamicTexture's own camera.
                 */
                camera?: Phaser.Cameras.Scene2D.Camera;
                /**
                 * The x position.
                 */
                x?: number;
                /**
                 * The y position.
                 */
                y?: number;
                /**
                 * The alpha value.
                 */
                alpha?: number;
                /**
                 * The tint color value. WebGL only.
                 */
                tint?: number;
                /**
                 * The angle in degrees. Rotation takes place around its origin. If `angle` is non-zero, `rotation` is ignored.
                 */
                angle?: number;
                /**
                 * The rotation in radians. Rotation takes place around its origin.
                 */
                rotation?: number;
                /**
                 * Sets both the horizontal and vertical scale with a single value.
                 */
                scale?: number;
                /**
                 * Set the horizontal scale. Overrides the scale property, if provided.
                 */
                scaleX?: number;
                /**
                 * Set the vertical scale. Overrides the scale property, if provided.
                 */
                scaleY?: number;
                /**
                 * The horizontal origin. 0 is the left, 0.5 is the center and 1 is the right.
                 */
                originX?: number;
                /**
                 * The vertical origin. 0 is the top, 0.5 is the center and 1 is the bottom.
                 */
                originY?: number;
                /**
                 * The blend mode used when drawing.
                 */
                blendMode?: string | Phaser.BlendModes | number;
            };

            /**
             * An object containing the dimensions and mipmap data for a Compressed Texture.
             */
            type CompressedTextureData = {
                /**
                 * Is this a compressed texture?
                 */
                compressed: boolean;
                /**
                 * Should this texture have mipmaps generated?
                 */
                generateMipmap: boolean;
                /**
                 * The width of the maximum size of the texture.
                 */
                width: number;
                /**
                 * The height of the maximum size of the texture.
                 */
                height: number;
                /**
                 * The WebGL internal texture format.
                 */
                internalFormat: GLenum;
                /**
                 * An array of MipmapType objects.
                 */
                mipmaps: Phaser.Types.Textures.MipmapType[];
            };

            /**
             * A Mipmap Data entry for a Compressed Texture.
             */
            type MipmapType = {
                /**
                 * The width of this level of the mipmap.
                 */
                width: number;
                /**
                 * The height of this level of the mipmap.
                 */
                height: number;
                /**
                 * The decoded pixel data.
                 */
                data: Uint8Array;
            };

            /**
             * An object containing the position and color data for a single pixel in a CanvasTexture.
             */
            type PixelConfig = {
                /**
                 * The x-coordinate of the pixel.
                 */
                x: number;
                /**
                 * The y-coordinate of the pixel.
                 */
                y: number;
                /**
                 * The color of the pixel, not including the alpha channel.
                 */
                color: number;
                /**
                 * The alpha of the pixel, between 0 and 1.
                 */
                alpha: number;
            };

            /**
             * Configuration options for the `DynamicTexture.repeat` method.
             */
            type RepeatConfig = Phaser.Types.Textures.StampConfig & {
                /**
                 * The horizontal scroll position of the texture.
                 */
                tilePositionX?: number;
                /**
                 * The vertical scroll position of the texture.
                 */
                tilePositionY?: number;
                /**
                 * The rotation of the texture.
                 */
                tileRotation?: number;
                /**
                 * The horizontal scale of the texture.
                 */
                tileScaleX?: number;
                /**
                 * The vertical scale of the texture.
                 */
                tileScaleY?: number;
            };

            type SpriteSheetConfig = {
                /**
                 * The fixed width of each frame.
                 */
                frameWidth: number;
                /**
                 * The fixed height of each frame. If not set it will use the frameWidth as the height.
                 */
                frameHeight?: number;
                /**
                 * Skip a number of frames. Useful when there are multiple sprite sheets in one Texture.
                 */
                startFrame?: number;
                /**
                 * The total number of frames to extract from the Sprite Sheet. The default value of -1 means "extract all frames".
                 */
                endFrame?: number;
                /**
                 * If the frames have been drawn with a margin, specify the amount here.
                 */
                margin?: number;
                /**
                 * If the frames have been drawn with spacing between them, specify the amount here.
                 */
                spacing?: number;
            };

            type SpriteSheetFromAtlasConfig = {
                /**
                 * The key of the Texture Atlas in which this Sprite Sheet can be found.
                 */
                atlas: string;
                /**
                 * The key of the Texture Atlas Frame in which this Sprite Sheet can be found.
                 */
                frame: string;
                /**
                 * The fixed width of each frame.
                 */
                frameWidth: number;
                /**
                 * The fixed height of each frame. If not set it will use the frameWidth as the height.
                 */
                frameHeight?: number;
                /**
                 * Skip a number of frames. Useful when there are multiple sprite sheets in one Texture.
                 */
                startFrame?: number;
                /**
                 * The total number of frames to extract from the Sprite Sheet. The default value of -1 means "extract all frames".
                 */
                endFrame?: number;
                /**
                 * If the frames have been drawn with a margin, specify the amount here.
                 */
                margin?: number;
                /**
                 * If the frames have been drawn with spacing between them, specify the amount here.
                 */
                spacing?: number;
            };

            /**
             * Configuration object for the `DynamicTexture.stamp` method.
             */
            type StampConfig = {
                /**
                 * The alpha value used by the stamp.
                 */
                alpha?: number;
                /**
                 * The tint color value used by the stamp. WebGL only.
                 */
                tint?: number;
                /**
                 * The angle of the stamp in degrees. Rotation takes place around its origin. If `angle` is non-zero, `rotation` is ignored.
                 */
                angle?: number;
                /**
                 * The rotation of the stamp in radians. Rotation takes place around its origin.
                 */
                rotation?: number;
                /**
                 * Sets both the horizontal and vertical scale of the stamp with a single value.
                 */
                scale?: number;
                /**
                 * Set the horizontal scale of the stamp. Overrides the scale property, if provided.
                 */
                scaleX?: number;
                /**
                 * Set the vertical scale of the stamp. Overrides the scale property, if provided.
                 */
                scaleY?: number;
                /**
                 * The horizontal origin of the stamp. 0 is the left, 0.5 is the center and 1 is the right.
                 */
                originX?: number;
                /**
                 * The vertical origin of the stamp. 0 is the top, 0.5 is the center and 1 is the bottom.
                 */
                originY?: number;
                /**
                 * The blend mode used when drawing the stamp. Defaults to 0 (normal).
                 */
                blendMode?: string | Phaser.BlendModes | number;
            };

            type TextureSource = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | Phaser.GameObjects.RenderTexture | Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | Phaser.Types.Textures.CompressedTextureData | Phaser.Textures.DynamicTexture | Uint8Array;

            type TextureSourceElement = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;

        }

        namespace Tilemaps {
            type CreateFromObjectLayerConfig = {
                /**
                 * A unique Object ID to convert.
                 */
                id?: number;
                /**
                 * An Object GID to convert.
                 */
                gid?: number;
                /**
                 * An Object Name to convert.
                 */
                name?: string;
                /**
                 * An Object Type to convert.
                 */
                type?: string;
                /**
                 * A custom class type to convert the objects in to. The default is {@link Phaser.GameObjects.Sprite}. A custom class should resemble Sprite or Image; see {@link Phaser.Types.Tilemaps.CreateFromObjectsClassTypeConstructor}.
                 */
                classType?: Function;
                /**
                 * By default, gid-based objects copy properties and respect the type of the tile at that gid and treat the object as an override. If this is true, they don't, and use only the fields set on the object itself.
                 */
                ignoreTileset?: boolean;
                /**
                 * A Scene reference, passed to the Game Objects constructors.
                 */
                scene?: Phaser.Scene;
                /**
                 * Optional Container to which the Game Objects are added.
                 */
                container?: Phaser.GameObjects.Container;
                /**
                 * Optional key of a Texture to be used, as stored in the Texture Manager, or a Texture instance. If omitted, the object's gid's tileset key is used if available.
                 */
                key?: string | Phaser.Textures.Texture;
                /**
                 * Optional name or index of the frame within the Texture. If omitted, the tileset index is used, assuming that spritesheet frames exactly match tileset indices & geometries -- if available.
                 */
                frame?: string | number;
                /**
                 * Sort objects in layer by their y position. Objects with a higher y are displayed above objects with a lower y.
                 */
                sortByY?: boolean;
            };

            type CreateFromObjectsClassTypeConstructor = (scene: Phaser.Scene)=>void;

            type DebugStyleOptions = {
                /**
                 * Color to use for drawing a filled rectangle at
                 * non-colliding tile locations. If set to null, non-colliding tiles will not be drawn.
                 */
                tileColor?: Phaser.Display.Color | null;
                /**
                 * Color to use for drawing a filled
                 * rectangle at colliding tile locations. If set to null, colliding tiles will not be drawn.
                 */
                collidingTileColor?: Phaser.Display.Color | null;
                /**
                 * Color to use for drawing a line at interesting
                 * tile faces. If set to null, interesting tile faces will not be drawn.
                 */
                faceColor?: Phaser.Display.Color | null;
            };

            type FilteringOptions = {
                /**
                 * If true, only return tiles that don't have -1 for an index.
                 */
                isNotEmpty?: boolean;
                /**
                 * If true, only return tiles that collide on at least one side.
                 */
                isColliding?: boolean;
                /**
                 * If true, only return tiles that have at least one interesting face.
                 */
                hasInterestingFace?: boolean;
            };

            type GIDData = {
                /**
                 * The Tiled GID.
                 */
                gid: number;
                /**
                 * Horizontal flip flag.
                 */
                flippedHorizontal: boolean;
                /**
                 * Vertical flip flag.
                 */
                flippedVertical: boolean;
                /**
                 * Diagonal flip flag.
                 */
                flippedAntiDiagonal: boolean;
                /**
                 * Amount of rotation.
                 */
                rotation: number;
                /**
                 * Is flipped?
                 */
                flipped: boolean;
            };

            type LayerDataConfig = {
                /**
                 * The name of the layer, if specified in Tiled.
                 */
                name?: string;
                /**
                 * The x offset of where to draw from the top left.
                 */
                x?: number;
                /**
                 * The y offset of where to draw from the top left.
                 */
                y?: number;
                /**
                 * The width of the layer in tiles.
                 */
                width?: number;
                /**
                 * The height of the layer in tiles.
                 */
                height?: number;
                /**
                 * The pixel width of the tiles.
                 */
                tileWidth?: number;
                /**
                 * The pixel height of the tiles.
                 */
                tileHeight?: number;
                /**
                 * The base tile width.
                 */
                baseTileWidth?: number;
                /**
                 * The base tile height.
                 */
                baseTileHeight?: number;
                /**
                 * The width in pixels of the entire layer.
                 */
                widthInPixels?: number;
                /**
                 * The height in pixels of the entire layer.
                 */
                heightInPixels?: number;
                /**
                 * The alpha value of the layer.
                 */
                alpha?: number;
                /**
                 * Is the layer visible or not?
                 */
                visible?: boolean;
                /**
                 * Layer specific properties (can be specified in Tiled)
                 */
                properties?: object[];
                /**
                 * Tile ID index map.
                 */
                indexes?: any[];
                /**
                 * Tile Collision ID index map.
                 */
                collideIndexes?: any[];
                /**
                 * An array of callbacks.
                 */
                callbacks?: any[];
                /**
                 * An array of physics bodies.
                 */
                bodies?: any[];
                /**
                 * An array of the tile data indexes.
                 */
                data?: any[];
                /**
                 * A reference to the Tilemap layer that owns this data.
                 */
                tilemapLayer?: Phaser.Tilemaps.TilemapLayer;
            };

            type MapDataConfig = {
                /**
                 * The key in the Phaser cache that corresponds to the loaded tilemap data.
                 */
                name?: string;
                /**
                 * The width of the entire tilemap.
                 */
                width?: number;
                /**
                 * The height of the entire tilemap.
                 */
                height?: number;
                /**
                 * The width of the tiles.
                 */
                tileWidth?: number;
                /**
                 * The height of the tiles.
                 */
                tileHeight?: number;
                /**
                 * The width in pixels of the entire tilemap.
                 */
                widthInPixels?: number;
                /**
                 * The height in pixels of the entire tilemap.
                 */
                heightInPixels?: number;
                /**
                 * The format of the Tilemap, as defined in Tiled.
                 */
                format?: number;
                /**
                 * The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'.
                 */
                orientation?: string | Phaser.Tilemaps.Orientation;
                /**
                 * Determines the draw order of tilemap. Default is right-down.
                 */
                renderOrder?: string;
                /**
                 * The version of Tiled the map uses.
                 */
                version?: number;
                /**
                 * Map specific properties (can be specified in Tiled).
                 */
                properties?: number;
                /**
                 * The layers of the tilemap.
                 */
                layers?: Phaser.Tilemaps.LayerData[];
                /**
                 * An array with all the layers configured to the MapData.
                 */
                images?: any[];
                /**
                 * An array of Tiled Image Layers.
                 */
                objects?: object;
                /**
                 * An object of Tiled Object Layers.
                 */
                collision?: object;
                /**
                 * The tilesets the map uses.
                 */
                tilesets?: Phaser.Tilemaps.Tileset[];
                /**
                 * The collection of images the map uses(specified in Tiled).
                 */
                imageCollections?: any[];
                /**
                 * Array of Tile instances.
                 */
                tiles?: any[];
            };

            type ObjectLayerConfig = {
                /**
                 * The name of the Object Layer.
                 */
                name?: string;
                /**
                 * The opacity of the layer, between 0 and 1.
                 */
                opacity?: number;
                /**
                 * The custom properties defined on the Object Layer, keyed by their name.
                 */
                properties?: any;
                /**
                 * The type of each custom property defined on the Object Layer, keyed by its name.
                 */
                propertytypes?: any;
                /**
                 * The type of the layer, which should be `objectgroup`.
                 */
                type?: string;
                /**
                 * Whether the layer is shown (`true`) or hidden (`false`).
                 */
                visible?: boolean;
                /**
                 * An array of all objects on this Object Layer.
                 */
                objects?: any[];
            };

            type StyleConfig = {
                /**
                 * Color to use for drawing a filled rectangle at non-colliding tile locations. If set to null, non-colliding tiles will not be drawn.
                 */
                tileColor?: Phaser.Display.Color | number | null | null;
                /**
                 * Color to use for drawing a filled rectangle at colliding tile locations. If set to null, colliding tiles will not be drawn.
                 */
                collidingTileColor?: Phaser.Display.Color | number | null | null;
                /**
                 * Color to use for drawing a line at interesting tile faces. If set to null, interesting tile faces will not be drawn.
                 */
                faceColor?: Phaser.Display.Color | number | null | null;
            };

            type TiledObject = {
                /**
                 * The unique object ID.
                 */
                id: number;
                /**
                 * The name this object was assigned in Tiled.
                 */
                name: string;
                /**
                 * The string type of this instance, as assigned in Tiled. Tiled supports inheriting instance types from tilesets; in that case, the type will be set in the tile's data, but will be `''` here; use the `gid` to fetch the tile data or properties.
                 */
                type: string;
                /**
                 * The visible state of this object.
                 */
                visible?: boolean;
                /**
                 * The horizontal position of this object, in pixels, relative to the tilemap.
                 */
                x?: number;
                /**
                 * The vertical position of this object, in pixels, relative to the tilemap.
                 */
                y?: number;
                /**
                 * The width of this object, in pixels.
                 */
                width?: number;
                /**
                 * The height of this object, in pixels.
                 */
                height?: number;
                /**
                 * The rotation of the object in clockwise degrees.
                 */
                rotation?: number;
                /**
                 * Custom properties object.
                 */
                properties?: any;
                /**
                 * Only set if of type 'tile'.
                 */
                gid?: number;
                /**
                 * Only set if a tile object. The horizontal flip value.
                 */
                flippedHorizontal?: boolean;
                /**
                 * Only set if a tile object. The vertical flip value.
                 */
                flippedVertical?: boolean;
                /**
                 * Only set if a tile object. The diagonal flip value.
                 */
                flippedAntiDiagonal?: boolean;
                /**
                 * Only set if a polyline object. An array of objects corresponding to points, where each point has an `x` property and a `y` property.
                 */
                polyline?: Phaser.Types.Math.Vector2Like[];
                /**
                 * Only set if a polygon object. An array of objects corresponding to points, where each point has an `x` property and a `y` property.
                 */
                polygon?: Phaser.Types.Math.Vector2Like[];
                /**
                 * Only set if a text object. Contains the text objects properties.
                 */
                text?: any;
                /**
                 * Only set, and set to `true`, if a rectangle object.
                 */
                rectangle?: boolean;
                /**
                 * Only set, and set to `true`, if a ellipse object.
                 */
                ellipse?: boolean;
                /**
                 * Only set, and set to `true`, if a point object.
                 */
                point?: boolean;
            };

            type TilemapConfig = {
                /**
                 * The key in the Phaser cache that corresponds to the loaded tilemap data.
                 */
                key?: string;
                /**
                 * Instead of loading from the cache, you can also load directly from a 2D array of tile indexes.
                 */
                data?: number[][];
                /**
                 * The width of a tile in pixels.
                 */
                tileWidth?: number;
                /**
                 * The height of a tile in pixels.
                 */
                tileHeight?: number;
                /**
                 * The width of the map in tiles.
                 */
                width?: number;
                /**
                 * The height of the map in tiles.
                 */
                height?: number;
                /**
                 * Controls how empty tiles, tiles with an index of -1,
                 * in the map data are handled. If `true`, empty locations will get a value of `null`. If `false`,
                 * empty location will get a Tile object with an index of -1. If you've a large sparsely populated
                 * map and the tile data doesn't need to change then setting this value to `true` will help with
                 * memory consumption. However if your map is small or you need to update the tiles dynamically,
                 * then leave the default value set.
                 */
                insertNull?: boolean;
            };

        }

        namespace Time {
            type TimelineEvent = {
                /**
                 * Has this event completed yet?
                 */
                complete: boolean;
                /**
                 * Is this a once only event?
                 */
                once: boolean;
                /**
                 * The time (in elapsed ms) at which this event will fire.
                 */
                time: number;
                /**
                 * The amount of times this Event has repeated.
                 */
                repeat?: number;
                /**
                 * User-land callback which will be called if set. If it returns `true` then this event run all of its actions, otherwise it will be skipped.
                 */
                if?: Function;
                /**
                 * User-land callback which will be called when the Event fires.
                 */
                run?: Function;
                /**
                 * User-land callback which will be called when the Event loops.
                 */
                loop?: Function;
                /**
                 * Tween configuration object which will be used to create a Tween when the Event fires if set.
                 */
                tween?: Phaser.Types.Tweens.TweenBuilderConfig | Phaser.Types.Tweens.TweenChainBuilderConfig | Phaser.Tweens.Tween | Phaser.Tweens.TweenChain;
                /**
                 * Object containing properties to set on the `target` when the Event fires if set.
                 */
                set?: object;
                /**
                 * Sound configuration object which will be used to create a Sound when the Event fires if set.
                 */
                sound?: string | object;
                /**
                 * The scope (`this` object) with which to invoke the run `callback`.
                 */
                target?: any;
                /**
                 * Optional event name to emit when the Event fires.
                 */
                event?: string;
                /**
                 * If this Event is using a Tween to manage its actions, this property will contain a reference to it.
                 */
                tweenInstance?: Phaser.Tweens.Tween | Phaser.Tweens.TweenChain;
            };

            type TimelineEventConfig = {
                /**
                 * The time (in ms) at which the Event will fire. The Timeline starts at 0.
                 */
                at?: number;
                /**
                 * If the Timeline is running, this is the time (in ms) at which the Event will fire based on its current elapsed value. If set it will override the `at` property.
                 */
                in?: number;
                /**
                 * Fire this event 'from' milliseconds after the previous event in the Timeline. If set it will override the `at` and `in` properties.
                 */
                from?: number;
                /**
                 * A function which will be called when the Event fires.
                 */
                run?: Function;
                /**
                 * A function which will be called when the Event loops, this does not get called if the `repeat` method is not used or on first iteration.
                 */
                loop?: Function;
                /**
                 * Optional string-based event name to emit when the Event fires. The event is emitted from the Timeline instance.
                 */
                event?: string;
                /**
                 * The scope (`this` object) with which to invoke the run `callback`, if set.
                 */
                target?: any;
                /**
                 * If set, the Event will be removed from the Timeline when it fires.
                 */
                once?: boolean;
                /**
                 * If set, the Timeline will stop and enter a complete state when this Event fires, even if there are other events after it.
                 */
                stop?: boolean;
                /**
                 * A Tween or TweenChain configuration object or instance. If set, the Event will create this Tween when it fires.
                 */
                tween?: Phaser.Types.Tweens.TweenBuilderConfig | Phaser.Types.Tweens.TweenChainBuilderConfig | Phaser.Tweens.Tween | Phaser.Tweens.TweenChain;
                /**
                 * A key-value object of properties to set on the `target` when the Event fires. Ignored if no `target` is given.
                 */
                set?: object;
                /**
                 * A key from the Sound Manager to play, or a config object for a sound to play when the Event fires. If a config object it must provide two properties: `key` and `config`. The `key` is the key of the sound to play, and the `config` is the config is a Phaser.Types.Sound.SoundConfig object.
                 */
                sound?: string | object;
            };

            type TimerEventConfig = {
                /**
                 * The delay after which the Timer Event should fire, in milliseconds.
                 */
                delay?: number;
                /**
                 * The total number of times the Timer Event will repeat before finishing.
                 */
                repeat?: number;
                /**
                 * `true` if the Timer Event should repeat indefinitely.
                 */
                loop?: boolean;
                /**
                 * The callback which will be called when the Timer Event fires.
                 */
                callback?: Function;
                /**
                 * The scope (`this` object) with which to invoke the `callback`. The default is the Timer Event.
                 */
                callbackScope?: any;
                /**
                 * Additional arguments to be passed to the `callback`.
                 */
                args?: any[];
                /**
                 * The scale of the elapsed time.
                 */
                timeScale?: number;
                /**
                 * The initial elapsed time in milliseconds. Useful if you want a long duration with repeat, but for the first loop to fire quickly.
                 */
                startAt?: number;
                /**
                 * `true` if the Timer Event should be paused.
                 */
                paused?: boolean;
            };

        }

        namespace Tweens {
            type TweenConfigDefaults = {
                /**
                 * The object, or an array of objects, to run the tween on.
                 */
                targets: object | object[];
                /**
                 * The number of milliseconds to delay before the tween will start.
                 */
                delay?: number;
                /**
                 * The duration of the tween in milliseconds.
                 */
                duration?: number;
                /**
                 * The easing equation to use for the tween. This is a string key such as `'Linear'`, `'Quad.easeIn'`, `'Cubic.easeOut'`, or `'Bounce.easeInOut'`. See `Phaser.Tweens.Builders.GetEaseFunction` for the full list of supported values.
                 */
                ease?: string;
                /**
                 * An optional array of additional parameters to pass to the easing function, if it supports them.
                 */
                easeParams?: any[];
                /**
                 * The number of milliseconds to hold the tween for before yoyo'ing.
                 */
                hold?: number;
                /**
                 * The number of times to repeat the tween.
                 */
                repeat?: number;
                /**
                 * The number of milliseconds to pause before a tween will repeat.
                 */
                repeatDelay?: number;
                /**
                 * Should the tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take `duration` milliseconds to complete.
                 */
                yoyo?: boolean;
                /**
                 * Horizontally flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipX` property.
                 */
                flipX?: boolean;
                /**
                 * Vertically flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipY` property.
                 */
                flipY?: boolean;
                /**
                 * Retain the tween within the Tween Manager, even after playback completes?
                 */
                persist?: boolean;
                /**
                 * The interpolation function to use for array-based tween values.
                 */
                interpolation?: Function;
            };

            /**
             * A Tween Event.
             */
            type Event = string;

            type GetActiveCallback = (target: any, key: string, value: number, targetIndex: number, totalTargets: number, tween: Phaser.Tweens.Tween)=>number;

            type GetEndCallback = (target: any, key: string, value: number, targetIndex: number, totalTargets: number, tween: Phaser.Tweens.Tween)=>number;

            type GetStartCallback = (target: any, key: string, value: number, targetIndex: number, totalTargets: number, tween: Phaser.Tweens.Tween)=>number;

            type NumberTweenBuilderConfig = {
                /**
                 * The start number.
                 */
                from?: number;
                /**
                 * The end number.
                 */
                to?: number;
                /**
                 * The number of milliseconds to delay before the counter will start.
                 */
                delay?: number;
                /**
                 * The duration of the counter in milliseconds.
                 */
                duration?: number;
                /**
                 * The easing equation to use for the counter.
                 */
                ease?: string | Function;
                /**
                 * Optional easing parameters.
                 */
                easeParams?: any[];
                /**
                 * The number of milliseconds to hold the counter for before yoyo'ing.
                 */
                hold?: number;
                /**
                 * The number of times to repeat the counter.
                 */
                repeat?: number;
                /**
                 * The number of milliseconds to pause before the counter will repeat.
                 */
                repeatDelay?: number;
                /**
                 * Should the counter play forward to the end value and then backwards to the start? The reverse playback will also take `duration` milliseconds to complete.
                 */
                yoyo?: boolean;
                /**
                 * The time the counter will wait before the onComplete event is dispatched once it has completed, in ms.
                 */
                completeDelay?: string | number | Function | object | any[];
                /**
                 * The number of times the counter will repeat. (A value of 1 means the counter will play twice, as it repeated once.)
                 */
                loop?: string | number | Function | object | any[];
                /**
                 * The time the counter will pause before starting either a yoyo or returning to the start for a repeat.
                 */
                loopDelay?: string | number | Function | object | any[];
                /**
                 * Does the counter start in a paused state (true) or playing (false)?
                 */
                paused?: boolean;
                /**
                 * Scope (this) for the callbacks. The default scope is the counter.
                 */
                callbackScope?: any;
                /**
                 * A function to call when the counter completes.
                 */
                onComplete?: Phaser.Types.Tweens.TweenOnCompleteCallback;
                /**
                 * Additional parameters to pass to `onComplete`.
                 */
                onCompleteParams?: any[];
                /**
                 * A function to call each time the counter loops.
                 */
                onLoop?: Phaser.Types.Tweens.TweenOnLoopCallback;
                /**
                 * Additional parameters to pass to `onLoop`.
                 */
                onLoopParams?: any[];
                /**
                 * A function to call each time the counter repeats.
                 */
                onRepeat?: Phaser.Types.Tweens.TweenOnRepeatCallback;
                /**
                 * Additional parameters to pass to `onRepeat`.
                 */
                onRepeatParams?: any[];
                /**
                 * A function to call when the counter starts.
                 */
                onStart?: Phaser.Types.Tweens.TweenOnStartCallback;
                /**
                 * Additional parameters to pass to `onStart`.
                 */
                onStartParams?: any[];
                /**
                 * A function to call when the counter is stopped.
                 */
                onStop?: Phaser.Types.Tweens.TweenOnStopCallback;
                /**
                 * Additional parameters to pass to `onStop`.
                 */
                onStopParams?: any[];
                /**
                 * A function to call each time the counter steps.
                 */
                onUpdate?: Phaser.Types.Tweens.TweenOnUpdateCallback;
                /**
                 * Additional parameters to pass to `onUpdate`.
                 */
                onUpdateParams?: any[];
                /**
                 * A function to call each time the counter yoyos.
                 */
                onYoyo?: Phaser.Types.Tweens.TweenOnYoyoCallback;
                /**
                 * Additional parameters to pass to `onYoyo`.
                 */
                onYoyoParams?: any[];
                /**
                 * A function to call when the counter is paused.
                 */
                onPause?: Phaser.Types.Tweens.TweenOnPauseCallback;
                /**
                 * Additional parameters to pass to `onPause`.
                 */
                onPauseParams?: any[];
                /**
                 * A function to call when the counter is resumed after being paused.
                 */
                onResume?: Phaser.Types.Tweens.TweenOnResumeCallback;
                /**
                 * Additional parameters to pass to `onResume`.
                 */
                onResumeParams?: any[];
                /**
                 * Will the counter be automatically destroyed on completion, or retained for future playback?
                 */
                persist?: boolean;
                /**
                 * The interpolation function to use if the `value` given is an array of numbers.
                 */
                interpolation?: string | Function;
            };

            type StaggerConfig = {
                /**
                 * The value to start the stagger from. Can be used as a way to offset the stagger while still using a range for the value.
                 */
                start?: number;
                /**
                 * An ease to apply across the staggered values. Can either be a string, such as 'sine.inout', or a function.
                 */
                ease?: string | Function;
                /**
                 * The index to start the stagger from. Can be the strings `first`, `last` or `center`, or an integer representing the stagger position.
                 */
                from?: string | number;
                /**
                 * Set the stagger to run across a grid by providing an array where element 0 is the width of the grid and element 1 is the height. Combine with the 'from' property to control direction.
                 */
                grid?: number[];
            };

            type TweenBuilderConfig = {[key: string]: any} & {
                /**
                 * The object, or an array of objects, to run the tween on.
                 */
                targets: any;
                /**
                 * The number of milliseconds to delay before the tween will start.
                 */
                delay?: number | Function;
                /**
                 * The duration of the tween in milliseconds.
                 */
                duration?: number;
                /**
                 * The easing equation to use for the tween.
                 */
                ease?: string | Function;
                /**
                 * Optional easing parameters.
                 */
                easeParams?: any[];
                /**
                 * The number of milliseconds to hold the tween for before yoyo'ing.
                 */
                hold?: number;
                /**
                 * The number of times each property tween repeats.
                 */
                repeat?: number;
                /**
                 * The number of milliseconds to pause before a repeat.
                 */
                repeatDelay?: number;
                /**
                 * Should the tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take `duration` milliseconds to complete.
                 */
                yoyo?: boolean;
                /**
                 * Horizontally flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipX` property.
                 */
                flipX?: boolean;
                /**
                 * Vertically flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipY` property.
                 */
                flipY?: boolean;
                /**
                 * The time the tween will wait before the onComplete event is dispatched once it has completed, in ms.
                 */
                completeDelay?: string | number | Function | object | any[];
                /**
                 * The number of times the tween will repeat. (A value of 1 means the tween will play twice, as it repeated once.) The first loop starts after every property in the tween has completed once.
                 */
                loop?: string | number | Function | object | any[];
                /**
                 * The time the tween will pause before starting either a yoyo or returning to the start for a repeat.
                 */
                loopDelay?: string | number | Function | object | any[];
                /**
                 * Does the tween start in a paused state (true) or playing (false)?
                 */
                paused?: boolean;
                /**
                 * The properties to tween.
                 */
                props?: {[key: string]:  (number|string|Phaser.Types.Tweens.GetEndCallback|Phaser.Types.Tweens.TweenPropConfig)};
                /**
                 * The scope (or context) for all of the callbacks. The default scope is the tween.
                 */
                callbackScope?: any;
                /**
                 * A function to call when the tween completes.
                 */
                onComplete?: Phaser.Types.Tweens.TweenOnCompleteCallback;
                /**
                 * Additional parameters to pass to `onComplete`.
                 */
                onCompleteParams?: any[];
                /**
                 * A function to call each time the tween loops.
                 */
                onLoop?: Phaser.Types.Tweens.TweenOnLoopCallback;
                /**
                 * Additional parameters to pass to `onLoop`.
                 */
                onLoopParams?: any[];
                /**
                 * A function to call each time a property tween repeats. Called once per property per target.
                 */
                onRepeat?: Phaser.Types.Tweens.TweenOnRepeatCallback;
                /**
                 * Additional parameters to pass to `onRepeat`.
                 */
                onRepeatParams?: any[];
                /**
                 * A function to call when the tween starts playback, after any delays have expired.
                 */
                onStart?: Phaser.Types.Tweens.TweenOnStartCallback;
                /**
                 * Additional parameters to pass to `onStart`.
                 */
                onStartParams?: any[];
                /**
                 * A function to call when the tween is stopped.
                 */
                onStop?: Phaser.Types.Tweens.TweenOnStopCallback;
                /**
                 * Additional parameters to pass to `onStop`.
                 */
                onStopParams?: any[];
                /**
                 * A function to call each time the tween steps. Called once per property per target.
                 */
                onUpdate?: Phaser.Types.Tweens.TweenOnUpdateCallback;
                /**
                 * Additional parameters to pass to `onUpdate`.
                 */
                onUpdateParams?: any[];
                /**
                 * A function to call each time a property tween yoyos. Called once per property per target.
                 */
                onYoyo?: Phaser.Types.Tweens.TweenOnYoyoCallback;
                /**
                 * Additional parameters to pass to `onYoyo`.
                 */
                onYoyoParams?: any[];
                /**
                 * A function to call when the tween becomes active within the Tween Manager.
                 */
                onActive?: Phaser.Types.Tweens.TweenOnActiveCallback;
                /**
                 * Additional parameters to pass to `onActive`.
                 */
                onActiveParams?: any[];
                /**
                 * A function to call when the tween is paused.
                 */
                onPause?: Phaser.Types.Tweens.TweenOnPauseCallback;
                /**
                 * Additional parameters to pass to `onPause`.
                 */
                onPauseParams?: any[];
                /**
                 * A function to call when the tween is resumed after being paused.
                 */
                onResume?: Phaser.Types.Tweens.TweenOnResumeCallback;
                /**
                 * Additional parameters to pass to `onResume`.
                 */
                onResumeParams?: any[];
                /**
                 * Will the Tween be automatically destroyed on completion, or retained for future playback?
                 */
                persist?: boolean;
                /**
                 * The interpolation function to use if the `value` given is an array of numbers.
                 */
                interpolation?: string | Function;
            };

            type TweenCallbackTypes = 'onActive' | 'onComplete' | 'onLoop' | 'onPause' | 'onRepeat' | 'onResume' | 'onStart' | 'onStop' | 'onUpdate' | 'onYoyo';

            type TweenCallbacks = {
                /**
                 * A function to call when the tween becomes active within the Tween Manager.
                 */
                onActive?: Phaser.Types.Tweens.TweenOnActiveCallback;
                /**
                 * A function to call when the tween starts playback, after any delays have expired.
                 */
                onStart?: Phaser.Types.Tweens.TweenOnStartCallback;
                /**
                 * A function to call when the tween completes.
                 */
                onComplete?: Phaser.Types.Tweens.TweenOnCompleteCallback;
                /**
                 * A function to call each time the tween loops.
                 */
                onLoop?: Phaser.Types.Tweens.TweenOnLoopCallback;
                /**
                 * A function to call each time the tween is paused.
                 */
                onPause?: Phaser.Types.Tweens.TweenOnPauseCallback;
                /**
                 * A function to call each time the tween is resumed.
                 */
                onResume?: Phaser.Types.Tweens.TweenOnResumeCallback;
                /**
                 * A function to call each time the tween repeats. Called once per property per target.
                 */
                onRepeat?: Phaser.Types.Tweens.TweenOnRepeatCallback;
                /**
                 * A function to call when the tween is stopped.
                 */
                onStop?: Phaser.Types.Tweens.TweenOnStopCallback;
                /**
                 * A function to call each time the tween steps. Called once per property per target.
                 */
                onUpdate?: Phaser.Types.Tweens.TweenOnUpdateCallback;
                /**
                 * A function to call each time the tween yoyos. Called once per property per target.
                 */
                onYoyo?: Phaser.Types.Tweens.TweenOnYoyoCallback;
            };

            type TweenChainBuilderConfig = {[key: string]: any} & {
                /**
                 * The object, or an array of objects, to run each tween on.
                 */
                targets: any;
                /**
                 * The number of milliseconds to delay before the chain will start.
                 */
                delay?: number | Function;
                /**
                 * The time the chain will wait before the onComplete event is dispatched once it has completed, in ms.
                 */
                completeDelay?: string | number | Function | object | any[];
                /**
                 * The number of times the chain will repeat. (A value of 1 means the chain will play twice, as it repeated once.) The first loop starts after every tween has completed once.
                 */
                loop?: string | number | Function | object | any[];
                /**
                 * The time the chain will pause before returning to the start for a repeat.
                 */
                loopDelay?: string | number | Function | object | any[];
                /**
                 * Does the chain start in a paused state (true) or playing (false)?
                 */
                paused?: boolean;
                /**
                 * The tweens to chain together.
                 */
                tweens?: Phaser.Types.Tweens.TweenBuilderConfig[];
                /**
                 * The scope (or context) for all of the callbacks. The default scope is the chain.
                 */
                callbackScope?: any;
                /**
                 * A function to call when the chain completes.
                 */
                onComplete?: Phaser.Types.Tweens.TweenOnCompleteCallback;
                /**
                 * Additional parameters to pass to `onComplete`.
                 */
                onCompleteParams?: any[];
                /**
                 * A function to call each time the chain loops.
                 */
                onLoop?: Phaser.Types.Tweens.TweenOnLoopCallback;
                /**
                 * Additional parameters to pass to `onLoop`.
                 */
                onLoopParams?: any[];
                /**
                 * A function to call when the chain starts playback, after any delays have expired.
                 */
                onStart?: Phaser.Types.Tweens.TweenOnStartCallback;
                /**
                 * Additional parameters to pass to `onStart`.
                 */
                onStartParams?: any[];
                /**
                 * A function to call when the chain is stopped.
                 */
                onStop?: Phaser.Types.Tweens.TweenOnStopCallback;
                /**
                 * Additional parameters to pass to `onStop`.
                 */
                onStopParams?: any[];
                /**
                 * A function to call when the chain becomes active within the Tween Manager.
                 */
                onActive?: Phaser.Types.Tweens.TweenOnActiveCallback;
                /**
                 * Additional parameters to pass to `onActive`.
                 */
                onActiveParams?: any[];
                /**
                 * A function to call when the chain is paused.
                 */
                onPause?: Phaser.Types.Tweens.TweenOnPauseCallback;
                /**
                 * Additional parameters to pass to `onPause`.
                 */
                onPauseParams?: any[];
                /**
                 * A function to call when the chain is resumed after being paused.
                 */
                onResume?: Phaser.Types.Tweens.TweenOnResumeCallback;
                /**
                 * Additional parameters to pass to `onResume`.
                 */
                onResumeParams?: any[];
                /**
                 * Will the Tween be automatically destroyed on completion, or retained for future playback?
                 */
                persist?: boolean;
            };

            type TweenDataConfig = {
                /**
                 * The target to tween.
                 */
                target: any;
                /**
                 * The target index within the Tween targets array.
                 */
                index: number;
                /**
                 * The property of the target being tweened.
                 */
                key: string;
                /**
                 * If not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.
                 */
                getActiveValue: Phaser.Types.Tweens.GetActiveCallback | null;
                /**
                 * The returned value sets what the property will be at the END of the Tween.
                 */
                getEndValue: Phaser.Types.Tweens.GetEndCallback;
                /**
                 * The returned value sets what the property will be at the START of the Tween.
                 */
                getStartValue: Phaser.Types.Tweens.GetStartCallback;
                /**
                 * The ease function this tween uses.
                 */
                ease: Function;
                /**
                 * Duration of the tween in milliseconds, excludes time for yoyo or repeats.
                 */
                duration?: number;
                /**
                 * The total calculated duration of this TweenData (based on duration, repeat, delay and yoyo)
                 */
                totalDuration?: number;
                /**
                 * Time in milliseconds before tween will start.
                 */
                delay?: number;
                /**
                 * Cause the tween to return back to its start value after hold has expired.
                 */
                yoyo?: boolean;
                /**
                 * Time in milliseconds the tween will pause before running the yoyo or starting a repeat.
                 */
                hold?: number;
                /**
                 * Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.
                 */
                repeat?: number;
                /**
                 * Time in milliseconds before the repeat will start.
                 */
                repeatDelay?: number;
                /**
                 * Automatically call toggleFlipX when the TweenData yoyos or repeats
                 */
                flipX?: boolean;
                /**
                 * Automatically call toggleFlipY when the TweenData yoyos or repeats
                 */
                flipY?: boolean;
                /**
                 * Between 0 and 1 showing completion of this TweenData.
                 */
                progress?: number;
                /**
                 * Delta counter
                 */
                elapsed?: number;
                /**
                 * How many repeats are left to run?
                 */
                repeatCounter?: number;
                /**
                 * The property value at the start of the ease.
                 */
                start?: number;
                /**
                 * The current property value.
                 */
                current?: number;
                /**
                 * The previous property value.
                 */
                previous?: number;
                /**
                 * The property value at the end of the ease.
                 */
                end?: number;
                /**
                 * LoadValue generation functions.
                 */
                gen?: Phaser.Types.Tweens.TweenDataGenConfig;
                /**
                 * TWEEN_CONST.CREATED
                 */
                state?: Phaser.Tweens.StateType;
            };

            type TweenDataGenConfig = {
                /**
                 * Time in milliseconds before tween will start.
                 */
                delay: Function;
                /**
                 * Duration of the tween in milliseconds, excludes time for yoyo or repeats.
                 */
                duration: Function;
                /**
                 * Time in milliseconds the tween will pause before running the yoyo or starting a repeat.
                 */
                hold: Function;
                /**
                 * Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.
                 */
                repeat: Function;
                /**
                 * Time in milliseconds before the repeat will start.
                 */
                repeatDelay: Function;
            };

            type TweenFrameDataConfig = {
                /**
                 * The target to tween.
                 */
                target: any;
                /**
                 * The target index within the Tween targets array.
                 */
                index: number;
                /**
                 * The property of the target being tweened.
                 */
                key: string;
                /**
                 * Duration of the tween in milliseconds, excludes time for yoyo or repeats.
                 */
                duration?: number;
                /**
                 * The total calculated duration of this TweenData (based on duration, repeat, delay and yoyo)
                 */
                totalDuration?: number;
                /**
                 * Time in milliseconds before tween will start.
                 */
                delay?: number;
                /**
                 * Time in milliseconds the tween will pause before running the yoyo or starting a repeat.
                 */
                hold?: number;
                /**
                 * Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.
                 */
                repeat?: number;
                /**
                 * Time in milliseconds before the repeat will start.
                 */
                repeatDelay?: number;
                /**
                 * Automatically call toggleFlipX when the TweenData yoyos or repeats
                 */
                flipX?: boolean;
                /**
                 * Automatically call toggleFlipY when the TweenData yoyos or repeats
                 */
                flipY?: boolean;
                /**
                 * Between 0 and 1 showing completion of this TweenData.
                 */
                progress?: number;
                /**
                 * Delta counter
                 */
                elapsed?: number;
                /**
                 * How many repeats are left to run?
                 */
                repeatCounter?: number;
                /**
                 * LoadValue generation functions.
                 */
                gen?: Phaser.Types.Tweens.TweenDataGenConfig;
                /**
                 * TWEEN_CONST.CREATED
                 */
                state?: Phaser.Tweens.StateType;
            };

            type TweenOnActiveCallback = (tween: Phaser.Tweens.Tween, targets: any | any[], ...param: any[])=>void;

            type TweenOnCompleteCallback = (tween: Phaser.Tweens.Tween, targets: any | any[], ...param: any[])=>void;

            type TweenOnLoopCallback = (tween: Phaser.Tweens.Tween, targets: any | any[], ...param: any[])=>void;

            type TweenOnPauseCallback = (tween: Phaser.Tweens.Tween, targets: any | any[], ...param: any[])=>void;

            type TweenOnRepeatCallback = (tween: Phaser.Tweens.Tween, target: any, key: string, current: number, previous: number, ...param: any[])=>void;

            type TweenOnResumeCallback = (tween: Phaser.Tweens.Tween, targets: any | any[], ...param: any[])=>void;

            type TweenOnStartCallback = (tween: Phaser.Tweens.Tween, targets: any | any[], ...param: any[])=>void;

            type TweenOnStopCallback = (tween: Phaser.Tweens.Tween, targets: any | any[], ...param: any[])=>void;

            type TweenOnUpdateCallback = (tween: Phaser.Tweens.Tween, target: any, key: string, current: number, previous: number, ...param: any[])=>void;

            type TweenOnYoyoCallback = (tween: Phaser.Tweens.Tween, target: any, key: string, current: number, previous: number, ...param: any[])=>void;

            type TweenPropConfig = {
                /**
                 * What the property will be at the END of the Tween.
                 */
                value?: number | number[] | string | Phaser.Types.Tweens.GetEndCallback | Phaser.Types.Tweens.TweenPropConfig;
                /**
                 * What the property will be set to immediately when this tween becomes active.
                 */
                getActive?: Phaser.Types.Tweens.GetActiveCallback;
                /**
                 * What the property will be at the END of the Tween.
                 */
                getEnd?: Phaser.Types.Tweens.GetEndCallback;
                /**
                 * What the property will be at the START of the Tween.
                 */
                getStart?: Phaser.Types.Tweens.GetStartCallback;
                /**
                 * The ease function this tween uses.
                 */
                ease?: string | Function;
                /**
                 * Time in milliseconds before tween will start.
                 */
                delay?: number;
                /**
                 * Duration of the tween in milliseconds.
                 */
                duration?: number;
                /**
                 * Determines whether the tween should return back to its start value after hold has expired.
                 */
                yoyo?: boolean;
                /**
                 * Time in milliseconds the tween will pause before repeating or returning to its starting value if yoyo is set to true.
                 */
                hold?: number;
                /**
                 * Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.
                 */
                repeat?: number;
                /**
                 * Time in milliseconds before the repeat will start.
                 */
                repeatDelay?: number;
                /**
                 * Should toggleFlipX be called when yoyo or repeat happens?
                 */
                flipX?: boolean;
                /**
                 * Should toggleFlipY be called when yoyo or repeat happens?
                 */
                flipY?: boolean;
                /**
                 * The interpolation function to use if the `value` given is an array of numbers.
                 */
                interpolation?: string | Function;
            };

        }

    }

    namespace Physics {
        namespace Arcade {
            /**
             * An Arcade Physics Image is a standard Image Game Object with an Arcade Physics body and related
             * physics components mixed in. It is the lightest-weight physics-enabled Game Object available in
             * Arcade Physics, making it ideal for static scenery, collectibles, platforms, bullets, or any
             * non-animated object that needs to participate in physics collisions and overlap checks.
             * 
             * The physics body can be either dynamic (affected by velocity, acceleration, and gravity) or
             * static (immovable, used for platforms and boundaries). Physics behaviour is controlled via the
             * mixed-in Arcade Physics components such as Velocity, Acceleration, Bounce, Gravity, and so on.
             * 
             * The key difference between an Arcade Image and an Arcade Sprite is that an Arcade Image cannot
             * play texture-based animations. If you need frame animations, use `Phaser.Physics.Arcade.Sprite`
             * instead. If you only need a static or programmatically-moved object without animations, the
             * Arcade Image is the more efficient choice.
             * 
             * You should not normally create an ArcadeImage directly. Instead, use the factory method
             * `this.physics.add.image()` from within a Scene, which creates the image and adds its body
             * to the Arcade Physics world automatically.
             */
            class Image extends Phaser.GameObjects.Image implements Phaser.Physics.Arcade.Components.Acceleration, Phaser.Physics.Arcade.Components.Angular, Phaser.Physics.Arcade.Components.Bounce, Phaser.Physics.Arcade.Components.Collision, Phaser.Physics.Arcade.Components.Debug, Phaser.Physics.Arcade.Components.Drag, Phaser.Physics.Arcade.Components.Enable, Phaser.Physics.Arcade.Components.Friction, Phaser.Physics.Arcade.Components.Gravity, Phaser.Physics.Arcade.Components.Immovable, Phaser.Physics.Arcade.Components.Mass, Phaser.Physics.Arcade.Components.Pushable, Phaser.Physics.Arcade.Components.Size, Phaser.Physics.Arcade.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
                /**
                 * 
                 * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with.
                 */
                constructor(scene: Phaser.Scene, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number);

                /**
                 * This Game Object's Physics Body.
                 */
                body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody | null;

                /**
                 * The Camera used for filters.
                 * You can use this to alter the perspective of filters.
                 * It is not necessary to use this camera for ordinary rendering.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                filterCamera: Phaser.Cameras.Scene2D.Camera;

                /**
                 * The filter lists for this Game Object.
                 * This is an object with `internal` and `external` properties.
                 * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

                /**
                 * Whether any filters should be rendered on this Game Object.
                 * This is `true` by default, even if there are no filters yet.
                 * Disable this to skip filter rendering.
                 * 
                 * Use `willRenderFilters()` to see if there are any active filters.
                 */
                renderFilters: boolean;

                /**
                 * The maximum size of the base filter texture.
                 * Filters may use a larger texture after the base texture is rendered.
                 * The maximum texture size is at least 4096 in WebGL, based on the hardware.
                 * You may set this lower to save memory or prevent resizing.
                 */
                maxFilterSize: Phaser.Math.Vector2;

                /**
                 * Whether `filterCamera` should update every frame
                 * to focus on the Game Object.
                 * Disable this if you want to manually control the camera.
                 */
                filtersAutoFocus: boolean;

                /**
                 * Whether the filters should focus on the context,
                 * rather than attempt to focus on the Game Object.
                 * This is enabled automatically when enabling filters on objects
                 * which don't have well-defined bounds.
                 * 
                 * This effectively sets the internal filters to render the same way
                 * as the external filters.
                 * 
                 * This is only used if `filtersAutoFocus` is enabled.
                 * 
                 * The "context" is the framebuffer to which the Game Object is rendered.
                 * This is usually the main framebuffer, but might be another framebuffer.
                 * It can even be several different framebuffers if the Game Object is
                 * rendered multiple times.
                 */
                filtersFocusContext: boolean;

                /**
                 * Whether the Filters component should always draw to a framebuffer,
                 * even if there are no active filters.
                 */
                filtersForceComposite: boolean;

                /**
                 * Whether this Game Object will render filters.
                 * This is true if it has active filters,
                 * and if the `renderFilters` property is also true.undefined
                 * @returns Whether the Game Object will render filters.
                 */
                willRenderFilters(): boolean;

                /**
                 * Enable this Game Object to have filters.
                 * 
                 * You need to call this method if you want to use the `filterCamera`
                 * and `filters` properties. It sets up the necessary data structures.
                 * You may disable filter rendering with the `renderFilters` property.
                 * 
                 * This is a WebGL only feature. It will return early if not available.undefined
                 * @returns undefined
                 */
                enableFilters(): this;

                /**
                 * Render this object using filters.
                 * 
                 * This function's scope is not guaranteed, so it doesn't refer to `this`.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
                 * @returns undefined
                 */
                renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

                /**
                 * Focus the filter camera.
                 * This sets the size and position of the filter camera to match the GameObject.
                 * This is called automatically on render if `filtersAutoFocus` is enabled.
                 * 
                 * This will focus on the GameObject's raw dimensions if available.
                 * If the GameObject has no dimensions, this will focus on the context:
                 * the camera belonging to the DrawingContext used to render the GameObject.
                 * Context focus occurs during rendering,
                 * as the context is not known until then.undefined
                 * @returns undefined
                 */
                focusFilters(): this;

                /**
                 * Focus the filter camera on a specific camera.
                 * This is used internally when `filtersFocusContext` is enabled.
                 * @param camera The camera to focus on.
                 * @returns undefined
                 */
                focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

                /**
                 * Manually override the focus of the filter camera.
                 * This allows you to set the size and position of the filter camera manually.
                 * It deactivates `filtersAutoFocus` when called.
                 * 
                 * The camera will set scroll to place the game object at the
                 * given position within a rectangle of the given width and height.
                 * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
                 * will focus the camera to place the object's center
                 * 100 pixels above the center of the camera (which is at 400x300).
                 * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param width The width of the focus area. Default is the filter width.
                 * @param height The height of the focus area. Default is the filter height.
                 * @returns undefined
                 */
                focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Set the base size of the filter camera.
                 * This is the size of the texture that internal filters will be drawn to.
                 * External filters are drawn to the size of the context (usually the game canvas).
                 * 
                 * This is typically the size of the GameObject.
                 * It is set automatically when the Game Object is rendered
                 * and `filtersAutoFocus` is enabled.
                 * Turn off auto focus to set it manually.
                 * 
                 * Technically, larger framebuffers may be used to provide padding.
                 * This is the size of the final framebuffer used for "internal" rendering.
                 * @param width Base width of the filter texture.
                 * @param height Base height of the filter texture.
                 * @returns undefined
                 */
                setFilterSize(width: number, height: number): this;

                /**
                 * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
                 * Sets the `filtersAutoFocus` property.
                 * @param value Whether filters should be updated every frame.
                 * @returns undefined
                 */
                setFiltersAutoFocus(value: boolean): this;

                /**
                 * Set whether the filters should focus on the context.
                 * Sets the `filtersFocusContext` property.
                 * @param value Whether the filters should focus on the context.
                 * @returns undefined
                 */
                setFiltersFocusContext(value: boolean): this;

                /**
                 * Set whether the filters should always draw to a framebuffer.
                 * Sets the `filtersForceComposite` property.
                 * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
                 * @returns undefined
                 */
                setFiltersForceComposite(value: boolean): this;

                /**
                 * Set whether the filters should be rendered.
                 * Sets the `renderFilters` property.
                 * @param value Whether the filters should be rendered.
                 * @returns undefined
                 */
                setRenderFilters(value: boolean): this;

                /**
                 * Run a step in the render process.
                 * This is called automatically by the Render module.
                 * 
                 * In most cases, it just runs the `renderWebGL` function.
                 * 
                 * When `_renderSteps` has more than one entry,
                 * such as when Filters are enabled for this object,
                 * it allows those processes to defer `renderWebGL`
                 * and otherwise manage the flow of rendering.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep Which step of the rendering process should be run? Default 0.
                 * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
                 * @param displayListIndex The index of the Game Object within the display list. Default 0.
                 */
                renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

                /**
                 * Adds a render step function to this Game Object's WebGL render pipeline.
                 * 
                 * The first render step in `_renderSteps` is run first.
                 * It should call the next render step in the list.
                 * This allows render steps to control the rendering flow.
                 * @param fn The render step function to add.
                 * @param index The index in the render list to add the step to. Omit to add to the end.
                 * @returns This Game Object instance.
                 */
                addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

                /**
                 * Clears all alpha values associated with this Game Object.
                 * 
                 * Immediately sets the alpha levels back to 1 (fully opaque).undefined
                 * @returns This Game Object instance.
                 */
                clearAlpha(): this;

                /**
                 * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
                 * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
                 * 
                 * If your game is running under WebGL you can optionally specify four different alpha values, each of which
                 * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
                 * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
                 * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
                 * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
                 * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
                 * @returns This Game Object instance.
                 */
                setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

                /**
                 * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
                 * 
                 * This is a global value that impacts the entire Game Object. Setting it also updates
                 * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
                 * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
                 */
                alpha: number;

                /**
                 * The alpha value starting from the top-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopLeft: number;

                /**
                 * The alpha value starting from the top-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopRight: number;

                /**
                 * The alpha value starting from the bottom-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomLeft: number;

                /**
                 * The alpha value starting from the bottom-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomRight: number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 */
                blendMode: Phaser.BlendModes | string | number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 * @param value The BlendMode value. Either a string, a CONST or a number.
                 * @returns This Game Object instance.
                 */
                setBlendMode(value: string | Phaser.BlendModes | number): this;

                /**
                 * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * The default depth is zero. A Game Object with a higher depth
                 * value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 */
                depth: number;

                /**
                 * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * A Game Object with a higher depth value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
                 * @returns This Game Object instance.
                 */
                setDepth(value: number): this;

                /**
                 * Sets this Game Object to be at the top of the display list, or the top of its parent container.
                 * 
                 * Being at the top means it will render on top of everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToTop(): this;

                /**
                 * Sets this Game Object to the back of the display list, or the back of its parent container.
                 * 
                 * Being at the back means it will render below everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToBack(): this;

                /**
                 * Move this Game Object so that it appears above the given Game Object.
                 * 
                 * This means it will render immediately after the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be above.
                 * @returns This Game Object instance.
                 */
                setAbove(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * Move this Game Object so that it appears below the given Game Object.
                 * 
                 * This means it will render immediately under the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be below.
                 * @returns This Game Object instance.
                 */
                setBelow(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * The horizontally flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipX: boolean;

                /**
                 * The vertically flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipY: boolean;

                /**
                 * Toggles the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipX(): this;

                /**
                 * Toggles the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipY(): this;

                /**
                 * Sets the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipX(value: boolean): this;

                /**
                 * Sets the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipY(value: boolean): this;

                /**
                 * Sets the horizontal and vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped will render inverted on the flipped axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
                 * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlip(x: boolean, y: boolean): this;

                /**
                 * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
                 * @returns This Game Object instance.
                 */
                resetFlip(): this;

                /**
                 * Gets the center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the left-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the right-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
                 * 
                 * The bounding rectangle is computed by retrieving all four corner positions of the
                 * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
                 * and parent Container transforms, and then calculating the smallest axis-aligned
                 * rectangle that fully encloses all four points.
                 * 
                 * The values are stored and returned in a Rectangle, or Rectangle-like, object.
                 * @param output An object to store the values in. If not provided a new Rectangle will be created.
                 * @returns The values stored in the output object.
                 */
                getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

                /**
                 * Controls whether this Game Object participates in the WebGL lighting system.
                 * When `true`, the object will respond to dynamic lights added via the Lights plugin,
                 * using normal maps to calculate per-pixel diffuse lighting.
                 * 
                 * This flag is used to select the appropriate WebGL shader at render time.
                 */
                readonly lighting: boolean;

                /**
                 * Configuration object controlling self-shadowing for this Game Object.
                 * Self-shadowing causes surfaces to cast contact shadows on themselves based on
                 * the normal map, giving the appearance of depth. It is only active when
                 * `lighting` is also enabled.
                 * 
                 * If `enabled` is `null`, the value from the game config option `render.selfShadow`
                 * is used instead.
                 * 
                 * This object is used to select and configure the appropriate WebGL shader at render time.
                 */
                selfShadow: Object;

                /**
                 * Enables or disables WebGL-based per-pixel lighting for this Game Object.
                 * When enabled, the object will respond to dynamic lights added to the scene
                 * via the Lights plugin, using a normal map for lighting calculations.
                 * Disabling lighting restores the standard unlit rendering path.
                 * @param enable `true` to use lighting, or `false` to disable it.
                 * @returns This GameObject instance.
                 */
                setLighting(enable: boolean): this;

                /**
                 * Configures the self-shadowing properties of this Game Object.
                 * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
                 * giving the impression of depth and raised detail. It is only active when
                 * `lighting` is also enabled on this Game Object.
                 * 
                 * Parameters that are `undefined` are left unchanged, allowing partial updates.
                 * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
                 * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
                 * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
                 * @returns This GameObject instance.
                 */
                setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

                /**
                 * The Mask this Game Object is using during render, or `null` if no mask has been set.
                 */
                mask: Phaser.Display.Masks.GeometryMask;

                /**
                 * Sets the mask that this Game Object will use to render with.
                 * 
                 * The mask must have been previously created and must be a GeometryMask.
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * 
                 * If a mask is already set on this Game Object it will be immediately replaced.
                 * 
                 * Masks are positioned in global space and are not relative to the Game Object to which they
                 * are applied. The reason for this is that multiple Game Objects can all share the same mask.
                 * 
                 * Masks have no impact on physics or input detection. They are purely a rendering component
                 * that allows you to limit what is visible during the render pass.
                 * @param mask The mask this Game Object will use when rendering.
                 * @returns This Game Object instance.
                 */
                setMask(mask: Phaser.Display.Masks.GeometryMask): this;

                /**
                 * Clears the mask that this Game Object was using.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param destroyMask Destroy the mask before clearing it? Default false.
                 * @returns This Game Object instance.
                 */
                clearMask(destroyMask?: boolean): this;

                /**
                 * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
                 * including this one.
                 * 
                 * To create the mask you need to pass in a reference to a Graphics Game Object.
                 * 
                 * If you do not provide a graphics object, and this Game Object is an instance
                 * of a Graphics object, then it will use itself to create the mask.
                 * 
                 * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
                 * @returns This Geometry Mask that was created.
                 */
                createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

                /**
                 * The horizontal origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the left of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originX: number;

                /**
                 * The vertical origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the top of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originY: number;

                /**
                 * The horizontal display origin of this Game Object, expressed in pixels.
                 * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
                 * Setting this property updates `originX` accordingly.
                 */
                displayOriginX: number;

                /**
                 * The vertical display origin of this Game Object, expressed in pixels.
                 * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
                 * Setting this property updates `originY` accordingly.
                 */
                displayOriginY: number;

                /**
                 * Sets the origin of this Game Object.
                 * 
                 * The values are given in the range 0 to 1.
                 * @param x The horizontal origin value. Default 0.5.
                 * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setOrigin(x?: number, y?: number): this;

                /**
                 * Sets the origin of this Game Object based on the Pivot values in its Frame.
                 * If the Frame has a custom pivot point defined, the origin is set to match it.
                 * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
                 * resetting the origin to the default value of 0.5 for both axes.undefined
                 * @returns This Game Object instance.
                 */
                setOriginFromFrame(): this;

                /**
                 * Sets the display origin of this Game Object.
                 * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
                 * @param x The horizontal display origin value. Default 0.
                 * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setDisplayOrigin(x?: number, y?: number): this;

                /**
                 * Updates the Display Origin cached values internally stored on this Game Object.
                 * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
                 * @returns This Game Object instance.
                 */
                updateDisplayOrigin(): this;

                /**
                 * Customized WebGL render nodes of this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * A default set of RenderNodes is coded into the engine,
                 * but the renderer will check this object first to see if a custom node has been set.
                 */
                customRenderNodes: object;

                /**
                 * The default RenderNodes for this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * These are the nodes that are used if no custom ones are set.
                 * 
                 * RenderNodes are identified by a unique key for their role.
                 * 
                 * Common role keys include:
                 * 
                 * - 'Submitter': responsible for running other node roles for each element.
                 * - 'Transformer': responsible for providing vertex coordinates for an element.
                 * - 'Texturer': responsible for handling textures for an element.
                 */
                defaultRenderNodes: object;

                /**
                 * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * 
                 * Render nodes store their data under their own name, not their role.
                 */
                renderNodeData: object;

                /**
                 * Initializes the render nodes for this Game Object.
                 * 
                 * This method is called when the Game Object is added to the Scene.
                 * It is responsible for setting up the default render nodes
                 * this Game Object will use.
                 * @param defaultNodes The default render nodes to set for this Game Object.
                 */
                initRenderNodes(defaultNodes: Map<string, string>): void;

                /**
                 * Sets the RenderNode for a given role.
                 * 
                 * Also sets the relevant render node data object, if specified.
                 * 
                 * If the node cannot be set, no changes are made.
                 * @param key The key of the role to set the render node for.
                 * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
                 * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
                 * @returns This Game Object instance.
                 */
                setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

                /**
                 * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
                 * 
                 * If `key` is not set, it is created. If it is set, it is updated.
                 * 
                 * If `value` is undefined and `key` exists, the key is removed.
                 * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
                 * @param key The key of the property to set.
                 * @param value The value to set the property to.
                 * @returns This Game Object instance.
                 */
                setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

                /**
                 * The horizontal scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorX: number;

                /**
                 * The vertical scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorY: number;

                /**
                 * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
                 * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
                 * and `scrollFactorY` in a single call.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 * @param x The horizontal scroll factor of this Game Object.
                 * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScrollFactor(x: number, y?: number): this;

                /**
                 * The native (un-scaled) width of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayWidth` property.
                 */
                width: number;

                /**
                 * The native (un-scaled) height of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayHeight` property.
                 */
                height: number;

                /**
                 * The displayed width of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayWidth: number;

                /**
                 * The displayed height of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayHeight: number;

                /**
                 * Sets the size of this Game Object to be that of the given Frame.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param frame The frame to base the size of this Game Object on.
                 * @returns This Game Object instance.
                 */
                setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

                /**
                 * Sets the internal size of this Game Object, as used for frame or physics body creation.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setSize(width: number, height: number): this;

                /**
                 * Sets the display (rendered) size of this Game Object in pixels.
                 * 
                 * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
                 * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
                 * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
                 * the scale manually, but more convenient when you want to work in pixel values directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setDisplaySize(width: number, height: number): this;

                /**
                 * The Texture this Game Object is using to render with.
                 */
                texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

                /**
                 * The Texture Frame this Game Object is using to render with.
                 */
                frame: Phaser.Textures.Frame;

                /**
                 * A boolean flag indicating if this Game Object is being cropped or not.
                 * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
                 * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
                 */
                isCropped: boolean;

                /**
                 * Applies a crop to a texture based Game Object, such as a Sprite or Image.
                 * 
                 * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
                 * 
                 * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
                 * changes what is shown when rendered.
                 * 
                 * The crop size as well as coordinates can not exceed the size of the texture frame.
                 * 
                 * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
                 * 
                 * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
                 * half of it, you could call `setCrop(0, 0, 400, 600)`.
                 * 
                 * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
                 * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
                 * 
                 * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
                 * 
                 * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
                 * 
                 * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
                 * the renderer to skip several internal calculations.
                 * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
                 * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
                 * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
                 * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
                 * @returns This Game Object instance.
                 */
                setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

                /**
                 * Sets the texture and frame this Game Object will use to render with.
                 * 
                 * Textures are referenced by their string-based keys, as stored in the Texture Manager.
                 * @param key The key of the texture to be used, as stored in the Texture Manager.
                 * @param frame The name or index of the frame within the Texture.
                 * @returns This Game Object instance.
                 */
                setTexture(key: string, frame?: string | number): this;

                /**
                 * Sets the frame this Game Object will use to render with.
                 * 
                 * If you pass a string or index then the Frame has to belong to the current Texture being used
                 * by this Game Object.
                 * 
                 * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
                 * 
                 * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
                 * 
                 * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
                 * @param frame The name or index of the frame within the Texture, or a Frame instance.
                 * @param updateSize Should this call adjust the size of the Game Object? Default true.
                 * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
                 * @returns This Game Object instance.
                 */
                setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

                /**
                 * The tint value being applied to the top-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopLeft: number;

                /**
                 * The tint value being applied to the top-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopRight: number;

                /**
                 * The tint value being applied to the bottom-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomLeft: number;

                /**
                 * The tint value being applied to the bottom-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomRight: number;

                /**
                 * The tint mode to use when applying the tint to the texture.
                 * 
                 * Available modes are:
                 * - Phaser.TintModes.MULTIPLY (default)
                 * - Phaser.TintModes.FILL
                 * - Phaser.TintModes.ADD
                 * - Phaser.TintModes.SCREEN
                 * - Phaser.TintModes.OVERLAY
                 * - Phaser.TintModes.HARD_LIGHT
                 * 
                 * Note that in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 */
                tintMode: Phaser.TintModes;

                /**
                 * Clears all tint values associated with this Game Object.
                 * 
                 * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
                 * which results in no visible change to the texture.undefined
                 * @returns This Game Object instance.
                 */
                clearTint(): this;

                /**
                 * Sets the tint color on this Game Object.
                 * 
                 * The tint works by taking the pixel color values from the Game Objects texture, and then
                 * combining it with the color value of the tint. You can provide either one color value,
                 * in which case the whole Game Object will be tinted in that color. Or you can provide a color
                 * per corner. The colors are blended together across the extent of the Game Object.
                 * 
                 * To modify the tint color once set, either call this method again with new values or use the
                 * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
                 * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
                 * 
                 * To remove a tint call `clearTint`.
                 * 
                 * The tint color is combined according to the tint mode.
                 * By default, this is `MULTIPLY`.
                 * 
                 * Note that, in Phaser 3, this would also swap the tint mode if it was set
                 * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
                 * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
                 * @param topRight The tint being applied to the top-right of the Game Object.
                 * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
                 * @param bottomRight The tint being applied to the bottom-right of the Game Object.
                 * @returns This Game Object instance.
                 */
                setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

                /**
                 * Sets the tint mode to use when applying the tint to the texture.
                 * 
                 * Note that, in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 * @param mode The tint mode to use.
                 * @returns This Game Object instance.
                 */
                setTintMode(mode: number | Phaser.TintModes): this;

                /**
                 * Deprecated method which does nothing.
                 * In Phaser 3, this would set the tint color, and set the tint mode to fill.
                 * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
                 */
                setTintFill(): void;

                /**
                 * The tint value being applied to the whole of the Game Object.
                 * Returns the value of `tintTopLeft` when read. When written, the same
                 * color value is applied to all four corner tint properties (`tintTopLeft`,
                 * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
                 */
                tint: number;

                /**
                 * Does this Game Object have a tint applied?
                 * 
                 * Returns `true` if any of the four corner tint values differ from 0xffffff,
                 * or if the `tintMode` property is set to anything other than `MULTIPLY`.
                 * Returns `false` when all four tint values are 0xffffff and the tint mode
                 * is `MULTIPLY`, which is the default untinted state.
                 */
                readonly isTinted: boolean;

                /**
                 * A property indicating that a Game Object has this component.
                 */
                readonly hasTransformComponent: boolean;

                /**
                 * The x position of this Game Object.
                 */
                x: number;

                /**
                 * The y position of this Game Object.
                 */
                y: number;

                /**
                 * The z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#depth} instead.
                 */
                z: number;

                /**
                 * The w position of this Game Object.
                 */
                w: number;

                /**
                 * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
                 * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
                 * 
                 * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
                 * isn't the case, use the `scaleX` or `scaleY` properties instead.
                 */
                scale: number;

                /**
                 * The horizontal scale of this Game Object.
                 */
                scaleX: number;

                /**
                 * The vertical scale of this Game Object.
                 */
                scaleY: number;

                /**
                 * The angle of this Game Object as expressed in degrees.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
                 * and -90 is up.
                 * 
                 * If you prefer to work in radians, see the `rotation` property instead.
                 */
                angle: number;

                /**
                 * The angle of this Game Object in radians.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
                 * and -PI/2 is up.
                 * 
                 * If you prefer to work in degrees, see the `angle` property instead.
                 */
                rotation: number;

                /**
                 * Sets the position of this Game Object.
                 * @param x The x position of this Game Object. Default 0.
                 * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
                 * @param z The z position of this Game Object. Default 0.
                 * @param w The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setPosition(x?: number, y?: number, z?: number, w?: number): this;

                /**
                 * Copies an object's coordinates to this Game Object's position.
                 * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
                 * @returns This Game Object instance.
                 */
                copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

                /**
                 * Sets the position of this Game Object to be a random position within the confines of
                 * the given area.
                 * 
                 * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
                 * 
                 * The position does not factor in the size of this Game Object, meaning that only the origin is
                 * guaranteed to be within the area.
                 * @param x The x position of the top-left of the random area. Default 0.
                 * @param y The y position of the top-left of the random area. Default 0.
                 * @param width The width of the random area.
                 * @param height The height of the random area.
                 * @returns This Game Object instance.
                 */
                setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Sets the rotation of this Game Object.
                 * @param radians The rotation of this Game Object, in radians. Default 0.
                 * @returns This Game Object instance.
                 */
                setRotation(radians?: number): this;

                /**
                 * Sets the angle of this Game Object.
                 * @param degrees The rotation of this Game Object, in degrees. Default 0.
                 * @returns This Game Object instance.
                 */
                setAngle(degrees?: number): this;

                /**
                 * Sets the scale of this Game Object.
                 * @param x The horizontal scale of this Game Object. Default 1.
                 * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScale(x?: number, y?: number): this;

                /**
                 * Sets the x position of this Game Object.
                 * @param value The x position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setX(value?: number): this;

                /**
                 * Sets the y position of this Game Object.
                 * @param value The y position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setY(value?: number): this;

                /**
                 * Sets the z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
                 * @param value The z position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setZ(value?: number): this;

                /**
                 * Sets the w position of this Game Object.
                 * @param value The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setW(value?: number): this;

                /**
                 * Gets the local transform matrix for this Game Object.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @returns The populated Transform Matrix.
                 */
                getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @param parentMatrix A temporary matrix to hold parent values during the calculations.
                 * @returns The populated Transform Matrix.
                 */
                getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Takes the given `x` and `y` coordinates and converts them into local space for this
                 * Game Object, taking into account parent and local transforms, and the Display Origin.
                 * 
                 * The returned Vector2 contains the translated point in its properties.
                 * 
                 * A Camera needs to be provided in order to handle modified scroll factors. If no
                 * camera is specified, it will use the `main` camera from the Scene to which this
                 * Game Object belongs.
                 * @param x The x position to translate.
                 * @param y The y position to translate.
                 * @param point A Vector2, or point-like object, to store the results in.
                 * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
                 * @returns The translated point.
                 */
                getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

                /**
                 * Gets the world position of this Game Object, factoring in any parent Containers.
                 * @param point A Vector2, or point-like object, to store the result in.
                 * @param tempMatrix A temporary matrix to hold the Game Object's values.
                 * @param parentMatrix A temporary matrix to hold parent values.
                 * @returns The world position of this Game Object.
                 */
                getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

                /**
                 * Gets the sum total rotation of all of this Game Object's parent Containers.
                 * 
                 * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
                 * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
                 */
                getParentRotation(): number;

                /**
                 * The visible state of the Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 */
                visible: boolean;

                /**
                 * Sets the visibility of this Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 * @param value The visible state of the Game Object.
                 * @returns This Game Object instance.
                 */
                setVisible(value: boolean): this;

                /**
                 * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration.
                 * @param x The horizontal acceleration, in pixels per second squared.
                 * @param y The vertical acceleration, in pixels per second squared. Default x.
                 * @returns This Game Object.
                 */
                setAcceleration(x: number, y?: number): this;

                /**
                 * Sets the body's horizontal acceleration.
                 * @param value The horizontal acceleration, in pixels per second squared.
                 * @returns This Game Object.
                 */
                setAccelerationX(value: number): this;

                /**
                 * Sets the body's vertical acceleration.
                 * @param value The vertical acceleration, in pixels per second squared.
                 * @returns This Game Object.
                 */
                setAccelerationY(value: number): this;

                /**
                 * Sets the angular velocity of the body.
                 * 
                 * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.
                 * However, they can have angular motion, which is passed on to the Game Object bound to the body,
                 * causing them to visually rotate, even though the body remains axis-aligned.
                 * @param value The amount of angular velocity, in degrees per second.
                 * @returns This Game Object.
                 */
                setAngularVelocity(value: number): this;

                /**
                 * Sets the angular acceleration of the body.
                 * 
                 * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.
                 * However, they can have angular motion, which is passed on to the Game Object bound to the body,
                 * causing them to visually rotate, even though the body remains axis-aligned.
                 * @param value The amount of angular acceleration, in degrees per second squared.
                 * @returns This Game Object.
                 */
                setAngularAcceleration(value: number): this;

                /**
                 * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration.
                 * @param value The amount of drag, in degrees per second squared.
                 * @returns This Game Object.
                 */
                setAngularDrag(value: number): this;

                /**
                 * Sets the bounce values of this body.
                 * 
                 * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object.
                 * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all.
                 * @param x The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.
                 * @param y The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. Default x.
                 * @returns This Game Object.
                 */
                setBounce(x: number, y?: number): this;

                /**
                 * Sets the horizontal bounce value for this body. This is the amount of restitution applied
                 * on the x-axis when the body collides with another object. A value of 1 retains full horizontal
                 * velocity after the rebound. A value of 0 means no horizontal bounce at all.
                 * @param value The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.
                 * @returns This Game Object.
                 */
                setBounceX(value: number): this;

                /**
                 * Sets the vertical bounce value for this body. This is the amount of restitution applied
                 * on the y-axis when the body collides with another object. A value of 1 retains full vertical
                 * velocity after the rebound. A value of 0 means no vertical bounce at all.
                 * @param value The amount of vertical bounce to apply on collision. A float, typically between 0 and 1.
                 * @returns This Game Object.
                 */
                setBounceY(value: number): this;

                /**
                 * Sets whether this Body collides with the world boundary.
                 * 
                 * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first.
                 * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true.
                 * @param bounceX If given, this will replace the `worldBounce.x` value.
                 * @param bounceY If given, this will replace the `worldBounce.y` value.
                 * @param onWorldBounds If given this replaces the Body's `onWorldBounds` value.
                 * @returns This Game Object.
                 */
                setCollideWorldBounds(value?: boolean, bounceX?: number, bounceY?: number, onWorldBounds?: boolean): this;

                /**
                 * Sets the Collision Category that this Arcade Physics Body
                 * will use in order to determine what it can collide with.
                 * 
                 * It can only have one single category assigned to it.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
                 * @returns This Game Object.
                 */
                setCollisionCategory(category: number): this;

                /**
                 * Checks to see if the given Collision Category will collide with
                 * this Arcade Physics object or not.
                 * @param category Collision category value to test.
                 * @returns `true` if the given category will collide with this object, otherwise `false`.
                 */
                willCollideWith(category: number): boolean;

                /**
                 * Adds the given Collision Category to the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to add to this body's collision mask.
                 * @returns This Game Object.
                 */
                addCollidesWith(category: number): this;

                /**
                 * Removes the given Collision Category from the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to remove from this body's collision mask.
                 * @returns This Game Object.
                 */
                removeCollidesWith(category: number): this;

                /**
                 * Sets all of the Collision Categories that this Arcade Physics Body
                 * will collide with. You can either pass a single category value, or
                 * an array of them.
                 * 
                 * Calling this method will reset all of the collision categories,
                 * so only those passed to this method are enabled.
                 * 
                 * If you wish to add a new category to the existing mask, call
                 * the `addCollidesWith` method.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param categories The collision category to collide with, or an array of them.
                 * @returns This Game Object.
                 */
                setCollidesWith(categories: number | number[]): this;

                /**
                 * Resets the Collision Category and Mask back to the defaults,
                 * which means the body will belong to category 1 and will collide with all other categories.undefined
                 * @returns This Game Object.
                 */
                resetCollisionCategory(): this;

                /**
                 * Sets the debug values of this body.
                 * 
                 * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole.
                 * Note that there is a performance cost in drawing debug displays. It should never be used in production.
                 * @param showBody Set to `true` to have this body render its outline to the debug display.
                 * @param showVelocity Set to `true` to have this body render a velocity marker to the debug display.
                 * @param bodyColor The color of the body outline when rendered to the debug display.
                 * @returns This Game Object.
                 */
                setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this;

                /**
                 * Sets the color of the body outline when it renders to the debug display.
                 * @param value The color of the body outline when rendered to the debug display.
                 * @returns This Game Object.
                 */
                setDebugBodyColor(value: number): this;

                /**
                 * Set to `true` to have this body render its outline to the debug display.
                 */
                debugShowBody: boolean;

                /**
                 * Set to `true` to have this body render a velocity marker to the debug display.
                 */
                debugShowVelocity: boolean;

                /**
                 * The color of the body outline when it renders to the debug display.
                 */
                debugBodyColor: number;

                /**
                 * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag.
                 * 
                 * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
                 * It is the absolute loss of velocity due to movement, in pixels per second squared.
                 * The x and y components are applied separately.
                 * 
                 * When `useDamping` is true, this is 1 minus the damping factor.
                 * A value of 1 means the Body loses no velocity.
                 * A value of 0.95 means the Body loses 5% of its velocity per step.
                 * A value of 0.5 means the Body loses 50% of its velocity per step.
                 * 
                 * Drag is applied only when `acceleration` is zero.
                 * @param x The amount of horizontal drag to apply.
                 * @param y The amount of vertical drag to apply. Default x.
                 * @returns This Game Object.
                 */
                setDrag(x: number, y?: number): this;

                /**
                 * Sets the body's horizontal drag.
                 * 
                 * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
                 * It is the absolute loss of velocity due to movement, in pixels per second squared.
                 * The x and y components are applied separately.
                 * 
                 * When `useDamping` is true, this is 1 minus the damping factor.
                 * A value of 1 means the Body loses no velocity.
                 * A value of 0.95 means the Body loses 5% of its velocity per step.
                 * A value of 0.5 means the Body loses 50% of its velocity per step.
                 * 
                 * Drag is applied only when `acceleration` is zero.
                 * @param value The amount of horizontal drag to apply.
                 * @returns This Game Object.
                 */
                setDragX(value: number): this;

                /**
                 * Sets the body's vertical drag.
                 * 
                 * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
                 * It is the absolute loss of velocity due to movement, in pixels per second squared.
                 * The x and y components are applied separately.
                 * 
                 * When `useDamping` is true, this is 1 minus the damping factor.
                 * A value of 1 means the Body loses no velocity.
                 * A value of 0.95 means the Body loses 5% of its velocity per step.
                 * A value of 0.5 means the Body loses 50% of its velocity per step.
                 * 
                 * Drag is applied only when `acceleration` is zero.
                 * @param value The amount of vertical drag to apply.
                 * @returns This Game Object.
                 */
                setDragY(value: number): this;

                /**
                 * If this Body is using `drag` for deceleration this function controls how the drag is applied.
                 * If set to `true` drag will use a damping effect rather than a linear approach. If you are
                 * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in
                 * the game Asteroids) then you will get a far smoother and more visually correct deceleration
                 * by using damping, avoiding the axis-drift that is prone with linear deceleration.
                 * 
                 * If you enable this property then you should use far smaller `drag` values than with linear, as
                 * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow
                 * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.
                 * @param value `true` to use damping for deceleration, or `false` to use linear deceleration.
                 * @returns This Game Object.
                 */
                setDamping(value: boolean): this;

                /**
                 * Sets whether this Body should calculate its velocity based on its change in
                 * position every frame. The default, which is to not do this, means that you
                 * make this Body move by setting the velocity directly. However, if you are
                 * trying to move this Body via a Tween, or have it follow a Path, then you
                 * should enable this instead. This will allow it to still collide with other
                 * bodies, something that isn't possible if you're just changing its position directly.
                 * @param value `true` if the Body calculates velocity based on changes in position, otherwise `false`. Default true.
                 * @returns This Game Object.
                 */
                setDirectControl(value?: boolean): this;

                /**
                 * Enables this Game Object's Arcade Physics Body, allowing it to participate in
                 * collision and overlap detection within the physics simulation. Optionally resets
                 * the Body and repositions the Game Object at the given coordinates. If you reset
                 * the Body you must also pass `x` and `y`. You can also optionally set the Game
                 * Object's `active` and `visible` properties at the same time.
                 * @param reset Also reset the Body and place the Game Object at (x, y).
                 * @param x The horizontal position to place the Game Object, if `reset` is true.
                 * @param y The vertical position to place the Game Object, if `reset` is true.
                 * @param enableGameObject Also set this Game Object's `active` to true.
                 * @param showGameObject Also set this Game Object's `visible` to true.
                 * @returns This Game Object.
                 */
                enableBody(reset?: boolean, x?: number, y?: number, enableGameObject?: boolean, showGameObject?: boolean): this;

                /**
                 * Stops and disables this Game Object's Arcade Physics Body. The body's velocity is
                 * set to zero and it is removed from collision and overlap detection within the physics
                 * simulation. Optionally sets the Game Object's `active` and `visible` properties to
                 * false at the same time, which is useful when deactivating pooled Game Objects.
                 * @param disableGameObject Also set this Game Object's `active` to false. Default false.
                 * @param hideGameObject Also set this Game Object's `visible` to false. Default false.
                 * @returns This Game Object.
                 */
                disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this;

                /**
                 * Syncs the Body's position and size with its parent Game Object.
                 * You don't need to call this for Dynamic Bodies, as it happens automatically.
                 * But for Static bodies it's a useful way of modifying the position of a Static Body
                 * in the Physics World, based on its Game Object.undefined
                 * @returns This Game Object.
                 */
                refreshBody(): this;

                /**
                 * Sets the friction of this game object's physics body.
                 * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body.
                 * @param x The amount of horizontal friction to apply, [0, 1].
                 * @param y The amount of vertical friction to apply, [0, 1]. Default x.
                 * @returns This Game Object.
                 */
                setFriction(x: number, y?: number): this;

                /**
                 * Sets the horizontal friction of this game object's physics body.
                 * This can move a riding body horizontally when it collides with this one on the vertical axis.
                 * @param x The amount of friction to apply, [0, 1].
                 * @returns This Game Object.
                 */
                setFrictionX(x: number): this;

                /**
                 * Sets the vertical friction of this game object's physics body.
                 * This can move a riding body vertically when it collides with this one on the horizontal axis.
                 * @param y The amount of friction to apply, [0, 1].
                 * @returns This Game Object.
                 */
                setFrictionY(y: number): this;

                /**
                 * Sets the body gravity for both the X and Y axes. This is an acceleration applied to
                 * this body in addition to the world gravity, in pixels per second squared. Values can
                 * be positive or negative. Larger absolute values result in a stronger effect.
                 * 
                 * If only one value is provided, it will be used for both the X and Y axes.
                 * @param x The gravitational acceleration to be applied to the X-axis, in pixels per second squared.
                 * @param y The gravitational acceleration to be applied to the Y-axis, in pixels per second squared. If not specified, the X value will be used. Default x.
                 * @returns This Game Object.
                 */
                setGravity(x: number, y?: number): this;

                /**
                 * Sets the body gravity applied to the X-axis. This is an acceleration in addition to
                 * the world gravity, in pixels per second squared. Use a positive value to pull the body
                 * to the right and a negative value to pull it to the left.
                 * @param x The gravitational acceleration to be applied to the X-axis, in pixels per second squared.
                 * @returns This Game Object.
                 */
                setGravityX(x: number): this;

                /**
                 * Sets the body gravity applied to the Y-axis. This is an acceleration in addition to
                 * the world gravity, in pixels per second squared. Use a positive value to pull the body
                 * downward and a negative value to push it upward (against gravity).
                 * @param y The gravitational acceleration to be applied to the Y-axis, in pixels per second squared.
                 * @returns This Game Object.
                 */
                setGravityY(y: number): this;

                /**
                 * Sets if this Body can be separated during collisions with other bodies.
                 * 
                 * When a body is immovable it means it won't move at all, not even to separate it from collision
                 * overlap. If you just wish to prevent a body from being knocked around by other bodies, see
                 * the `setPushable` method instead.
                 * @param value Whether this body should be immovable (`true`) or movable (`false`) during collisions. Default true.
                 * @returns This Game Object.
                 */
                setImmovable(value?: boolean): this;

                /**
                 * Sets the mass of the physics body. Mass affects collision response -- heavier
                 * bodies push lighter ones more during collisions.
                 * @param value The new mass of the body. Must be a positive number.
                 * @returns This Game Object.
                 */
                setMass(value: number): this;

                /**
                 * Sets if this Body can be pushed by another Body.
                 * 
                 * A body that cannot be pushed will reflect back all of the velocity it is given to the
                 * colliding body. If that body is also not pushable, then the separation will be split
                 * between them evenly.
                 * 
                 * If you want your body to never move or separate at all, see the `setImmovable` method.
                 * @param value Whether this body can be pushed by collisions with another Body. Default true.
                 * @returns This Game Object.
                 */
                setPushable(value?: boolean): this;

                /**
                 * Sets the body offset. This allows you to adjust the difference between the center of the body
                 * and the x and y coordinates of the parent Game Object.
                 * @param x The amount to offset the body from the parent Game Object along the x-axis, in pixels.
                 * @param y The amount to offset the body from the parent Game Object along the y-axis, in pixels. Defaults to the value given for the x-axis. Default x.
                 * @returns This Game Object.
                 */
                setOffset(x: number, y?: number): this;

                /**
                 * Sets the size of this physics body. Setting the size does not adjust the dimensions of the parent Game Object.
                 * @param width The new width of the physics body, in pixels.
                 * @param height The new height of the physics body, in pixels.
                 * @param center Should the body be re-positioned so its center aligns with the parent Game Object? Default true.
                 * @returns This Game Object.
                 */
                setBodySize(width: number, height: number, center?: boolean): this;

                /**
                 * Sets this physics body to use a circle for collision instead of a rectangle.
                 * @param radius The radius of the physics body, in pixels.
                 * @param offsetX The amount to offset the body from the parent Game Object along the x-axis.
                 * @param offsetY The amount to offset the body from the parent Game Object along the y-axis.
                 * @returns This Game Object.
                 */
                setCircle(radius: number, offsetX?: number, offsetY?: number): this;

                /**
                 * Sets the velocity of the Body.
                 * @param x The horizontal velocity of the body, in pixels per second. Positive values move the body to the right, while negative values move it to the left.
                 * @param y The vertical velocity of the body, in pixels per second. Positive values move the body down, while negative values move it up. Default x.
                 * @returns This Game Object.
                 */
                setVelocity(x: number, y?: number): this;

                /**
                 * Sets the horizontal component of the body's velocity.
                 * 
                 * Positive values move the body to the right, while negative values move it to the left.
                 * @param x The new horizontal velocity, in pixels per second.
                 * @returns This Game Object.
                 */
                setVelocityX(x: number): this;

                /**
                 * Sets the vertical component of the body's velocity.
                 * 
                 * Positive values move the body down, while negative values move it up.
                 * @param y The new vertical velocity, in pixels per second.
                 * @returns This Game Object.
                 */
                setVelocityY(y: number): this;

                /**
                 * Sets the maximum velocity of the body.
                 * @param x The new maximum horizontal velocity, in pixels per second.
                 * @param y The new maximum vertical velocity, in pixels per second. Default x.
                 * @returns This Game Object.
                 */
                setMaxVelocity(x: number, y?: number): this;

            }

            /**
             * The Arcade Physics Plugin belongs to a Scene and sets up and manages the Scene's physics simulation.
             * It also holds some useful methods for moving and rotating Arcade Physics Bodies.
             * 
             * You can access it from within a Scene using `this.physics`.
             * 
             * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable
             * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.
             * The separation that stops two objects penetrating may create a new penetration against a different object. If you
             * require a high level of stability please consider using an alternative physics system, such as Matter.js.
             */
            class ArcadePhysics {
                /**
                 * 
                 * @param scene The Scene that this Plugin belongs to.
                 */
                constructor(scene: Phaser.Scene);

                /**
                 * The Scene that this Plugin belongs to.
                 */
                scene: Phaser.Scene;

                /**
                 * The Scene's Systems.
                 */
                systems: Phaser.Scenes.Systems;

                /**
                 * A configuration object. Union of the `physics.arcade.*` properties of the GameConfig and SceneConfig objects.
                 */
                config: Phaser.Types.Physics.Arcade.ArcadeWorldConfig;

                /**
                 * The physics simulation.
                 */
                world: Phaser.Physics.Arcade.World;

                /**
                 * An object holding the Arcade Physics factory methods.
                 */
                add: Phaser.Physics.Arcade.Factory;

                /**
                 * Causes `World.update` to be automatically called each time the Scene
                 * emits an `UPDATE` event. This is the default setting, so only needs
                 * calling if you have specifically disabled it.
                 */
                enableUpdate(): void;

                /**
                 * Causes `World.update` to **not** be automatically called each time the Scene
                 * emits an `UPDATE` event.
                 * 
                 * If you wish to run the World update at your own rate, or from your own
                 * component, then you should call this method to disable the built-in link,
                 * and then call `World.update(time, delta)` accordingly.
                 * 
                 * Note that `World.postUpdate` is always automatically called when the Scene
                 * emits a `POST_UPDATE` event, regardless of this setting.
                 */
                disableUpdate(): void;

                /**
                 * Creates the physics configuration for the current Scene.undefined
                 * @returns The physics configuration.
                 */
                getConfig(): Phaser.Types.Physics.Arcade.ArcadeWorldConfig;

                /**
                 * Returns the next available collision category.
                 * 
                 * You can have a maximum of 32 categories.
                 * 
                 * By default all bodies collide with all other bodies.
                 * 
                 * Use the `Body.setCollisionCategory()` and
                 * `Body.setCollidesWith()` methods to change this.undefined
                 * @returns The next collision category.
                 */
                nextCategory(): number;

                /**
                 * Tests if Game Objects overlap. See {@link Phaser.Physics.Arcade.World#overlap}
                 * @param object1 The first object or array of objects to check.
                 * @param object2 The second object or array of objects to check, or `undefined`.
                 * @param overlapCallback An optional callback function that is called if the objects overlap.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`.
                 * @param callbackContext The context in which to run the callbacks.
                 * @returns True if at least one Game Object overlaps another.
                 */
                overlap(object1: Phaser.Types.Physics.Arcade.ArcadeColliderType, object2?: Phaser.Types.Physics.Arcade.ArcadeColliderType, overlapCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): boolean;

                /**
                 * Performs a collision check and separation between the two physics enabled objects given, which can be single
                 * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.
                 * 
                 * If you don't require separation then use {@link #overlap} instead.
                 * 
                 * If two Groups or arrays are passed, each member of one will be tested against each member of the other.
                 * 
                 * If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.
                 * 
                 * If **only** one Array is passed, the array is iterated and every element in it is tested against the others.
                 * 
                 * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding
                 * objects are passed to it.
                 * 
                 * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable
                 * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.
                 * The separation that stops two objects penetrating may create a new penetration against a different object. If you
                 * require a high level of stability please consider using an alternative physics system, such as Matter.js.
                 * @param object1 The first object or array of objects to check.
                 * @param object2 The second object or array of objects to check, or `undefined`.
                 * @param collideCallback An optional callback function that is called if the objects collide.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.
                 * @param callbackContext The context in which to run the callbacks.
                 * @returns True if any overlapping Game Objects were separated, otherwise false.
                 */
                collide(object1: Phaser.Types.Physics.Arcade.ArcadeColliderType, object2?: Phaser.Types.Physics.Arcade.ArcadeColliderType, collideCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): boolean;

                /**
                 * This advanced method is specifically for testing for collision between a single Sprite and an array of Tile objects.
                 * 
                 * You should generally use the `collide` method instead, with a Sprite vs. a Tilemap Layer, as that will perform
                 * tile filtering and culling for you, as well as handle the interesting face collision automatically.
                 * 
                 * This method is offered for those who would like to check for collision with specific Tiles in a layer, without
                 * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic collisions
                 * on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,
                 * you should filter them before passing them to this method.
                 * 
                 * Important: Use of this method skips the `interesting faces` system that Tilemap Layers use. This means if you have
                 * say a row or column of tiles, and you jump into, or walk over them, it's possible to get stuck on the edges of the
                 * tiles as the interesting face calculations are skipped. However, for quick-fire small collision set tests on
                 * dynamic maps, this method can prove very useful.
                 * @param sprite The first object to check for collision.
                 * @param tiles An array of Tiles to check for collision against.
                 * @param collideCallback An optional callback function that is called if the objects collide.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.
                 * @param callbackContext The context in which to run the callbacks.
                 * @returns True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.
                 */
                collideTiles(sprite: Phaser.GameObjects.GameObject, tiles: Phaser.Tilemaps.Tile[], collideCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): boolean;

                /**
                 * This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.
                 * 
                 * You should generally use the `overlap` method instead, with a Sprite vs. a Tilemap Layer, as that will perform
                 * tile filtering and culling for you, as well as handle the interesting face collision automatically.
                 * 
                 * This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without
                 * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap
                 * tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,
                 * you should filter them before passing them to this method.
                 * @param sprite The first object to check for overlap.
                 * @param tiles An array of Tiles to check for overlap against.
                 * @param overlapCallback An optional callback function that is called if the objects overlap.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`.
                 * @param callbackContext The context in which to run the callbacks.
                 * @returns True if any objects overlap.
                 */
                overlapTiles(sprite: Phaser.GameObjects.GameObject, tiles: Phaser.Tilemaps.Tile[], overlapCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): boolean;

                /**
                 * Pauses the simulation.undefined
                 * @returns The simulation.
                 */
                pause(): Phaser.Physics.Arcade.World;

                /**
                 * Resumes the simulation (if paused).undefined
                 * @returns The simulation.
                 */
                resume(): Phaser.Physics.Arcade.World;

                /**
                 * Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared)
                 * 
                 * You must give a maximum speed value, beyond which the game object won't go any faster.
                 * 
                 * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.
                 * Note: The game object doesn't stop moving once it reaches the destination coordinates.
                 * @param gameObject Any Game Object with an Arcade Physics body.
                 * @param x The x coordinate to accelerate towards.
                 * @param y The y coordinate to accelerate towards.
                 * @param speed The acceleration (change in speed) in pixels per second squared. Default 60.
                 * @param xSpeedMax The maximum x velocity the game object can reach. Default 500.
                 * @param ySpeedMax The maximum y velocity the game object can reach. Default 500.
                 * @returns The angle (in radians) that the object should be visually set to in order to match its new velocity.
                 */
                accelerateTo(gameObject: Phaser.GameObjects.GameObject, x: number, y: number, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number;

                /**
                 * Sets the acceleration.x/y property on the game object so it will move towards the destination object at the given rate (in pixels per second squared)
                 * 
                 * You must give a maximum speed value, beyond which the game object won't go any faster.
                 * 
                 * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.
                 * Note: The game object doesn't stop moving once it reaches the destination coordinates.
                 * @param gameObject Any Game Object with an Arcade Physics body.
                 * @param destination The Game Object to move towards. Can be any object but must have visible x/y properties.
                 * @param speed The acceleration (change in speed) in pixels per second squared. Default 60.
                 * @param xSpeedMax The maximum x velocity the game object can reach. Default 500.
                 * @param ySpeedMax The maximum y velocity the game object can reach. Default 500.
                 * @returns The angle (in radians) that the object should be visually set to in order to match its new velocity.
                 */
                accelerateToObject(gameObject: Phaser.GameObjects.GameObject, destination: Phaser.GameObjects.GameObject, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number;

                /**
                 * Finds the Body or Game Object closest to a source point or object.
                 * 
                 * If a `targets` argument is passed, this method finds the closest of those.
                 * The targets can be Arcade Physics Game Objects, Dynamic Bodies, or Static Bodies.
                 * 
                 * If no `targets` argument is passed, this method finds the closest Dynamic Body.
                 * 
                 * If two or more targets are the exact same distance from the source point, only the first target
                 * is returned.
                 * @param source Any object with public `x` and `y` properties, such as a Game Object or Geometry object.
                 * @param targets The targets.
                 * @returns The target closest to the given source point.
                 */
                closest<Target extends Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|Phaser.GameObjects.GameObject>(source: Phaser.Types.Math.Vector2Like, targets?: Target[]): Target | null;

                /**
                 * Finds the Body or Game Object farthest from a source point or object.
                 * 
                 * If a `targets` argument is passed, this method finds the farthest of those.
                 * The targets can be Arcade Physics Game Objects, Dynamic Bodies, or Static Bodies.
                 * 
                 * If no `targets` argument is passed, this method finds the farthest Dynamic Body.
                 * 
                 * If two or more targets are the exact same distance from the source point, only the first target
                 * is returned.
                 * @param source Any object with public `x` and `y` properties, such as a Game Object or Geometry object.
                 * @param targets The targets.
                 * @returns The target farthest from the given source point.
                 */
                furthest(source: any, targets?: Phaser.Physics.Arcade.Body[] | Phaser.Physics.Arcade.StaticBody[] | Phaser.GameObjects.GameObject[]): Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody | Phaser.GameObjects.GameObject | null;

                /**
                 * Move the given display object towards the x/y coordinates at a steady velocity.
                 * If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.
                 * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.
                 * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
                 * Note: The display object doesn't stop moving once it reaches the destination coordinates.
                 * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)
                 * @param gameObject Any Game Object with an Arcade Physics body.
                 * @param x The x coordinate to move towards.
                 * @param y The y coordinate to move towards.
                 * @param speed The speed it will move, in pixels per second (default is 60 pixels/sec) Default 60.
                 * @param maxTime Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. Default 0.
                 * @returns The angle (in radians) that the object should be visually set to in order to match its new velocity.
                 */
                moveTo(gameObject: Phaser.GameObjects.GameObject, x: number, y: number, speed?: number, maxTime?: number): number;

                /**
                 * Move the given display object towards the destination object at a steady velocity.
                 * If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds.
                 * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.
                 * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
                 * Note: The display object doesn't stop moving once it reaches the destination coordinates.
                 * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)
                 * @param gameObject Any Game Object with an Arcade Physics body.
                 * @param destination Any object with public `x` and `y` properties, such as a Game Object or Geometry object.
                 * @param speed The speed it will move, in pixels per second (default is 60 pixels/sec) Default 60.
                 * @param maxTime Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. Default 0.
                 * @returns The angle (in radians) that the object should be visually set to in order to match its new velocity.
                 */
                moveToObject(gameObject: Phaser.GameObjects.GameObject, destination: object, speed?: number, maxTime?: number): number;

                /**
                 * Given the angle (in degrees) and speed calculate the velocity and return it as a vector, or set it to the given vector object.
                 * One way to use this is: velocityFromAngle(angle, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.
                 * @param angle The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative)
                 * @param speed The speed it will move, in pixels per second. Default 60.
                 * @param vec2 The Vector2 in which the x and y properties will be set to the calculated velocity.
                 * @returns The Vector2 that stores the velocity.
                 */
                velocityFromAngle(angle: number, speed?: number, vec2?: Phaser.Math.Vector2): Phaser.Math.Vector2;

                /**
                 * Given the rotation (in radians) and speed calculate the velocity and return it as a vector, or set it to the given vector object.
                 * One way to use this is: velocityFromRotation(rotation, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.
                 * @param rotation The angle in radians.
                 * @param speed The speed it will move, in pixels per second. Default 60.
                 * @param vec2 The Vector2 in which the x and y properties will be set to the calculated velocity.
                 * @returns The Vector2 that stores the velocity.
                 */
                velocityFromRotation(rotation: number, speed?: number, vec2?: Phaser.Math.Vector2): Phaser.Math.Vector2;

                /**
                 * This method will search the given rectangular area and return an array of all physics bodies that
                 * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.
                 * 
                 * A body only has to intersect with the search area to be considered, it doesn't have to be fully
                 * contained within it.
                 * 
                 * If Arcade Physics is set to use the RTree (which it is by default) then the search is extremely fast,
                 * otherwise the search is O(N) for Dynamic Bodies.
                 * @param x The top-left x coordinate of the area to search within.
                 * @param y The top-left y coordinate of the area to search within.
                 * @param width The width of the area to search within.
                 * @param height The height of the area to search within.
                 * @param includeDynamic Should the search include Dynamic Bodies? Default true.
                 * @param includeStatic Should the search include Static Bodies? Default false.
                 * @returns An array of bodies that overlap with the given area.
                 */
                overlapRect(x: number, y: number, width: number, height: number, includeDynamic?: boolean, includeStatic?: boolean): Phaser.Physics.Arcade.Body[] | Phaser.Physics.Arcade.StaticBody[];

                /**
                 * This method will search the given circular area and return an array of all physics bodies that
                 * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.
                 * 
                 * A body only has to intersect with the search area to be considered, it doesn't have to be fully
                 * contained within it.
                 * 
                 * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast,
                 * otherwise the search is O(N) for Dynamic Bodies.
                 * @param x The x coordinate of the center of the area to search within.
                 * @param y The y coordinate of the center of the area to search within.
                 * @param radius The radius of the area to search within.
                 * @param includeDynamic Should the search include Dynamic Bodies? Default true.
                 * @param includeStatic Should the search include Static Bodies? Default false.
                 * @returns An array of bodies that overlap with the given area.
                 */
                overlapCirc(x: number, y: number, radius: number, includeDynamic?: boolean, includeStatic?: boolean): Phaser.Physics.Arcade.Body[] | Phaser.Physics.Arcade.StaticBody[];

                /**
                 * The Scene that owns this plugin is shutting down.
                 * We need to kill and reset all internal properties as well as stop listening to Scene events.
                 */
                shutdown(): void;

                /**
                 * The Scene that owns this plugin is being destroyed.
                 * We need to shutdown and then kill off all external references.
                 */
                destroy(): void;

            }

            /**
             * An Arcade Physics Sprite is a Sprite with an Arcade Physics body and related components.
             * Arcade Physics provides a lightweight, fast AABB (axis-aligned bounding box) and circle-based
             * collision system suited for most 2D game needs.
             * 
             * The physics body can be either dynamic (affected by velocity, acceleration, and gravity) or
             * static (fixed in place, immovable by other bodies). Once the sprite is added to an Arcade Physics
             * group or the world, its `body` property is populated and you can control movement, apply forces,
             * set collision bounds, and respond to overlap and collider callbacks.
             * 
             * The main difference between an Arcade Sprite and an Arcade Image is that you cannot animate an Arcade Image.
             * If you do not require animation then you can safely use Arcade Images instead of Arcade Sprites.
             */
            class Sprite extends Phaser.GameObjects.Sprite implements Phaser.Physics.Arcade.Components.Acceleration, Phaser.Physics.Arcade.Components.Angular, Phaser.Physics.Arcade.Components.Bounce, Phaser.Physics.Arcade.Components.Collision, Phaser.Physics.Arcade.Components.Debug, Phaser.Physics.Arcade.Components.Drag, Phaser.Physics.Arcade.Components.Enable, Phaser.Physics.Arcade.Components.Friction, Phaser.Physics.Arcade.Components.Gravity, Phaser.Physics.Arcade.Components.Immovable, Phaser.Physics.Arcade.Components.Mass, Phaser.Physics.Arcade.Components.Pushable, Phaser.Physics.Arcade.Components.Size, Phaser.Physics.Arcade.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
                /**
                 * 
                 * @param scene The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with.
                 */
                constructor(scene: Phaser.Scene, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number);

                /**
                 * The Arcade Physics Body attached to this Game Object. This is set automatically when
                 * the sprite is added to an Arcade Physics group or enabled via `physics.add.existing`.
                 * Use this reference to apply velocity, acceleration, gravity, and other physics properties.
                 * It will be either a dynamic `Body` (the default) or a `StaticBody` if the sprite was
                 * created as a static physics object.
                 */
                body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody | null;

                /**
                 * The Camera used for filters.
                 * You can use this to alter the perspective of filters.
                 * It is not necessary to use this camera for ordinary rendering.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                filterCamera: Phaser.Cameras.Scene2D.Camera;

                /**
                 * The filter lists for this Game Object.
                 * This is an object with `internal` and `external` properties.
                 * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

                /**
                 * Whether any filters should be rendered on this Game Object.
                 * This is `true` by default, even if there are no filters yet.
                 * Disable this to skip filter rendering.
                 * 
                 * Use `willRenderFilters()` to see if there are any active filters.
                 */
                renderFilters: boolean;

                /**
                 * The maximum size of the base filter texture.
                 * Filters may use a larger texture after the base texture is rendered.
                 * The maximum texture size is at least 4096 in WebGL, based on the hardware.
                 * You may set this lower to save memory or prevent resizing.
                 */
                maxFilterSize: Phaser.Math.Vector2;

                /**
                 * Whether `filterCamera` should update every frame
                 * to focus on the Game Object.
                 * Disable this if you want to manually control the camera.
                 */
                filtersAutoFocus: boolean;

                /**
                 * Whether the filters should focus on the context,
                 * rather than attempt to focus on the Game Object.
                 * This is enabled automatically when enabling filters on objects
                 * which don't have well-defined bounds.
                 * 
                 * This effectively sets the internal filters to render the same way
                 * as the external filters.
                 * 
                 * This is only used if `filtersAutoFocus` is enabled.
                 * 
                 * The "context" is the framebuffer to which the Game Object is rendered.
                 * This is usually the main framebuffer, but might be another framebuffer.
                 * It can even be several different framebuffers if the Game Object is
                 * rendered multiple times.
                 */
                filtersFocusContext: boolean;

                /**
                 * Whether the Filters component should always draw to a framebuffer,
                 * even if there are no active filters.
                 */
                filtersForceComposite: boolean;

                /**
                 * Whether this Game Object will render filters.
                 * This is true if it has active filters,
                 * and if the `renderFilters` property is also true.undefined
                 * @returns Whether the Game Object will render filters.
                 */
                willRenderFilters(): boolean;

                /**
                 * Enable this Game Object to have filters.
                 * 
                 * You need to call this method if you want to use the `filterCamera`
                 * and `filters` properties. It sets up the necessary data structures.
                 * You may disable filter rendering with the `renderFilters` property.
                 * 
                 * This is a WebGL only feature. It will return early if not available.undefined
                 * @returns undefined
                 */
                enableFilters(): this;

                /**
                 * Render this object using filters.
                 * 
                 * This function's scope is not guaranteed, so it doesn't refer to `this`.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
                 * @returns undefined
                 */
                renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

                /**
                 * Focus the filter camera.
                 * This sets the size and position of the filter camera to match the GameObject.
                 * This is called automatically on render if `filtersAutoFocus` is enabled.
                 * 
                 * This will focus on the GameObject's raw dimensions if available.
                 * If the GameObject has no dimensions, this will focus on the context:
                 * the camera belonging to the DrawingContext used to render the GameObject.
                 * Context focus occurs during rendering,
                 * as the context is not known until then.undefined
                 * @returns undefined
                 */
                focusFilters(): this;

                /**
                 * Focus the filter camera on a specific camera.
                 * This is used internally when `filtersFocusContext` is enabled.
                 * @param camera The camera to focus on.
                 * @returns undefined
                 */
                focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

                /**
                 * Manually override the focus of the filter camera.
                 * This allows you to set the size and position of the filter camera manually.
                 * It deactivates `filtersAutoFocus` when called.
                 * 
                 * The camera will set scroll to place the game object at the
                 * given position within a rectangle of the given width and height.
                 * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
                 * will focus the camera to place the object's center
                 * 100 pixels above the center of the camera (which is at 400x300).
                 * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param width The width of the focus area. Default is the filter width.
                 * @param height The height of the focus area. Default is the filter height.
                 * @returns undefined
                 */
                focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Set the base size of the filter camera.
                 * This is the size of the texture that internal filters will be drawn to.
                 * External filters are drawn to the size of the context (usually the game canvas).
                 * 
                 * This is typically the size of the GameObject.
                 * It is set automatically when the Game Object is rendered
                 * and `filtersAutoFocus` is enabled.
                 * Turn off auto focus to set it manually.
                 * 
                 * Technically, larger framebuffers may be used to provide padding.
                 * This is the size of the final framebuffer used for "internal" rendering.
                 * @param width Base width of the filter texture.
                 * @param height Base height of the filter texture.
                 * @returns undefined
                 */
                setFilterSize(width: number, height: number): this;

                /**
                 * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
                 * Sets the `filtersAutoFocus` property.
                 * @param value Whether filters should be updated every frame.
                 * @returns undefined
                 */
                setFiltersAutoFocus(value: boolean): this;

                /**
                 * Set whether the filters should focus on the context.
                 * Sets the `filtersFocusContext` property.
                 * @param value Whether the filters should focus on the context.
                 * @returns undefined
                 */
                setFiltersFocusContext(value: boolean): this;

                /**
                 * Set whether the filters should always draw to a framebuffer.
                 * Sets the `filtersForceComposite` property.
                 * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
                 * @returns undefined
                 */
                setFiltersForceComposite(value: boolean): this;

                /**
                 * Set whether the filters should be rendered.
                 * Sets the `renderFilters` property.
                 * @param value Whether the filters should be rendered.
                 * @returns undefined
                 */
                setRenderFilters(value: boolean): this;

                /**
                 * Run a step in the render process.
                 * This is called automatically by the Render module.
                 * 
                 * In most cases, it just runs the `renderWebGL` function.
                 * 
                 * When `_renderSteps` has more than one entry,
                 * such as when Filters are enabled for this object,
                 * it allows those processes to defer `renderWebGL`
                 * and otherwise manage the flow of rendering.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep Which step of the rendering process should be run? Default 0.
                 * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
                 * @param displayListIndex The index of the Game Object within the display list. Default 0.
                 */
                renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

                /**
                 * Adds a render step function to this Game Object's WebGL render pipeline.
                 * 
                 * The first render step in `_renderSteps` is run first.
                 * It should call the next render step in the list.
                 * This allows render steps to control the rendering flow.
                 * @param fn The render step function to add.
                 * @param index The index in the render list to add the step to. Omit to add to the end.
                 * @returns This Game Object instance.
                 */
                addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

                /**
                 * Clears all alpha values associated with this Game Object.
                 * 
                 * Immediately sets the alpha levels back to 1 (fully opaque).undefined
                 * @returns This Game Object instance.
                 */
                clearAlpha(): this;

                /**
                 * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
                 * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
                 * 
                 * If your game is running under WebGL you can optionally specify four different alpha values, each of which
                 * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
                 * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
                 * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
                 * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
                 * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
                 * @returns This Game Object instance.
                 */
                setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

                /**
                 * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
                 * 
                 * This is a global value that impacts the entire Game Object. Setting it also updates
                 * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
                 * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
                 */
                alpha: number;

                /**
                 * The alpha value starting from the top-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopLeft: number;

                /**
                 * The alpha value starting from the top-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopRight: number;

                /**
                 * The alpha value starting from the bottom-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomLeft: number;

                /**
                 * The alpha value starting from the bottom-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomRight: number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 */
                blendMode: Phaser.BlendModes | string | number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 * @param value The BlendMode value. Either a string, a CONST or a number.
                 * @returns This Game Object instance.
                 */
                setBlendMode(value: string | Phaser.BlendModes | number): this;

                /**
                 * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * The default depth is zero. A Game Object with a higher depth
                 * value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 */
                depth: number;

                /**
                 * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * A Game Object with a higher depth value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
                 * @returns This Game Object instance.
                 */
                setDepth(value: number): this;

                /**
                 * Sets this Game Object to be at the top of the display list, or the top of its parent container.
                 * 
                 * Being at the top means it will render on top of everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToTop(): this;

                /**
                 * Sets this Game Object to the back of the display list, or the back of its parent container.
                 * 
                 * Being at the back means it will render below everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToBack(): this;

                /**
                 * Move this Game Object so that it appears above the given Game Object.
                 * 
                 * This means it will render immediately after the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be above.
                 * @returns This Game Object instance.
                 */
                setAbove(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * Move this Game Object so that it appears below the given Game Object.
                 * 
                 * This means it will render immediately under the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be below.
                 * @returns This Game Object instance.
                 */
                setBelow(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * The horizontally flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipX: boolean;

                /**
                 * The vertically flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipY: boolean;

                /**
                 * Toggles the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipX(): this;

                /**
                 * Toggles the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipY(): this;

                /**
                 * Sets the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipX(value: boolean): this;

                /**
                 * Sets the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipY(value: boolean): this;

                /**
                 * Sets the horizontal and vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped will render inverted on the flipped axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
                 * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlip(x: boolean, y: boolean): this;

                /**
                 * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
                 * @returns This Game Object instance.
                 */
                resetFlip(): this;

                /**
                 * Gets the center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the left-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the right-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
                 * 
                 * The bounding rectangle is computed by retrieving all four corner positions of the
                 * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
                 * and parent Container transforms, and then calculating the smallest axis-aligned
                 * rectangle that fully encloses all four points.
                 * 
                 * The values are stored and returned in a Rectangle, or Rectangle-like, object.
                 * @param output An object to store the values in. If not provided a new Rectangle will be created.
                 * @returns The values stored in the output object.
                 */
                getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

                /**
                 * Controls whether this Game Object participates in the WebGL lighting system.
                 * When `true`, the object will respond to dynamic lights added via the Lights plugin,
                 * using normal maps to calculate per-pixel diffuse lighting.
                 * 
                 * This flag is used to select the appropriate WebGL shader at render time.
                 */
                readonly lighting: boolean;

                /**
                 * Configuration object controlling self-shadowing for this Game Object.
                 * Self-shadowing causes surfaces to cast contact shadows on themselves based on
                 * the normal map, giving the appearance of depth. It is only active when
                 * `lighting` is also enabled.
                 * 
                 * If `enabled` is `null`, the value from the game config option `render.selfShadow`
                 * is used instead.
                 * 
                 * This object is used to select and configure the appropriate WebGL shader at render time.
                 */
                selfShadow: Object;

                /**
                 * Enables or disables WebGL-based per-pixel lighting for this Game Object.
                 * When enabled, the object will respond to dynamic lights added to the scene
                 * via the Lights plugin, using a normal map for lighting calculations.
                 * Disabling lighting restores the standard unlit rendering path.
                 * @param enable `true` to use lighting, or `false` to disable it.
                 * @returns This GameObject instance.
                 */
                setLighting(enable: boolean): this;

                /**
                 * Configures the self-shadowing properties of this Game Object.
                 * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
                 * giving the impression of depth and raised detail. It is only active when
                 * `lighting` is also enabled on this Game Object.
                 * 
                 * Parameters that are `undefined` are left unchanged, allowing partial updates.
                 * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
                 * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
                 * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
                 * @returns This GameObject instance.
                 */
                setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

                /**
                 * The Mask this Game Object is using during render, or `null` if no mask has been set.
                 */
                mask: Phaser.Display.Masks.GeometryMask;

                /**
                 * Sets the mask that this Game Object will use to render with.
                 * 
                 * The mask must have been previously created and must be a GeometryMask.
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * 
                 * If a mask is already set on this Game Object it will be immediately replaced.
                 * 
                 * Masks are positioned in global space and are not relative to the Game Object to which they
                 * are applied. The reason for this is that multiple Game Objects can all share the same mask.
                 * 
                 * Masks have no impact on physics or input detection. They are purely a rendering component
                 * that allows you to limit what is visible during the render pass.
                 * @param mask The mask this Game Object will use when rendering.
                 * @returns This Game Object instance.
                 */
                setMask(mask: Phaser.Display.Masks.GeometryMask): this;

                /**
                 * Clears the mask that this Game Object was using.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param destroyMask Destroy the mask before clearing it? Default false.
                 * @returns This Game Object instance.
                 */
                clearMask(destroyMask?: boolean): this;

                /**
                 * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
                 * including this one.
                 * 
                 * To create the mask you need to pass in a reference to a Graphics Game Object.
                 * 
                 * If you do not provide a graphics object, and this Game Object is an instance
                 * of a Graphics object, then it will use itself to create the mask.
                 * 
                 * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
                 * @returns This Geometry Mask that was created.
                 */
                createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

                /**
                 * The horizontal origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the left of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originX: number;

                /**
                 * The vertical origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the top of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originY: number;

                /**
                 * The horizontal display origin of this Game Object, expressed in pixels.
                 * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
                 * Setting this property updates `originX` accordingly.
                 */
                displayOriginX: number;

                /**
                 * The vertical display origin of this Game Object, expressed in pixels.
                 * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
                 * Setting this property updates `originY` accordingly.
                 */
                displayOriginY: number;

                /**
                 * Sets the origin of this Game Object.
                 * 
                 * The values are given in the range 0 to 1.
                 * @param x The horizontal origin value. Default 0.5.
                 * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setOrigin(x?: number, y?: number): this;

                /**
                 * Sets the origin of this Game Object based on the Pivot values in its Frame.
                 * If the Frame has a custom pivot point defined, the origin is set to match it.
                 * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
                 * resetting the origin to the default value of 0.5 for both axes.undefined
                 * @returns This Game Object instance.
                 */
                setOriginFromFrame(): this;

                /**
                 * Sets the display origin of this Game Object.
                 * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
                 * @param x The horizontal display origin value. Default 0.
                 * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setDisplayOrigin(x?: number, y?: number): this;

                /**
                 * Updates the Display Origin cached values internally stored on this Game Object.
                 * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
                 * @returns This Game Object instance.
                 */
                updateDisplayOrigin(): this;

                /**
                 * Customized WebGL render nodes of this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * A default set of RenderNodes is coded into the engine,
                 * but the renderer will check this object first to see if a custom node has been set.
                 */
                customRenderNodes: object;

                /**
                 * The default RenderNodes for this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * These are the nodes that are used if no custom ones are set.
                 * 
                 * RenderNodes are identified by a unique key for their role.
                 * 
                 * Common role keys include:
                 * 
                 * - 'Submitter': responsible for running other node roles for each element.
                 * - 'Transformer': responsible for providing vertex coordinates for an element.
                 * - 'Texturer': responsible for handling textures for an element.
                 */
                defaultRenderNodes: object;

                /**
                 * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * 
                 * Render nodes store their data under their own name, not their role.
                 */
                renderNodeData: object;

                /**
                 * Initializes the render nodes for this Game Object.
                 * 
                 * This method is called when the Game Object is added to the Scene.
                 * It is responsible for setting up the default render nodes
                 * this Game Object will use.
                 * @param defaultNodes The default render nodes to set for this Game Object.
                 */
                initRenderNodes(defaultNodes: Map<string, string>): void;

                /**
                 * Sets the RenderNode for a given role.
                 * 
                 * Also sets the relevant render node data object, if specified.
                 * 
                 * If the node cannot be set, no changes are made.
                 * @param key The key of the role to set the render node for.
                 * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
                 * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
                 * @returns This Game Object instance.
                 */
                setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

                /**
                 * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
                 * 
                 * If `key` is not set, it is created. If it is set, it is updated.
                 * 
                 * If `value` is undefined and `key` exists, the key is removed.
                 * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
                 * @param key The key of the property to set.
                 * @param value The value to set the property to.
                 * @returns This Game Object instance.
                 */
                setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

                /**
                 * The horizontal scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorX: number;

                /**
                 * The vertical scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorY: number;

                /**
                 * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
                 * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
                 * and `scrollFactorY` in a single call.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 * @param x The horizontal scroll factor of this Game Object.
                 * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScrollFactor(x: number, y?: number): this;

                /**
                 * The native (un-scaled) width of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayWidth` property.
                 */
                width: number;

                /**
                 * The native (un-scaled) height of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayHeight` property.
                 */
                height: number;

                /**
                 * The displayed width of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayWidth: number;

                /**
                 * The displayed height of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayHeight: number;

                /**
                 * Sets the size of this Game Object to be that of the given Frame.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param frame The frame to base the size of this Game Object on.
                 * @returns This Game Object instance.
                 */
                setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

                /**
                 * Sets the internal size of this Game Object, as used for frame or physics body creation.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setSize(width: number, height: number): this;

                /**
                 * Sets the display (rendered) size of this Game Object in pixels.
                 * 
                 * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
                 * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
                 * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
                 * the scale manually, but more convenient when you want to work in pixel values directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setDisplaySize(width: number, height: number): this;

                /**
                 * The Texture this Game Object is using to render with.
                 */
                texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

                /**
                 * The Texture Frame this Game Object is using to render with.
                 */
                frame: Phaser.Textures.Frame;

                /**
                 * A boolean flag indicating if this Game Object is being cropped or not.
                 * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
                 * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
                 */
                isCropped: boolean;

                /**
                 * Applies a crop to a texture based Game Object, such as a Sprite or Image.
                 * 
                 * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
                 * 
                 * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
                 * changes what is shown when rendered.
                 * 
                 * The crop size as well as coordinates can not exceed the size of the texture frame.
                 * 
                 * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
                 * 
                 * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
                 * half of it, you could call `setCrop(0, 0, 400, 600)`.
                 * 
                 * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
                 * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
                 * 
                 * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
                 * 
                 * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
                 * 
                 * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
                 * the renderer to skip several internal calculations.
                 * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
                 * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
                 * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
                 * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
                 * @returns This Game Object instance.
                 */
                setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

                /**
                 * Sets the texture and frame this Game Object will use to render with.
                 * 
                 * Textures are referenced by their string-based keys, as stored in the Texture Manager.
                 * @param key The key of the texture to be used, as stored in the Texture Manager.
                 * @param frame The name or index of the frame within the Texture.
                 * @returns This Game Object instance.
                 */
                setTexture(key: string, frame?: string | number): this;

                /**
                 * Sets the frame this Game Object will use to render with.
                 * 
                 * If you pass a string or index then the Frame has to belong to the current Texture being used
                 * by this Game Object.
                 * 
                 * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
                 * 
                 * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
                 * 
                 * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
                 * @param frame The name or index of the frame within the Texture, or a Frame instance.
                 * @param updateSize Should this call adjust the size of the Game Object? Default true.
                 * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
                 * @returns This Game Object instance.
                 */
                setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

                /**
                 * The tint value being applied to the top-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopLeft: number;

                /**
                 * The tint value being applied to the top-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopRight: number;

                /**
                 * The tint value being applied to the bottom-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomLeft: number;

                /**
                 * The tint value being applied to the bottom-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomRight: number;

                /**
                 * The tint mode to use when applying the tint to the texture.
                 * 
                 * Available modes are:
                 * - Phaser.TintModes.MULTIPLY (default)
                 * - Phaser.TintModes.FILL
                 * - Phaser.TintModes.ADD
                 * - Phaser.TintModes.SCREEN
                 * - Phaser.TintModes.OVERLAY
                 * - Phaser.TintModes.HARD_LIGHT
                 * 
                 * Note that in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 */
                tintMode: Phaser.TintModes;

                /**
                 * Clears all tint values associated with this Game Object.
                 * 
                 * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
                 * which results in no visible change to the texture.undefined
                 * @returns This Game Object instance.
                 */
                clearTint(): this;

                /**
                 * Sets the tint color on this Game Object.
                 * 
                 * The tint works by taking the pixel color values from the Game Objects texture, and then
                 * combining it with the color value of the tint. You can provide either one color value,
                 * in which case the whole Game Object will be tinted in that color. Or you can provide a color
                 * per corner. The colors are blended together across the extent of the Game Object.
                 * 
                 * To modify the tint color once set, either call this method again with new values or use the
                 * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
                 * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
                 * 
                 * To remove a tint call `clearTint`.
                 * 
                 * The tint color is combined according to the tint mode.
                 * By default, this is `MULTIPLY`.
                 * 
                 * Note that, in Phaser 3, this would also swap the tint mode if it was set
                 * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
                 * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
                 * @param topRight The tint being applied to the top-right of the Game Object.
                 * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
                 * @param bottomRight The tint being applied to the bottom-right of the Game Object.
                 * @returns This Game Object instance.
                 */
                setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

                /**
                 * Sets the tint mode to use when applying the tint to the texture.
                 * 
                 * Note that, in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 * @param mode The tint mode to use.
                 * @returns This Game Object instance.
                 */
                setTintMode(mode: number | Phaser.TintModes): this;

                /**
                 * Deprecated method which does nothing.
                 * In Phaser 3, this would set the tint color, and set the tint mode to fill.
                 * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
                 */
                setTintFill(): void;

                /**
                 * The tint value being applied to the whole of the Game Object.
                 * Returns the value of `tintTopLeft` when read. When written, the same
                 * color value is applied to all four corner tint properties (`tintTopLeft`,
                 * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
                 */
                tint: number;

                /**
                 * Does this Game Object have a tint applied?
                 * 
                 * Returns `true` if any of the four corner tint values differ from 0xffffff,
                 * or if the `tintMode` property is set to anything other than `MULTIPLY`.
                 * Returns `false` when all four tint values are 0xffffff and the tint mode
                 * is `MULTIPLY`, which is the default untinted state.
                 */
                readonly isTinted: boolean;

                /**
                 * A property indicating that a Game Object has this component.
                 */
                readonly hasTransformComponent: boolean;

                /**
                 * The x position of this Game Object.
                 */
                x: number;

                /**
                 * The y position of this Game Object.
                 */
                y: number;

                /**
                 * The z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#depth} instead.
                 */
                z: number;

                /**
                 * The w position of this Game Object.
                 */
                w: number;

                /**
                 * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
                 * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
                 * 
                 * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
                 * isn't the case, use the `scaleX` or `scaleY` properties instead.
                 */
                scale: number;

                /**
                 * The horizontal scale of this Game Object.
                 */
                scaleX: number;

                /**
                 * The vertical scale of this Game Object.
                 */
                scaleY: number;

                /**
                 * The angle of this Game Object as expressed in degrees.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
                 * and -90 is up.
                 * 
                 * If you prefer to work in radians, see the `rotation` property instead.
                 */
                angle: number;

                /**
                 * The angle of this Game Object in radians.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
                 * and -PI/2 is up.
                 * 
                 * If you prefer to work in degrees, see the `angle` property instead.
                 */
                rotation: number;

                /**
                 * Sets the position of this Game Object.
                 * @param x The x position of this Game Object. Default 0.
                 * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
                 * @param z The z position of this Game Object. Default 0.
                 * @param w The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setPosition(x?: number, y?: number, z?: number, w?: number): this;

                /**
                 * Copies an object's coordinates to this Game Object's position.
                 * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
                 * @returns This Game Object instance.
                 */
                copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

                /**
                 * Sets the position of this Game Object to be a random position within the confines of
                 * the given area.
                 * 
                 * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
                 * 
                 * The position does not factor in the size of this Game Object, meaning that only the origin is
                 * guaranteed to be within the area.
                 * @param x The x position of the top-left of the random area. Default 0.
                 * @param y The y position of the top-left of the random area. Default 0.
                 * @param width The width of the random area.
                 * @param height The height of the random area.
                 * @returns This Game Object instance.
                 */
                setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Sets the rotation of this Game Object.
                 * @param radians The rotation of this Game Object, in radians. Default 0.
                 * @returns This Game Object instance.
                 */
                setRotation(radians?: number): this;

                /**
                 * Sets the angle of this Game Object.
                 * @param degrees The rotation of this Game Object, in degrees. Default 0.
                 * @returns This Game Object instance.
                 */
                setAngle(degrees?: number): this;

                /**
                 * Sets the scale of this Game Object.
                 * @param x The horizontal scale of this Game Object. Default 1.
                 * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScale(x?: number, y?: number): this;

                /**
                 * Sets the x position of this Game Object.
                 * @param value The x position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setX(value?: number): this;

                /**
                 * Sets the y position of this Game Object.
                 * @param value The y position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setY(value?: number): this;

                /**
                 * Sets the z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
                 * @param value The z position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setZ(value?: number): this;

                /**
                 * Sets the w position of this Game Object.
                 * @param value The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setW(value?: number): this;

                /**
                 * Gets the local transform matrix for this Game Object.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @returns The populated Transform Matrix.
                 */
                getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @param parentMatrix A temporary matrix to hold parent values during the calculations.
                 * @returns The populated Transform Matrix.
                 */
                getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Takes the given `x` and `y` coordinates and converts them into local space for this
                 * Game Object, taking into account parent and local transforms, and the Display Origin.
                 * 
                 * The returned Vector2 contains the translated point in its properties.
                 * 
                 * A Camera needs to be provided in order to handle modified scroll factors. If no
                 * camera is specified, it will use the `main` camera from the Scene to which this
                 * Game Object belongs.
                 * @param x The x position to translate.
                 * @param y The y position to translate.
                 * @param point A Vector2, or point-like object, to store the results in.
                 * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
                 * @returns The translated point.
                 */
                getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

                /**
                 * Gets the world position of this Game Object, factoring in any parent Containers.
                 * @param point A Vector2, or point-like object, to store the result in.
                 * @param tempMatrix A temporary matrix to hold the Game Object's values.
                 * @param parentMatrix A temporary matrix to hold parent values.
                 * @returns The world position of this Game Object.
                 */
                getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

                /**
                 * Gets the sum total rotation of all of this Game Object's parent Containers.
                 * 
                 * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
                 * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
                 */
                getParentRotation(): number;

                /**
                 * The visible state of the Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 */
                visible: boolean;

                /**
                 * Sets the visibility of this Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 * @param value The visible state of the Game Object.
                 * @returns This Game Object instance.
                 */
                setVisible(value: boolean): this;

                /**
                 * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration.
                 * @param x The horizontal acceleration, in pixels per second squared.
                 * @param y The vertical acceleration, in pixels per second squared. Default x.
                 * @returns This Game Object.
                 */
                setAcceleration(x: number, y?: number): this;

                /**
                 * Sets the body's horizontal acceleration.
                 * @param value The horizontal acceleration, in pixels per second squared.
                 * @returns This Game Object.
                 */
                setAccelerationX(value: number): this;

                /**
                 * Sets the body's vertical acceleration.
                 * @param value The vertical acceleration, in pixels per second squared.
                 * @returns This Game Object.
                 */
                setAccelerationY(value: number): this;

                /**
                 * Sets the angular velocity of the body.
                 * 
                 * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.
                 * However, they can have angular motion, which is passed on to the Game Object bound to the body,
                 * causing them to visually rotate, even though the body remains axis-aligned.
                 * @param value The amount of angular velocity, in degrees per second.
                 * @returns This Game Object.
                 */
                setAngularVelocity(value: number): this;

                /**
                 * Sets the angular acceleration of the body.
                 * 
                 * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.
                 * However, they can have angular motion, which is passed on to the Game Object bound to the body,
                 * causing them to visually rotate, even though the body remains axis-aligned.
                 * @param value The amount of angular acceleration, in degrees per second squared.
                 * @returns This Game Object.
                 */
                setAngularAcceleration(value: number): this;

                /**
                 * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration.
                 * @param value The amount of drag, in degrees per second squared.
                 * @returns This Game Object.
                 */
                setAngularDrag(value: number): this;

                /**
                 * Sets the bounce values of this body.
                 * 
                 * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object.
                 * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all.
                 * @param x The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.
                 * @param y The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. Default x.
                 * @returns This Game Object.
                 */
                setBounce(x: number, y?: number): this;

                /**
                 * Sets the horizontal bounce value for this body. This is the amount of restitution applied
                 * on the x-axis when the body collides with another object. A value of 1 retains full horizontal
                 * velocity after the rebound. A value of 0 means no horizontal bounce at all.
                 * @param value The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.
                 * @returns This Game Object.
                 */
                setBounceX(value: number): this;

                /**
                 * Sets the vertical bounce value for this body. This is the amount of restitution applied
                 * on the y-axis when the body collides with another object. A value of 1 retains full vertical
                 * velocity after the rebound. A value of 0 means no vertical bounce at all.
                 * @param value The amount of vertical bounce to apply on collision. A float, typically between 0 and 1.
                 * @returns This Game Object.
                 */
                setBounceY(value: number): this;

                /**
                 * Sets whether this Body collides with the world boundary.
                 * 
                 * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first.
                 * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true.
                 * @param bounceX If given, this will replace the `worldBounce.x` value.
                 * @param bounceY If given, this will replace the `worldBounce.y` value.
                 * @param onWorldBounds If given this replaces the Body's `onWorldBounds` value.
                 * @returns This Game Object.
                 */
                setCollideWorldBounds(value?: boolean, bounceX?: number, bounceY?: number, onWorldBounds?: boolean): this;

                /**
                 * Sets the Collision Category that this Arcade Physics Body
                 * will use in order to determine what it can collide with.
                 * 
                 * It can only have one single category assigned to it.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
                 * @returns This Game Object.
                 */
                setCollisionCategory(category: number): this;

                /**
                 * Checks to see if the given Collision Category will collide with
                 * this Arcade Physics object or not.
                 * @param category Collision category value to test.
                 * @returns `true` if the given category will collide with this object, otherwise `false`.
                 */
                willCollideWith(category: number): boolean;

                /**
                 * Adds the given Collision Category to the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to add to this body's collision mask.
                 * @returns This Game Object.
                 */
                addCollidesWith(category: number): this;

                /**
                 * Removes the given Collision Category from the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to remove from this body's collision mask.
                 * @returns This Game Object.
                 */
                removeCollidesWith(category: number): this;

                /**
                 * Sets all of the Collision Categories that this Arcade Physics Body
                 * will collide with. You can either pass a single category value, or
                 * an array of them.
                 * 
                 * Calling this method will reset all of the collision categories,
                 * so only those passed to this method are enabled.
                 * 
                 * If you wish to add a new category to the existing mask, call
                 * the `addCollidesWith` method.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param categories The collision category to collide with, or an array of them.
                 * @returns This Game Object.
                 */
                setCollidesWith(categories: number | number[]): this;

                /**
                 * Resets the Collision Category and Mask back to the defaults,
                 * which means the body will belong to category 1 and will collide with all other categories.undefined
                 * @returns This Game Object.
                 */
                resetCollisionCategory(): this;

                /**
                 * Sets the debug values of this body.
                 * 
                 * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole.
                 * Note that there is a performance cost in drawing debug displays. It should never be used in production.
                 * @param showBody Set to `true` to have this body render its outline to the debug display.
                 * @param showVelocity Set to `true` to have this body render a velocity marker to the debug display.
                 * @param bodyColor The color of the body outline when rendered to the debug display.
                 * @returns This Game Object.
                 */
                setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this;

                /**
                 * Sets the color of the body outline when it renders to the debug display.
                 * @param value The color of the body outline when rendered to the debug display.
                 * @returns This Game Object.
                 */
                setDebugBodyColor(value: number): this;

                /**
                 * Set to `true` to have this body render its outline to the debug display.
                 */
                debugShowBody: boolean;

                /**
                 * Set to `true` to have this body render a velocity marker to the debug display.
                 */
                debugShowVelocity: boolean;

                /**
                 * The color of the body outline when it renders to the debug display.
                 */
                debugBodyColor: number;

                /**
                 * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag.
                 * 
                 * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
                 * It is the absolute loss of velocity due to movement, in pixels per second squared.
                 * The x and y components are applied separately.
                 * 
                 * When `useDamping` is true, this is 1 minus the damping factor.
                 * A value of 1 means the Body loses no velocity.
                 * A value of 0.95 means the Body loses 5% of its velocity per step.
                 * A value of 0.5 means the Body loses 50% of its velocity per step.
                 * 
                 * Drag is applied only when `acceleration` is zero.
                 * @param x The amount of horizontal drag to apply.
                 * @param y The amount of vertical drag to apply. Default x.
                 * @returns This Game Object.
                 */
                setDrag(x: number, y?: number): this;

                /**
                 * Sets the body's horizontal drag.
                 * 
                 * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
                 * It is the absolute loss of velocity due to movement, in pixels per second squared.
                 * The x and y components are applied separately.
                 * 
                 * When `useDamping` is true, this is 1 minus the damping factor.
                 * A value of 1 means the Body loses no velocity.
                 * A value of 0.95 means the Body loses 5% of its velocity per step.
                 * A value of 0.5 means the Body loses 50% of its velocity per step.
                 * 
                 * Drag is applied only when `acceleration` is zero.
                 * @param value The amount of horizontal drag to apply.
                 * @returns This Game Object.
                 */
                setDragX(value: number): this;

                /**
                 * Sets the body's vertical drag.
                 * 
                 * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
                 * It is the absolute loss of velocity due to movement, in pixels per second squared.
                 * The x and y components are applied separately.
                 * 
                 * When `useDamping` is true, this is 1 minus the damping factor.
                 * A value of 1 means the Body loses no velocity.
                 * A value of 0.95 means the Body loses 5% of its velocity per step.
                 * A value of 0.5 means the Body loses 50% of its velocity per step.
                 * 
                 * Drag is applied only when `acceleration` is zero.
                 * @param value The amount of vertical drag to apply.
                 * @returns This Game Object.
                 */
                setDragY(value: number): this;

                /**
                 * If this Body is using `drag` for deceleration this function controls how the drag is applied.
                 * If set to `true` drag will use a damping effect rather than a linear approach. If you are
                 * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in
                 * the game Asteroids) then you will get a far smoother and more visually correct deceleration
                 * by using damping, avoiding the axis-drift that is prone with linear deceleration.
                 * 
                 * If you enable this property then you should use far smaller `drag` values than with linear, as
                 * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow
                 * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.
                 * @param value `true` to use damping for deceleration, or `false` to use linear deceleration.
                 * @returns This Game Object.
                 */
                setDamping(value: boolean): this;

                /**
                 * Sets whether this Body should calculate its velocity based on its change in
                 * position every frame. The default, which is to not do this, means that you
                 * make this Body move by setting the velocity directly. However, if you are
                 * trying to move this Body via a Tween, or have it follow a Path, then you
                 * should enable this instead. This will allow it to still collide with other
                 * bodies, something that isn't possible if you're just changing its position directly.
                 * @param value `true` if the Body calculates velocity based on changes in position, otherwise `false`. Default true.
                 * @returns This Game Object.
                 */
                setDirectControl(value?: boolean): this;

                /**
                 * Enables this Game Object's Arcade Physics Body, allowing it to participate in
                 * collision and overlap detection within the physics simulation. Optionally resets
                 * the Body and repositions the Game Object at the given coordinates. If you reset
                 * the Body you must also pass `x` and `y`. You can also optionally set the Game
                 * Object's `active` and `visible` properties at the same time.
                 * @param reset Also reset the Body and place the Game Object at (x, y).
                 * @param x The horizontal position to place the Game Object, if `reset` is true.
                 * @param y The vertical position to place the Game Object, if `reset` is true.
                 * @param enableGameObject Also set this Game Object's `active` to true.
                 * @param showGameObject Also set this Game Object's `visible` to true.
                 * @returns This Game Object.
                 */
                enableBody(reset?: boolean, x?: number, y?: number, enableGameObject?: boolean, showGameObject?: boolean): this;

                /**
                 * Stops and disables this Game Object's Arcade Physics Body. The body's velocity is
                 * set to zero and it is removed from collision and overlap detection within the physics
                 * simulation. Optionally sets the Game Object's `active` and `visible` properties to
                 * false at the same time, which is useful when deactivating pooled Game Objects.
                 * @param disableGameObject Also set this Game Object's `active` to false. Default false.
                 * @param hideGameObject Also set this Game Object's `visible` to false. Default false.
                 * @returns This Game Object.
                 */
                disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this;

                /**
                 * Syncs the Body's position and size with its parent Game Object.
                 * You don't need to call this for Dynamic Bodies, as it happens automatically.
                 * But for Static bodies it's a useful way of modifying the position of a Static Body
                 * in the Physics World, based on its Game Object.undefined
                 * @returns This Game Object.
                 */
                refreshBody(): this;

                /**
                 * Sets the friction of this game object's physics body.
                 * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body.
                 * @param x The amount of horizontal friction to apply, [0, 1].
                 * @param y The amount of vertical friction to apply, [0, 1]. Default x.
                 * @returns This Game Object.
                 */
                setFriction(x: number, y?: number): this;

                /**
                 * Sets the horizontal friction of this game object's physics body.
                 * This can move a riding body horizontally when it collides with this one on the vertical axis.
                 * @param x The amount of friction to apply, [0, 1].
                 * @returns This Game Object.
                 */
                setFrictionX(x: number): this;

                /**
                 * Sets the vertical friction of this game object's physics body.
                 * This can move a riding body vertically when it collides with this one on the horizontal axis.
                 * @param y The amount of friction to apply, [0, 1].
                 * @returns This Game Object.
                 */
                setFrictionY(y: number): this;

                /**
                 * Sets the body gravity for both the X and Y axes. This is an acceleration applied to
                 * this body in addition to the world gravity, in pixels per second squared. Values can
                 * be positive or negative. Larger absolute values result in a stronger effect.
                 * 
                 * If only one value is provided, it will be used for both the X and Y axes.
                 * @param x The gravitational acceleration to be applied to the X-axis, in pixels per second squared.
                 * @param y The gravitational acceleration to be applied to the Y-axis, in pixels per second squared. If not specified, the X value will be used. Default x.
                 * @returns This Game Object.
                 */
                setGravity(x: number, y?: number): this;

                /**
                 * Sets the body gravity applied to the X-axis. This is an acceleration in addition to
                 * the world gravity, in pixels per second squared. Use a positive value to pull the body
                 * to the right and a negative value to pull it to the left.
                 * @param x The gravitational acceleration to be applied to the X-axis, in pixels per second squared.
                 * @returns This Game Object.
                 */
                setGravityX(x: number): this;

                /**
                 * Sets the body gravity applied to the Y-axis. This is an acceleration in addition to
                 * the world gravity, in pixels per second squared. Use a positive value to pull the body
                 * downward and a negative value to push it upward (against gravity).
                 * @param y The gravitational acceleration to be applied to the Y-axis, in pixels per second squared.
                 * @returns This Game Object.
                 */
                setGravityY(y: number): this;

                /**
                 * Sets if this Body can be separated during collisions with other bodies.
                 * 
                 * When a body is immovable it means it won't move at all, not even to separate it from collision
                 * overlap. If you just wish to prevent a body from being knocked around by other bodies, see
                 * the `setPushable` method instead.
                 * @param value Whether this body should be immovable (`true`) or movable (`false`) during collisions. Default true.
                 * @returns This Game Object.
                 */
                setImmovable(value?: boolean): this;

                /**
                 * Sets the mass of the physics body. Mass affects collision response -- heavier
                 * bodies push lighter ones more during collisions.
                 * @param value The new mass of the body. Must be a positive number.
                 * @returns This Game Object.
                 */
                setMass(value: number): this;

                /**
                 * Sets if this Body can be pushed by another Body.
                 * 
                 * A body that cannot be pushed will reflect back all of the velocity it is given to the
                 * colliding body. If that body is also not pushable, then the separation will be split
                 * between them evenly.
                 * 
                 * If you want your body to never move or separate at all, see the `setImmovable` method.
                 * @param value Whether this body can be pushed by collisions with another Body. Default true.
                 * @returns This Game Object.
                 */
                setPushable(value?: boolean): this;

                /**
                 * Sets the body offset. This allows you to adjust the difference between the center of the body
                 * and the x and y coordinates of the parent Game Object.
                 * @param x The amount to offset the body from the parent Game Object along the x-axis, in pixels.
                 * @param y The amount to offset the body from the parent Game Object along the y-axis, in pixels. Defaults to the value given for the x-axis. Default x.
                 * @returns This Game Object.
                 */
                setOffset(x: number, y?: number): this;

                /**
                 * Sets the size of this physics body. Setting the size does not adjust the dimensions of the parent Game Object.
                 * @param width The new width of the physics body, in pixels.
                 * @param height The new height of the physics body, in pixels.
                 * @param center Should the body be re-positioned so its center aligns with the parent Game Object? Default true.
                 * @returns This Game Object.
                 */
                setBodySize(width: number, height: number, center?: boolean): this;

                /**
                 * Sets this physics body to use a circle for collision instead of a rectangle.
                 * @param radius The radius of the physics body, in pixels.
                 * @param offsetX The amount to offset the body from the parent Game Object along the x-axis.
                 * @param offsetY The amount to offset the body from the parent Game Object along the y-axis.
                 * @returns This Game Object.
                 */
                setCircle(radius: number, offsetX?: number, offsetY?: number): this;

                /**
                 * Sets the velocity of the Body.
                 * @param x The horizontal velocity of the body, in pixels per second. Positive values move the body to the right, while negative values move it to the left.
                 * @param y The vertical velocity of the body, in pixels per second. Positive values move the body down, while negative values move it up. Default x.
                 * @returns This Game Object.
                 */
                setVelocity(x: number, y?: number): this;

                /**
                 * Sets the horizontal component of the body's velocity.
                 * 
                 * Positive values move the body to the right, while negative values move it to the left.
                 * @param x The new horizontal velocity, in pixels per second.
                 * @returns This Game Object.
                 */
                setVelocityX(x: number): this;

                /**
                 * Sets the vertical component of the body's velocity.
                 * 
                 * Positive values move the body down, while negative values move it up.
                 * @param y The new vertical velocity, in pixels per second.
                 * @returns This Game Object.
                 */
                setVelocityY(y: number): this;

                /**
                 * Sets the maximum velocity of the body.
                 * @param x The new maximum horizontal velocity, in pixels per second.
                 * @param y The new maximum vertical velocity, in pixels per second. Default x.
                 * @returns This Game Object.
                 */
                setMaxVelocity(x: number, y?: number): this;

            }

            /**
             * A Dynamic Arcade Body. This body type can move, accelerate, collide with other bodies,
             * and bounce off surfaces. It supports rectangular and circular collision shapes, and
             * provides velocity, acceleration, drag (with optional damping mode), friction, gravity,
             * bounce, and world bounds collision. Dynamic bodies are the most common physics body type,
             * used for players, enemies, projectiles, and other moving game entities.
             * 
             * Its static counterpart is {@link Phaser.Physics.Arcade.StaticBody}.
             */
            class Body implements Phaser.Physics.Arcade.Components.Collision {
                /**
                 * 
                 * @param world The Arcade Physics simulation this Body belongs to.
                 * @param gameObject The Game Object this Body belongs to. As of Phaser 3.60 this is now optional.
                 */
                constructor(world: Phaser.Physics.Arcade.World, gameObject?: Phaser.GameObjects.GameObject);

                /**
                 * The Arcade Physics simulation this Body belongs to.
                 */
                world: Phaser.Physics.Arcade.World;

                /**
                 * The Game Object this Body belongs to.
                 * 
                 * As of Phaser 3.60 this is now optional and can be undefined.
                 */
                gameObject: Phaser.GameObjects.GameObject;

                /**
                 * A quick-test flag that signifies this is a Body, used in the World collision handler.
                 */
                readonly isBody: boolean;

                /**
                 * Transformations applied to this Body.
                 */
                transform: object;

                /**
                 * Whether the Body is drawn to the debug display.
                 */
                debugShowBody: boolean;

                /**
                 * Whether the Body's velocity is drawn to the debug display.
                 */
                debugShowVelocity: boolean;

                /**
                 * The color of this Body on the debug display.
                 */
                debugBodyColor: number;

                /**
                 * Whether this Body is updated by the physics simulation.
                 */
                enable: boolean;

                /**
                 * Whether this Body is circular (true) or rectangular (false).
                 */
                isCircle: boolean;

                /**
                 * If this Body is circular, this is the unscaled radius of the Body, as set by setCircle(), in source pixels.
                 * The true radius is equal to `halfWidth`.
                 */
                radius: number;

                /**
                 * The offset of this Body's position from its Game Object's position, in source pixels.
                 */
                offset: Phaser.Math.Vector2;

                /**
                 * The position of this Body within the simulation.
                 */
                position: Phaser.Math.Vector2;

                /**
                 * The position of this Body during the previous step.
                 */
                prev: Phaser.Math.Vector2;

                /**
                 * The position of this Body during the previous frame.
                 */
                prevFrame: Phaser.Math.Vector2;

                /**
                 * Whether this Body's `rotation` is affected by its angular acceleration and angular velocity.
                 */
                allowRotation: boolean;

                /**
                 * This body's rotation, in degrees, based on its angular acceleration and angular velocity.
                 * The Body's rotation controls the `angle` of its Game Object.
                 * It doesn't rotate the Body's own geometry, which is always an axis-aligned rectangle or a circle.
                 */
                rotation: number;

                /**
                 * The Body rotation, in degrees, during the previous step.
                 */
                preRotation: number;

                /**
                 * The width of the Body, in pixels.
                 * If the Body is circular, this is also the diameter.
                 * If you wish to change the width use the `Body.setSize` method.
                 */
                readonly width: number;

                /**
                 * The height of the Body, in pixels.
                 * If the Body is circular, this is also the diameter.
                 * If you wish to change the height use the `Body.setSize` method.
                 */
                readonly height: number;

                /**
                 * The unscaled width of the Body, in source pixels, as set by setSize().
                 * The default is the width of the Body's Game Object's texture frame.
                 */
                sourceWidth: number;

                /**
                 * The unscaled height of the Body, in source pixels, as set by setSize().
                 * The default is the height of the Body's Game Object's texture frame.
                 */
                sourceHeight: number;

                /**
                 * Half the Body's width, in pixels.
                 */
                halfWidth: number;

                /**
                 * Half the Body's height, in pixels.
                 */
                halfHeight: number;

                /**
                 * The center of the Body.
                 * The midpoint of its `position` (top-left corner) and its bottom-right corner.
                 */
                center: Phaser.Math.Vector2;

                /**
                 * The Body's velocity, in pixels per second.
                 */
                velocity: Phaser.Math.Vector2;

                /**
                 * The Body's change in position (due to velocity) at the last step, in pixels.
                 * 
                 * The size of this value depends on the simulation's step rate.
                 */
                readonly newVelocity: Phaser.Math.Vector2;

                /**
                 * The Body's absolute maximum change in position, in pixels per step.
                 */
                deltaMax: Phaser.Math.Vector2;

                /**
                 * The Body's change in velocity, in pixels per second squared.
                 */
                acceleration: Phaser.Math.Vector2;

                /**
                 * Whether this Body's velocity is affected by its `drag`.
                 */
                allowDrag: boolean;

                /**
                 * When `useDamping` is false (the default), this is absolute loss of velocity due to movement, in pixels per second squared.
                 * 
                 * When `useDamping` is true, this is a damping multiplier between 0 and 1.
                 * 
                 * A value of 0 means the Body stops instantly.
                 * A value of 0.01 mean the Body keeps 1% of its velocity per second, losing 99%.
                 * A value of 0.1 means the Body keeps 10% of its velocity per second, losing 90%.
                 * A value of 1 means the Body loses no velocity.
                 * You can use very small values (e.g., 0.001) to stop the Body quickly.
                 * 
                 * The x and y components are applied separately.
                 * 
                 * Drag is applied only when `acceleration` is zero.
                 */
                drag: Phaser.Math.Vector2;

                /**
                 * Whether this Body's position is affected by gravity (local or world).
                 */
                allowGravity: boolean;

                /**
                 * Acceleration due to gravity (specific to this Body), in pixels per second squared.
                 * Total gravity is the sum of this vector and the simulation's `gravity`.
                 */
                gravity: Phaser.Math.Vector2;

                /**
                 * Rebound following a collision, relative to 1.
                 */
                bounce: Phaser.Math.Vector2;

                /**
                 * Rebound following a collision with the world boundary, relative to 1.
                 * If null, `bounce` is used instead.
                 */
                worldBounce: Phaser.Math.Vector2 | null;

                /**
                 * The rectangle used for world boundary collisions.
                 * 
                 * By default it is set to the world boundary rectangle. Or, if this Body was
                 * created by a Physics Group, then whatever rectangle that Group defined.
                 * 
                 * You can also change it by using the `Body.setBoundsRectangle` method.
                 */
                customBoundsRectangle: Phaser.Geom.Rectangle;

                /**
                 * Whether the simulation emits a `worldbounds` event when this Body collides with the world boundary
                 * (and `collideWorldBounds` is also true).
                 */
                onWorldBounds: boolean;

                /**
                 * Whether the simulation emits a `collide` event when this Body collides with another.
                 */
                onCollide: boolean;

                /**
                 * Whether the simulation emits an `overlap` event when this Body overlaps with another.
                 */
                onOverlap: boolean;

                /**
                 * The absolute maximum velocity of this body, in pixels per second.
                 * The horizontal and vertical components are applied separately.
                 */
                maxVelocity: Phaser.Math.Vector2;

                /**
                 * The maximum speed this Body is allowed to reach, in pixels per second.
                 * 
                 * If not negative it limits the scalar value of speed.
                 * 
                 * Any negative value means no maximum is being applied (the default).
                 */
                maxSpeed: number;

                /**
                 * If this Body is `immovable` and in motion, `friction` is the proportion of this Body's motion received by the riding Body on each axis, relative to 1.
                 * The horizontal component (x) is applied only when two colliding Bodies are separated vertically.
                 * The vertical component (y) is applied only when two colliding Bodies are separated horizontally.
                 * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all.
                 */
                friction: Phaser.Math.Vector2;

                /**
                 * If this Body is using `drag` for deceleration this property controls how the drag is applied.
                 * If set to `true` drag will use a damping effect rather than a linear approach. If you are
                 * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in
                 * the game Asteroids) then you will get a far smoother and more visually correct deceleration
                 * by using damping, avoiding the axis-drift that is prone with linear deceleration.
                 * 
                 * If you enable this property then you should use far smaller `drag` values than with linear, as
                 * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow
                 * deceleration.
                 */
                useDamping: boolean;

                /**
                 * The rate of change of this Body's `rotation`, in degrees per second.
                 */
                angularVelocity: number;

                /**
                 * The Body's angular acceleration (change in angular velocity), in degrees per second squared.
                 */
                angularAcceleration: number;

                /**
                 * Loss of angular velocity due to angular movement, in degrees per second.
                 * 
                 * Angular drag is applied only when angular acceleration is zero.
                 */
                angularDrag: number;

                /**
                 * The Body's maximum angular velocity, in degrees per second.
                 */
                maxAngular: number;

                /**
                 * The Body's inertia, relative to a default unit (1).
                 * With `bounce`, this affects the exchange of momentum (velocities) during collisions.
                 */
                mass: number;

                /**
                 * The calculated angle of this Body's velocity vector, in radians, during the last step.
                 */
                angle: number;

                /**
                 * The calculated magnitude of the Body's velocity, in pixels per second, during the last step.
                 */
                speed: number;

                /**
                 * The direction of the Body's velocity, as calculated during the last step.
                 * This is a numeric constant value (FACING_UP, FACING_DOWN, FACING_LEFT, FACING_RIGHT).
                 * If the Body is moving on both axes, this describes motion on the vertical axis only.
                 */
                facing: number;

                /**
                 * Whether this Body can be moved by collisions with another Body.
                 */
                immovable: boolean;

                /**
                 * Sets if this Body can be pushed by another Body.
                 * 
                 * A body that cannot be pushed will reflect back all of the velocity it is given to the
                 * colliding body. If that body is also not pushable, then the separation will be split
                 * between them evenly.
                 * 
                 * If you want your body to never move or separate at all, see the `setImmovable` method.
                 * 
                 * By default, Dynamic Bodies are always pushable.
                 */
                pushable: boolean;

                /**
                 * The Slide Factor of this Body.
                 * 
                 * The Slide Factor controls how much velocity is preserved when
                 * this Body is pushed by another Body.
                 * 
                 * The default value is 1, which means that it will take on all
                 * velocity given in the push. You can adjust this value to control
                 * how much velocity is retained by this Body when the push ends.
                 * 
                 * A value of 0, for example, will allow this Body to be pushed
                 * but then remain completely still after the push ends, such as
                 * you see in a game like Sokoban.
                 * 
                 * Or you can set a mid-point, such as 0.25 which will allow it
                 * to keep 25% of the original velocity when the push ends. You
                 * can combine this with the `setDrag()` method to create deceleration.
                 */
                slideFactor: Phaser.Math.Vector2;

                /**
                 * Whether the Body's position and rotation are affected by its velocity, acceleration, drag, and gravity.
                 */
                moves: boolean;

                /**
                 * A flag disabling the default horizontal separation of colliding bodies.
                 * Pass your own `collideCallback` to the collider.
                 */
                customSeparateX: boolean;

                /**
                 * A flag disabling the default vertical separation of colliding bodies.
                 * Pass your own `collideCallback` to the collider.
                 */
                customSeparateY: boolean;

                /**
                 * The amount of horizontal overlap (before separation), if this Body is colliding with another.
                 */
                overlapX: number;

                /**
                 * The amount of vertical overlap (before separation), if this Body is colliding with another.
                 */
                overlapY: number;

                /**
                 * The amount of overlap (before separation), if this Body is circular and colliding with another circular body.
                 */
                overlapR: number;

                /**
                 * Whether this Body is overlapped with another and both are not moving, on at least one axis.
                 */
                embedded: boolean;

                /**
                 * Whether this Body interacts with the world boundary.
                 */
                collideWorldBounds: boolean;

                /**
                 * Whether this Body is checked for collisions and for which directions.
                 * You can set `checkCollision.none = true` to disable collision checks.
                 */
                checkCollision: Phaser.Types.Physics.Arcade.ArcadeBodyCollision;

                /**
                 * Whether this Body is colliding with a Body or Static Body and in which direction.
                 * In a collision where both bodies have zero velocity, `embedded` will be set instead.
                 */
                touching: Phaser.Types.Physics.Arcade.ArcadeBodyCollision;

                /**
                 * This Body's `touching` value during the previous step.
                 */
                wasTouching: Phaser.Types.Physics.Arcade.ArcadeBodyCollision;

                /**
                 * Whether this Body is colliding with a Static Body, a tile, or the world boundary.
                 * In a collision with a Static Body, if this Body has zero velocity then `embedded` will be set instead.
                 */
                blocked: Phaser.Types.Physics.Arcade.ArcadeBodyCollision;

                /**
                 * Whether to automatically synchronize this Body's dimensions to the dimensions of its Game Object's visual bounds.
                 */
                syncBounds: boolean;

                /**
                 * The Body's physics type (dynamic or static).
                 */
                readonly physicsType: number;

                /**
                 * The Arcade Physics Body Collision Category.
                 * 
                 * This can be set to any valid collision bitfield value.
                 * 
                 * See the `setCollisionCategory` method for more details.
                 */
                collisionCategory: number;

                /**
                 * The Arcade Physics Body Collision Mask.
                 * 
                 * See the `setCollidesWith` method for more details.
                 */
                collisionMask: number;

                /**
                 * Is this Body under direct control, outside of the physics engine? For example,
                 * are you trying to move it via a Tween? Or have it follow a path? If so then
                 * you can enable this boolean so that the Body will calculate its velocity based
                 * purely on its change in position each frame. This allows you to then tween
                 * the position and still have it collide with other objects. However, setting
                 * the velocity will have no impact on this Body while this is set.
                 */
                directControl: boolean;

                /**
                 * Updates the Body's `transform`, `width`, `height`, and `center` from its Game Object.
                 * The Body's `position` isn't changed.
                 */
                updateBounds(): void;

                /**
                 * Updates the Body's `center` from its `position`, `width`, and `height`.
                 */
                updateCenter(): void;

                /**
                 * Updates the Body's `position`, `width`, `height`, and `center` from its Game Object and `offset`.
                 * 
                 * You don't need to call this for Dynamic Bodies, as it happens automatically during the physics step.
                 * But you could use it if you have modified the Body offset or Game Object transform and need to immediately
                 * read the Body's new `position` or `center`.
                 * 
                 * To resynchronize the Body with its Game Object, use `reset()` instead.
                 */
                updateFromGameObject(): void;

                /**
                 * Prepares the Body for a physics step by resetting the `wasTouching`, `touching` and `blocked` states.
                 * 
                 * This method is only called if the physics world is going to run a step this frame.
                 * @param clear Set the `wasTouching` values to their defaults. Default false.
                 */
                resetFlags(clear?: boolean): void;

                /**
                 * Syncs the Body's position with the parent Game Object.
                 * 
                 * This method is called every game frame, regardless if the world steps or not.
                 * @param willStep Will this Body run an update as well?
                 * @param delta The delta time, in seconds, elapsed since the last frame.
                 */
                preUpdate(willStep: boolean, delta: number): void;

                /**
                 * Performs a single physics step and updates the body velocity, angle, speed and other properties.
                 * 
                 * This method can be called multiple times per game frame, depending on the physics step rate.
                 * 
                 * The results are synced back to the Game Object in `postUpdate`.
                 * @param delta The delta time, in seconds, elapsed since the last frame.
                 */
                update(delta: number): void;

                /**
                 * Feeds the Body results back into the parent Game Object.
                 * 
                 * This method is called every game frame, regardless if the world steps or not.
                 */
                postUpdate(): void;

                /**
                 * Sets a custom collision boundary rectangle. Use if you want to have a custom
                 * boundary instead of the world boundaries.
                 * @param bounds The new boundary rectangle. Pass `null` to use the World bounds.
                 * @returns This Body object.
                 */
                setBoundsRectangle(bounds?: Phaser.Geom.Rectangle | undefined): this;

                /**
                 * Checks for collisions between this Body and the world boundary and separates them.undefined
                 * @returns True if this Body is colliding with the world boundary.
                 */
                checkWorldBounds(): boolean;

                /**
                 * Sets the offset of the Body's position from its Game Object's position.
                 * The Body's `position` isn't changed until the next `preUpdate`.
                 * @param x The horizontal offset, in source pixels.
                 * @param y The vertical offset, in source pixels. Default x.
                 * @returns This Body object.
                 */
                setOffset(x: number, y?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Assign this Body to a new Game Object.
                 * 
                 * Removes this body from the Physics World, assigns to the new Game Object, calls `setSize` and then
                 * adds this body back into the World again, setting it enabled, unless the `enable` argument is set to `false`.
                 * 
                 * If this body already has a Game Object, then it will remove itself from that Game Object first.
                 * 
                 * If the given `gameObject` doesn't have a `body` property, it is created and this Body is assigned to it.
                 * @param gameObject The Game Object to assign this Body to.
                 * @param enable Automatically enable this Body for physics. Default true.
                 * @returns This Body object.
                 */
                setGameObject(gameObject: Phaser.GameObjects.GameObject, enable?: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * Sizes and positions this Body, as a rectangle.
                 * Modifies the Body `offset` if `center` is true (the default).
                 * Resets the width and height to match current frame, if no width and height provided and a frame is found.
                 * @param width The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.
                 * @param height The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.
                 * @param center Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method. Default true.
                 * @returns This Body object.
                 */
                setSize(width?: number, height?: number, center?: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * Sizes and positions this Body, as a circle.
                 * @param radius The radius of the Body, in source pixels.
                 * @param offsetX The horizontal offset of the Body from its Game Object, in source pixels.
                 * @param offsetY The vertical offset of the Body from its Game Object, in source pixels.
                 * @returns This Body object.
                 */
                setCircle(radius: number, offsetX?: number, offsetY?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets this Body's parent Game Object to the given coordinates and resets this Body at the new coordinates.
                 * If the Body had any velocity or acceleration it is lost as a result of calling this.
                 * @param x The horizontal position to place the Game Object.
                 * @param y The vertical position to place the Game Object.
                 */
                reset(x: number, y: number): void;

                /**
                 * Sets acceleration, velocity, and speed to zero.undefined
                 * @returns This Body object.
                 */
                stop(): Phaser.Physics.Arcade.Body;

                /**
                 * Copies the coordinates of this Body's edges into an object.
                 * @param obj An object to copy the values into.
                 * @returns - An object with {x, y, right, bottom}.
                 */
                getBounds(obj: Phaser.Types.Physics.Arcade.ArcadeBodyBounds): Phaser.Types.Physics.Arcade.ArcadeBodyBounds;

                /**
                 * Tests if the coordinates are within this Body.
                 * @param x The horizontal coordinate.
                 * @param y The vertical coordinate.
                 * @returns True if (x, y) is within this Body.
                 */
                hitTest(x: number, y: number): boolean;

                /**
                 * Whether this Body is touching a tile or the world boundary while moving down.undefined
                 * @returns True if touching.
                 */
                onFloor(): boolean;

                /**
                 * Whether this Body is touching a tile or the world boundary while moving up.undefined
                 * @returns True if touching.
                 */
                onCeiling(): boolean;

                /**
                 * Whether this Body is touching a tile or the world boundary while moving left or right.undefined
                 * @returns True if touching.
                 */
                onWall(): boolean;

                /**
                 * The absolute (non-negative) change in this Body's horizontal position from the previous step.undefined
                 * @returns The absolute change in horizontal position since the last step, in pixels.
                 */
                deltaAbsX(): number;

                /**
                 * The absolute (non-negative) change in this Body's vertical position from the previous step.undefined
                 * @returns The absolute change in vertical position since the last step, in pixels.
                 */
                deltaAbsY(): number;

                /**
                 * The change in this Body's horizontal position from the previous step.
                 * This value is set during the Body's update phase.
                 * 
                 * As a Body can update multiple times per step this may not hold the final
                 * delta value for the Body. In this case, please see the `deltaXFinal` method.undefined
                 * @returns The change in horizontal position since the last step, in pixels.
                 */
                deltaX(): number;

                /**
                 * The change in this Body's vertical position from the previous step.
                 * This value is set during the Body's update phase.
                 * 
                 * As a Body can update multiple times per step this may not hold the final
                 * delta value for the Body. In this case, please see the `deltaYFinal` method.undefined
                 * @returns The change in vertical position since the last step, in pixels.
                 */
                deltaY(): number;

                /**
                 * The change in this Body's horizontal position from the previous game update.
                 * 
                 * This value is set during the `postUpdate` phase and takes into account the
                 * `deltaMax` and final position of the Body.
                 * 
                 * Because this value is not calculated until `postUpdate`, you must listen for it
                 * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will
                 * not be calculated by that point. If you _do_ use these values in `update` they
                 * will represent the delta from the _previous_ game frame.undefined
                 * @returns The final delta x value.
                 */
                deltaXFinal(): number;

                /**
                 * The change in this Body's vertical position from the previous game update.
                 * 
                 * This value is set during the `postUpdate` phase and takes into account the
                 * `deltaMax` and final position of the Body.
                 * 
                 * Because this value is not calculated until `postUpdate`, you must listen for it
                 * during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will
                 * not be calculated by that point. If you _do_ use these values in `update` they
                 * will represent the delta from the _previous_ game frame.undefined
                 * @returns The final delta y value.
                 */
                deltaYFinal(): number;

                /**
                 * The change in this Body's rotation from the previous step, in degrees.undefined
                 * @returns The change in rotation since the last step, in degrees.
                 */
                deltaZ(): number;

                /**
                 * Disables this Body and marks it for deletion by the simulation.
                 */
                destroy(): void;

                /**
                 * Draws this Body and its velocity, if enabled.
                 * @param graphic The Graphics object to draw on.
                 */
                drawDebug(graphic: Phaser.GameObjects.Graphics): void;

                /**
                 * Whether this Body will be drawn to the debug display.undefined
                 * @returns True if either `debugShowBody` or `debugShowVelocity` are enabled.
                 */
                willDrawDebug(): boolean;

                /**
                 * Sets whether this Body should calculate its velocity based on its change in
                 * position every frame. The default, which is to not do this, means that you
                 * make this Body move by setting the velocity directly. However, if you are
                 * trying to move this Body via a Tween, or have it follow a Path, then you
                 * should enable this instead. This will allow it to still collide with other
                 * bodies, something that isn't possible if you're just changing its position directly.
                 * @param value `true` if the Body calculate velocity based on changes in position, otherwise `false`. Default true.
                 * @returns This Body object.
                 */
                setDirectControl(value?: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * Sets whether this Body collides with the world boundary.
                 * 
                 * Optionally also sets the World Bounce and `onWorldBounds` values.
                 * @param value `true` if the Body should collide with the world bounds, otherwise `false`. Default true.
                 * @param bounceX If given this replaces the Body's `worldBounce.x` value.
                 * @param bounceY If given this replaces the Body's `worldBounce.y` value.
                 * @param onWorldBounds If given this replaces the Body's `onWorldBounds` value.
                 * @returns This Body object.
                 */
                setCollideWorldBounds(value?: boolean, bounceX?: number, bounceY?: number, onWorldBounds?: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's velocity.
                 * @param x The horizontal velocity, in pixels per second.
                 * @param y The vertical velocity, in pixels per second. Default x.
                 * @returns This Body object.
                 */
                setVelocity(x: number, y?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's horizontal velocity.
                 * @param value The velocity, in pixels per second.
                 * @returns This Body object.
                 */
                setVelocityX(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's vertical velocity.
                 * @param value The velocity, in pixels per second.
                 * @returns This Body object.
                 */
                setVelocityY(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's maximum velocity.
                 * @param x The horizontal velocity, in pixels per second.
                 * @param y The vertical velocity, in pixels per second. Default x.
                 * @returns This Body object.
                 */
                setMaxVelocity(x: number, y?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's maximum horizontal velocity.
                 * @param value The maximum horizontal velocity, in pixels per second.
                 * @returns This Body object.
                 */
                setMaxVelocityX(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's maximum vertical velocity.
                 * @param value The maximum vertical velocity, in pixels per second.
                 * @returns This Body object.
                 */
                setMaxVelocityY(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the maximum speed the Body can move.
                 * @param value The maximum speed value, in pixels per second. Set to a negative value to disable.
                 * @returns This Body object.
                 */
                setMaxSpeed(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Slide Factor of this Body.
                 * 
                 * The Slide Factor controls how much velocity is preserved when
                 * this Body is pushed by another Body.
                 * 
                 * The default value is 1, which means that it will take on all
                 * velocity given in the push. You can adjust this value to control
                 * how much velocity is retained by this Body when the push ends.
                 * 
                 * A value of 0, for example, will allow this Body to be pushed
                 * but then remain completely still after the push ends, such as
                 * you see in a game like Sokoban.
                 * 
                 * Or you can set a mid-point, such as 0.25 which will allow it
                 * to keep 25% of the original velocity when the push ends. You
                 * can combine this with the `setDrag()` method to create deceleration.
                 * @param x The horizontal slide factor. A value between 0 and 1.
                 * @param y The vertical slide factor. A value between 0 and 1. Default x.
                 * @returns This Body object.
                 */
                setSlideFactor(x: number, y?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's bounce.
                 * @param x The horizontal bounce, relative to 1.
                 * @param y The vertical bounce, relative to 1. Default x.
                 * @returns This Body object.
                 */
                setBounce(x: number, y?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's horizontal bounce.
                 * @param value The bounce, relative to 1.
                 * @returns This Body object.
                 */
                setBounceX(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's vertical bounce.
                 * @param value The bounce, relative to 1.
                 * @returns This Body object.
                 */
                setBounceY(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's acceleration.
                 * @param x The horizontal component, in pixels per second squared.
                 * @param y The vertical component, in pixels per second squared. Default x.
                 * @returns This Body object.
                 */
                setAcceleration(x: number, y?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's horizontal acceleration.
                 * @param value The acceleration, in pixels per second squared.
                 * @returns This Body object.
                 */
                setAccelerationX(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's vertical acceleration.
                 * @param value The acceleration, in pixels per second squared.
                 * @returns This Body object.
                 */
                setAccelerationY(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Enables or disables drag.
                 * @param value `true` to allow drag on this body, or `false` to disable it. Default true.
                 * @returns This Body object.
                 */
                setAllowDrag(value?: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * Enables or disables gravity's effect on this Body.
                 * @param value `true` to allow gravity on this body, or `false` to disable it. Default true.
                 * @returns This Body object.
                 */
                setAllowGravity(value?: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * Enables or disables rotation.
                 * @param value `true` to allow rotation on this body, or `false` to disable it. Default true.
                 * @returns This Body object.
                 */
                setAllowRotation(value?: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's drag.
                 * @param x The horizontal component, in pixels per second squared.
                 * @param y The vertical component, in pixels per second squared. Default x.
                 * @returns This Body object.
                 */
                setDrag(x: number, y?: number): Phaser.Physics.Arcade.Body;

                /**
                 * If this Body is using `drag` for deceleration this property controls how the drag is applied.
                 * If set to `true` drag will use a damping effect rather than a linear approach. If you are
                 * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in
                 * the game Asteroids) then you will get a far smoother and more visually correct deceleration
                 * by using damping, avoiding the axis-drift that is prone with linear deceleration.
                 * 
                 * If you enable this property then you should use far smaller `drag` values than with linear, as
                 * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow
                 * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.
                 * @param value `true` to use damping, or `false` to use drag.
                 * @returns This Body object.
                 */
                setDamping(value: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's horizontal drag.
                 * @param value The drag, in pixels per second squared.
                 * @returns This Body object.
                 */
                setDragX(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's vertical drag.
                 * @param value The drag, in pixels per second squared.
                 * @returns This Body object.
                 */
                setDragY(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's gravity.
                 * @param x The horizontal component, in pixels per second squared.
                 * @param y The vertical component, in pixels per second squared. Default x.
                 * @returns This Body object.
                 */
                setGravity(x: number, y?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's horizontal gravity.
                 * @param value The gravity, in pixels per second squared.
                 * @returns This Body object.
                 */
                setGravityX(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's vertical gravity.
                 * @param value The gravity, in pixels per second squared.
                 * @returns This Body object.
                 */
                setGravityY(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's friction.
                 * @param x The horizontal component, relative to 1.
                 * @param y The vertical component, relative to 1. Default x.
                 * @returns This Body object.
                 */
                setFriction(x: number, y?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's horizontal friction.
                 * @param value The friction value, relative to 1.
                 * @returns This Body object.
                 */
                setFrictionX(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's vertical friction.
                 * @param value The friction value, relative to 1.
                 * @returns This Body object.
                 */
                setFrictionY(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's angular velocity.
                 * @param value The velocity, in degrees per second.
                 * @returns This Body object.
                 */
                setAngularVelocity(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's angular acceleration.
                 * @param value The acceleration, in degrees per second squared.
                 * @returns This Body object.
                 */
                setAngularAcceleration(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's angular drag.
                 * @param value The drag, in degrees per second squared.
                 * @returns This Body object.
                 */
                setAngularDrag(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's mass.
                 * @param value The mass value, relative to 1.
                 * @returns This Body object.
                 */
                setMass(value: number): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's `immovable` property.
                 * @param value The value to assign to `immovable`. Default true.
                 * @returns This Body object.
                 */
                setImmovable(value?: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * Sets the Body's `enable` property.
                 * @param value The value to assign to `enable`. Default true.
                 * @returns This Body object.
                 */
                setEnable(value?: boolean): Phaser.Physics.Arcade.Body;

                /**
                 * This is an internal handler, called by the `ProcessX` function as part
                 * of the collision step. You should almost never call this directly.
                 * @param x The amount to add to the Body position.
                 * @param vx The amount to add to the Body velocity.
                 * @param left Set the blocked.left value?
                 * @param right Set the blocked.right value?
                 */
                processX(x: number, vx?: number, left?: boolean, right?: boolean): void;

                /**
                 * This is an internal handler, called by the `ProcessY` function as part
                 * of the collision step. You should almost never call this directly.
                 * @param y The amount to add to the Body position.
                 * @param vy The amount to add to the Body velocity.
                 * @param up Set the blocked.up value?
                 * @param down Set the blocked.down value?
                 */
                processY(y: number, vy?: number, up?: boolean, down?: boolean): void;

                /**
                 * The Body's horizontal position (left edge).
                 */
                x: number;

                /**
                 * The Body's vertical position (top edge).
                 */
                y: number;

                /**
                 * The left edge of the Body. Identical to x.
                 */
                readonly left: number;

                /**
                 * The right edge of the Body.
                 */
                readonly right: number;

                /**
                 * The top edge of the Body. Identical to y.
                 */
                readonly top: number;

                /**
                 * The bottom edge of this Body.
                 */
                readonly bottom: number;

                /**
                 * Sets the Collision Category that this Arcade Physics Body
                 * will use in order to determine what it can collide with.
                 * 
                 * It can only have one single category assigned to it.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
                 * @returns This Game Object.
                 */
                setCollisionCategory(category: number): this;

                /**
                 * Checks to see if the given Collision Category will collide with
                 * this Arcade Physics object or not.
                 * @param category Collision category value to test.
                 * @returns `true` if the given category will collide with this object, otherwise `false`.
                 */
                willCollideWith(category: number): boolean;

                /**
                 * Adds the given Collision Category to the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to add to this body's collision mask.
                 * @returns This Game Object.
                 */
                addCollidesWith(category: number): this;

                /**
                 * Removes the given Collision Category from the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to remove from this body's collision mask.
                 * @returns This Game Object.
                 */
                removeCollidesWith(category: number): this;

                /**
                 * Sets all of the Collision Categories that this Arcade Physics Body
                 * will collide with. You can either pass a single category value, or
                 * an array of them.
                 * 
                 * Calling this method will reset all of the collision categories,
                 * so only those passed to this method are enabled.
                 * 
                 * If you wish to add a new category to the existing mask, call
                 * the `addCollidesWith` method.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param categories The collision category to collide with, or an array of them.
                 * @returns This Game Object.
                 */
                setCollidesWith(categories: number | number[]): this;

                /**
                 * Resets the Collision Category and Mask back to the defaults,
                 * which means the body will belong to category 1 and will collide with all other categories.undefined
                 * @returns This Game Object.
                 */
                resetCollisionCategory(): this;

            }

            /**
             * An Arcade Physics Collider will automatically check for collision, or overlaps, between two objects
             * every step. If a collision, or overlap, occurs it will invoke the given callbacks.
             * 
             * Note, if setting `overlapOnly` to `true`, and one of the objects is a `TilemapLayer`, every tile in the layer, regardless of tile ID, will be checked for collision.
             * Even if the layer has had only a subset of tile IDs enabled for collision, all tiles will still be checked for overlap.
             */
            class Collider {
                /**
                 * 
                 * @param world The Arcade physics World that will manage the collisions.
                 * @param overlapOnly Whether to check for collisions or overlaps.
                 * @param object1 The first object to check for collision.
                 * @param object2 The second object to check for collision.
                 * @param collideCallback The callback to invoke when the two objects collide.
                 * @param processCallback The callback that is called before collision processing occurs. If it returns `false`, the collision or overlap is skipped for that pair.
                 * @param callbackContext The scope in which to call the callbacks.
                 */
                constructor(world: Phaser.Physics.Arcade.World, overlapOnly: boolean, object1: Phaser.Types.Physics.Arcade.ArcadeColliderType, object2: Phaser.Types.Physics.Arcade.ArcadeColliderType, collideCallback: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext: any);

                /**
                 * The world in which the bodies will collide.
                 */
                world: Phaser.Physics.Arcade.World;

                /**
                 * The name of the collider (unused by Phaser).
                 */
                name: string;

                /**
                 * Whether the collider is active.
                 */
                active: boolean;

                /**
                 * Whether to check for collisions or overlaps.
                 */
                overlapOnly: boolean;

                /**
                 * The first object to check for collision.
                 */
                object1: Phaser.Types.Physics.Arcade.ArcadeColliderType;

                /**
                 * The second object to check for collision.
                 */
                object2: Phaser.Types.Physics.Arcade.ArcadeColliderType;

                /**
                 * The callback to invoke when the two objects collide.
                 */
                collideCallback: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback;

                /**
                 * If a processCallback exists it must return true or collision checking will be skipped.
                 */
                processCallback: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback;

                /**
                 * The context the collideCallback and processCallback will run in.
                 */
                callbackContext: object;

                /**
                 * A name for the Collider.
                 * 
                 * Phaser does not use this value, it's for your own reference.
                 * @param name The name to assign to the Collider.
                 * @returns This Collider instance.
                 */
                setName(name: string): Phaser.Physics.Arcade.Collider;

                /**
                 * Called automatically by the Arcade Physics World during its step. Performs the collision or overlap check between the two registered objects and invokes the appropriate callbacks.
                 */
                update(): void;

                /**
                 * Removes Collider from World and disposes of its resources.
                 */
                destroy(): void;

            }

            /**
             * The Arcade Physics Factory allows you to easily create Arcade Physics enabled Game Objects.
             * Objects that are created by this Factory are automatically added to the physics world.
             */
            class Factory {
                /**
                 * 
                 * @param world The Arcade Physics World instance.
                 */
                constructor(world: Phaser.Physics.Arcade.World);

                /**
                 * A reference to the Arcade Physics World.
                 */
                world: Phaser.Physics.Arcade.World;

                /**
                 * A reference to the Scene this Arcade Physics instance belongs to.
                 */
                scene: Phaser.Scene;

                /**
                 * A reference to the Scene.Systems this Arcade Physics instance belongs to.
                 */
                sys: Phaser.Scenes.Systems;

                /**
                 * Creates a new Arcade Physics Collider object.
                 * @param object1 The first object to check for collision.
                 * @param object2 The second object to check for collision.
                 * @param collideCallback The callback to invoke when the two objects collide.
                 * @param processCallback An optional callback to invoke when the two objects are tested for collision. Return `true` to allow the collision to be processed, or `false` to prevent it.
                 * @param callbackContext The scope in which to call the callbacks.
                 * @returns The Collider that was created.
                 */
                collider(object1: Phaser.Types.Physics.Arcade.ArcadeColliderType, object2: Phaser.Types.Physics.Arcade.ArcadeColliderType, collideCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): Phaser.Physics.Arcade.Collider;

                /**
                 * Creates a new Arcade Physics Collider Overlap object.
                 * @param object1 The first object to check for overlap.
                 * @param object2 The second object to check for overlap.
                 * @param collideCallback The callback to invoke when the two objects overlap.
                 * @param processCallback An optional callback to invoke when the two objects are tested for overlap. Return `true` to allow the overlap to be processed, or `false` to prevent it.
                 * @param callbackContext The scope in which to call the callbacks.
                 * @returns The Collider that was created.
                 */
                overlap(object1: Phaser.Types.Physics.Arcade.ArcadeColliderType, object2: Phaser.Types.Physics.Arcade.ArcadeColliderType, collideCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): Phaser.Physics.Arcade.Collider;

                /**
                 * Adds an Arcade Physics Body to the given Game Object.
                 * @param gameObject A Game Object.
                 * @param isStatic Create a Static body (true) or Dynamic body (false). Default false.
                 * @returns The Game Object.
                 */
                existing<G extends Phaser.GameObjects.GameObject>(gameObject: G, isStatic?: boolean): G;

                /**
                 * Creates a new Arcade Image object with a Static body.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with.
                 * @returns The Image object that was created.
                 */
                staticImage(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.Types.Physics.Arcade.ImageWithStaticBody;

                /**
                 * Creates a new Arcade Image object with a Dynamic body.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with.
                 * @returns The Image object that was created.
                 */
                image(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.Types.Physics.Arcade.ImageWithDynamicBody;

                /**
                 * Creates a new Arcade Sprite object with a Static body.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with.
                 * @returns The Sprite object that was created.
                 */
                staticSprite(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.Types.Physics.Arcade.SpriteWithStaticBody;

                /**
                 * Creates a new Arcade Sprite object with a Dynamic body.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with.
                 * @returns The Sprite object that was created.
                 */
                sprite(x: number, y: number, key: string, frame?: string | number): Phaser.Types.Physics.Arcade.SpriteWithDynamicBody;

                /**
                 * Creates a Static Physics Group object.
                 * All Game Objects created by this Group will automatically be static Arcade Physics objects.
                 * @param children Game Objects to add to this group; or the `config` argument.
                 * @param config Settings for this group.
                 * @returns The Static Group object that was created.
                 */
                staticGroup(children?: Phaser.GameObjects.GameObject[] | Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig, config?: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.Physics.Arcade.StaticGroup;

                /**
                 * Creates a Physics Group object.
                 * All Game Objects created by this Group will automatically be dynamic Arcade Physics objects.
                 * @param children Game Objects to add to this group; or the `config` argument.
                 * @param config Settings for this group.
                 * @returns The Group object that was created.
                 */
                group(children?: Phaser.GameObjects.GameObject[] | Phaser.Types.Physics.Arcade.PhysicsGroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig, config?: Phaser.Types.Physics.Arcade.PhysicsGroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig): Phaser.Physics.Arcade.Group;

                /**
                 * Creates a new physics Body with the given position and size.
                 * 
                 * This Body is not associated with any Game Object, but still exists within the world
                 * and can be tested for collision, have velocity, etc.
                 * @param x The horizontal position of this Body in the physics world.
                 * @param y The vertical position of this Body in the physics world.
                 * @param width The width of the Body in pixels. Cannot be negative or zero. Default 64.
                 * @param height The height of the Body in pixels. Cannot be negative or zero. Default 64.
                 * @returns The Body that was created.
                 */
                body(x: number, y: number, width?: number, height?: number): Phaser.Physics.Arcade.Body;

                /**
                 * Creates a new static physics Body with the given position and size.
                 * 
                 * This Body is not associated with any Game Object, but still exists within the world
                 * and can be tested for collision, etc.
                 * @param x The horizontal position of this Body in the physics world.
                 * @param y The vertical position of this Body in the physics world.
                 * @param width The width of the Body in pixels. Cannot be negative or zero. Default 64.
                 * @param height The height of the Body in pixels. Cannot be negative or zero. Default 64.
                 * @returns The Static Body that was created.
                 */
                staticBody(x: number, y: number, width?: number, height?: number): Phaser.Physics.Arcade.StaticBody;

                /**
                 * Destroys this Factory.
                 */
                destroy(): void;

            }

            /**
             * Combines one or more category bitfields using bitwise OR and returns the
             * resulting collision mask. This mask can be assigned to an Arcade Physics body
             * to define which categories of bodies it should collide with.
             * @param categories A unique category bitfield, or an array of them.
             * @returns A bitmask representing the combined set of categories that should trigger collisions.
             */
            function GetCollidesWith(categories: number | number[]): number;

            /**
             * Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties
             * accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX`.
             * @param body1 The first Body to separate.
             * @param body2 The second Body to separate.
             * @param overlapOnly Is this an overlap only check, or part of separation?
             * @param bias A value added to the delta values during collision checks. Increase it to prevent sprite tunneling (sprites passing through another instead of colliding).
             * @returns The amount of overlap.
             */
            function GetOverlapX(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number): number;

            /**
             * Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties
             * accordingly, including: `touching.up`, `touching.down`, `touching.none`, `blocked.up`, `blocked.down` and `overlapY`.
             * @param body1 The first Body to separate.
             * @param body2 The second Body to separate.
             * @param overlapOnly Is this an overlap only check, or part of separation?
             * @param bias A value added to the delta values during collision checks. Increase it to prevent sprite tunneling (sprites passing through another instead of colliding).
             * @returns The amount of overlap.
             */
            function GetOverlapY(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number): number;

            /**
             * An Arcade Physics Group object.
             * 
             * The primary use of a Physics Group is a way to collect together physics-enabled objects
             * that share the same intrinsic structure into a single pool. They can then be easily
             * compared against other Groups, or Game Objects.
             * 
             * All Game Objects created by, or added to this Group will automatically be given **dynamic**
             * Arcade Physics bodies (if they have no body already) and the bodies will receive the
             * Groups {@link Phaser.Physics.Arcade.Group#defaults default values}.
             * 
             * You should not pass objects into this Group that should not receive a body. For example,
             * do not add basic Geometry or Tilemap Layers into a Group, as they will not behave in the
             * way you may expect. Groups should all ideally have objects of the same type in them.
             * 
             * If you wish to create a Group filled with Static Bodies, please see {@link Phaser.Physics.Arcade.StaticGroup}.
             */
            class Group extends Phaser.GameObjects.Group implements Phaser.Physics.Arcade.Components.Collision {
                /**
                 * 
                 * @param world The physics simulation.
                 * @param scene The scene this group belongs to.
                 * @param children Game Objects to add to this group; or the `config` argument.
                 * @param config Settings for this group.
                 */
                constructor(world: Phaser.Physics.Arcade.World, scene: Phaser.Scene, children?: Phaser.GameObjects.GameObject[] | Phaser.Types.Physics.Arcade.PhysicsGroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig, config?: Phaser.Types.Physics.Arcade.PhysicsGroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig);

                /**
                 * The physics simulation.
                 */
                world: Phaser.Physics.Arcade.World;

                /**
                 * The class to create new Group members from.
                 * 
                 * This should be either `Phaser.Physics.Arcade.Image`, `Phaser.Physics.Arcade.Sprite`, or a class extending one of those.
                 * 
                 * The constructor arguments must match `(scene, x, y, texture, frame)`.
                 */
                classType: Function;

                /**
                 * The physics type of the Group's members.
                 */
                physicsType: number;

                /**
                 * The Arcade Physics Group Collision Category.
                 * 
                 * This can be set to any valid collision bitfield value.
                 * 
                 * See the `setCollisionCategory` method for more details.
                 */
                collisionCategory: number;

                /**
                 * The Arcade Physics Group Collision Mask.
                 * 
                 * See the `setCollidesWith` method for more details.
                 */
                collisionMask: number;

                /**
                 * Default physics properties applied to Game Objects added to the Group or created by the Group. Derived from the `config` argument.
                 * 
                 * You can remove the default values by setting this property to `{}`.
                 */
                defaults: Phaser.Types.Physics.Arcade.PhysicsGroupDefaults;

                /**
                 * A textual representation of this Game Object.
                 * Used internally by Phaser but is available for your own custom classes to populate.
                 */
                type: string;

                /**
                 * Enables a Game Object's Body and assigns `defaults`. Called when a Group member is added or created.
                 * @param child The Game Object being added.
                 */
                createCallbackHandler(child: Phaser.GameObjects.GameObject): void;

                /**
                 * Disables a Game Object's Body. Called when a Group member is removed.
                 * @param child The Game Object being removed.
                 */
                removeCallbackHandler(child: Phaser.GameObjects.GameObject): void;

                /**
                 * Sets the velocity of each Group member.
                 * @param x The horizontal velocity, in pixels per second.
                 * @param y The vertical velocity, in pixels per second.
                 * @param step The velocity increment. When set, the first member receives velocity (x, y), the second (x + step, y + step), and so on. Default 0.
                 * @returns This Physics Group object.
                 */
                setVelocity(x: number, y: number, step?: number): Phaser.Physics.Arcade.Group;

                /**
                 * Sets the horizontal velocity of each Group member.
                 * @param value The velocity value, in pixels per second.
                 * @param step The velocity increment. When set, the first member receives velocity (x), the second (x + step), and so on. Default 0.
                 * @returns This Physics Group object.
                 */
                setVelocityX(value: number, step?: number): Phaser.Physics.Arcade.Group;

                /**
                 * Sets the vertical velocity of each Group member.
                 * @param value The velocity value, in pixels per second.
                 * @param step The velocity increment. When set, the first member receives velocity (y), the second (y + step), and so on. Default 0.
                 * @returns This Physics Group object.
                 */
                setVelocityY(value: number, step?: number): Phaser.Physics.Arcade.Group;

                /**
                 * Sets the Collision Category that this Arcade Physics Body
                 * will use in order to determine what it can collide with.
                 * 
                 * It can only have one single category assigned to it.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
                 * @returns This Game Object.
                 */
                setCollisionCategory(category: number): this;

                /**
                 * Checks to see if the given Collision Category will collide with
                 * this Arcade Physics object or not.
                 * @param category Collision category value to test.
                 * @returns `true` if the given category will collide with this object, otherwise `false`.
                 */
                willCollideWith(category: number): boolean;

                /**
                 * Adds the given Collision Category to the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to add to this body's collision mask.
                 * @returns This Game Object.
                 */
                addCollidesWith(category: number): this;

                /**
                 * Removes the given Collision Category from the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to remove from this body's collision mask.
                 * @returns This Game Object.
                 */
                removeCollidesWith(category: number): this;

                /**
                 * Sets all of the Collision Categories that this Arcade Physics Body
                 * will collide with. You can either pass a single category value, or
                 * an array of them.
                 * 
                 * Calling this method will reset all of the collision categories,
                 * so only those passed to this method are enabled.
                 * 
                 * If you wish to add a new category to the existing mask, call
                 * the `addCollidesWith` method.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param categories The collision category to collide with, or an array of them.
                 * @returns This Game Object.
                 */
                setCollidesWith(categories: number | number[]): this;

                /**
                 * Resets the Collision Category and Mask back to the defaults,
                 * which means the body will belong to category 1 and will collide with all other categories.undefined
                 * @returns This Game Object.
                 */
                resetCollisionCategory(): this;

            }

            /**
             * Separates two overlapping bodies on the X-axis (horizontally).
             * 
             * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.
             * 
             * The bodies won't be separated if there is no horizontal overlap between them, if both are immovable, or if either one uses custom separation logic via `customSeparateX`.
             * @param body1 The first Body to separate.
             * @param body2 The second Body to separate.
             * @param overlapOnly If `true`, the bodies will only have their overlap data set and no separation will take place.
             * @param bias A value to add to the delta value during overlap checking. Used to prevent sprite tunneling.
             * @param overlap If given then this value will be used as the overlap and no check will be run.
             * @returns `true` if the two bodies overlap horizontally, otherwise `false`.
             */
            function SeparateX(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number, overlap?: number): boolean;

            /**
             * Separates two overlapping bodies on the Y-axis (vertically).
             * 
             * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.
             * 
             * The bodies won't be separated if there is no vertical overlap between them, if they are static, or if either one uses custom logic for its separation.
             * @param body1 The first Body to separate.
             * @param body2 The second Body to separate.
             * @param overlapOnly If `true`, the bodies will only have their overlap data set and no separation will take place.
             * @param bias A value to add to the delta value during overlap checking. Used to prevent sprite tunneling.
             * @param overlap If given then this value will be used as the overlap and no check will be run.
             * @returns `true` if the two bodies overlap vertically, otherwise `false`.
             */
            function SeparateY(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number, overlap?: number): boolean;

            /**
             * Either sets or creates the Arcade Body Collision object.
             * 
             * Sets the `none` property to the value of `noneFlip`. When `noneFlip` is `false`, all four
             * directional flags (`up`, `down`, `left`, `right`) are set to `true`, indicating collision
             * on all sides. When `noneFlip` is `true`, all directional flags are set to `false`.
             * 
             * Mostly only used internally.
             * @param noneFlip The value to assign to the `none` property. When `false`, all directional collision flags are enabled.
             * @param data The collision data object to populate, or create if not given.
             * @returns The collision data.
             */
            function SetCollisionObject(noneFlip: boolean, data?: Phaser.Types.Physics.Arcade.ArcadeBodyCollision): Phaser.Types.Physics.Arcade.ArcadeBodyCollision;

            /**
             * A Static Arcade Physics Body.
             * 
             * A Static Body never moves, and isn't automatically synchronized with its parent Game Object.
             * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Static Body manually.
             * 
             * A Static Body can collide with other Bodies, but is never moved by collisions.
             * 
             * Static Bodies are ideal for platforms, walls, floors, and other immovable environmental
             * elements. Unlike Dynamic Bodies, they have no velocity, acceleration, or gravity,
             * and are not moved by collisions.
             * 
             * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Body}.
             */
            class StaticBody implements Phaser.Physics.Arcade.Components.Collision {
                /**
                 * 
                 * @param world The Arcade Physics simulation this Static Body belongs to.
                 * @param gameObject The Game Object this Body belongs to. As of Phaser 3.60 this is now optional.
                 */
                constructor(world: Phaser.Physics.Arcade.World, gameObject?: Phaser.GameObjects.GameObject);

                /**
                 * The Arcade Physics simulation this Static Body belongs to.
                 */
                world: Phaser.Physics.Arcade.World;

                /**
                 * The Game Object this Static Body belongs to.
                 * 
                 * As of Phaser 3.60 this is now optional and can be undefined.
                 */
                gameObject: Phaser.GameObjects.GameObject;

                /**
                 * A quick-test flag that signifies this is a Body, used in the World collision handler.
                 */
                readonly isBody: boolean;

                /**
                 * Whether the Static Body's boundary is drawn to the debug display.
                 */
                debugShowBody: boolean;

                /**
                 * The color of this Static Body on the debug display.
                 */
                debugBodyColor: number;

                /**
                 * Whether this Static Body is updated by the physics simulation.
                 */
                enable: boolean;

                /**
                 * Whether this Static Body's boundary is circular (`true`) or rectangular (`false`).
                 */
                isCircle: boolean;

                /**
                 * If this Static Body is circular, this is the radius of the boundary, as set by {@link Phaser.Physics.Arcade.StaticBody#setCircle}, in pixels.
                 * Equal to `halfWidth`.
                 */
                radius: number;

                /**
                 * The offset set by {@link Phaser.Physics.Arcade.StaticBody#setCircle} or {@link Phaser.Physics.Arcade.StaticBody#setSize}.
                 * 
                 * This doesn't affect the Static Body's position, because a Static Body does not follow its Game Object.
                 */
                readonly offset: Phaser.Math.Vector2;

                /**
                 * The position of this Static Body within the simulation.
                 */
                position: Phaser.Math.Vector2;

                /**
                 * The width of the Static Body's boundary, in pixels.
                 * If the Static Body is circular, this is also the Static Body's diameter.
                 */
                width: number;

                /**
                 * The height of the Static Body's boundary, in pixels.
                 * If the Static Body is circular, this is also the Static Body's diameter.
                 */
                height: number;

                /**
                 * Half the Static Body's width, in pixels.
                 * If the Static Body is circular, this is also the Static Body's radius.
                 */
                halfWidth: number;

                /**
                 * Half the Static Body's height, in pixels.
                 * If the Static Body is circular, this is also the Static Body's radius.
                 */
                halfHeight: number;

                /**
                 * The center of the Static Body's boundary.
                 * This is the midpoint of its `position` (top-left corner) and its bottom-right corner.
                 */
                center: Phaser.Math.Vector2;

                /**
                 * A constant zero velocity used by the Arcade Physics simulation for calculations.
                 */
                readonly velocity: Phaser.Math.Vector2;

                /**
                 * A constant `false` value expected by the Arcade Physics simulation.
                 */
                readonly allowGravity: boolean;

                /**
                 * Gravitational force applied specifically to this Body. Values are in pixels per second squared. Always zero for a Static Body.
                 */
                readonly gravity: Phaser.Math.Vector2;

                /**
                 * Rebound, or restitution, following a collision, relative to 1. Always zero for a Static Body.
                 */
                readonly bounce: Phaser.Math.Vector2;

                /**
                 * Whether the simulation emits a `worldbounds` event when this StaticBody collides with the world boundary.
                 * Always false for a Static Body. (Static Bodies never collide with the world boundary and never trigger a `worldbounds` event.)
                 */
                readonly onWorldBounds: boolean;

                /**
                 * Whether the simulation emits a `collide` event when this StaticBody collides with another.
                 */
                onCollide: boolean;

                /**
                 * Whether the simulation emits an `overlap` event when this StaticBody overlaps with another.
                 */
                onOverlap: boolean;

                /**
                 * The StaticBody's inertia, relative to a default unit (1). With `bounce`, this affects the exchange of momentum (velocities) during collisions.
                 */
                mass: number;

                /**
                 * Whether this object can be moved by collisions with another body.
                 */
                immovable: boolean;

                /**
                 * Sets if this Body can be pushed by another Body.
                 * 
                 * A body that cannot be pushed will reflect back all of the velocity it is given to the
                 * colliding body. If that body is also not pushable, then the separation will be split
                 * between them evenly.
                 * 
                 * If you want your body to never move or separate at all, see the `setImmovable` method.
                 * 
                 * By default, Static Bodies are not pushable.
                 */
                pushable: boolean;

                /**
                 * A flag disabling the default horizontal separation of colliding bodies. Pass your own `collideHandler` to the collider.
                 */
                customSeparateX: boolean;

                /**
                 * A flag disabling the default vertical separation of colliding bodies. Pass your own `collideHandler` to the collider.
                 */
                customSeparateY: boolean;

                /**
                 * The amount of horizontal overlap (before separation), if this Body is colliding with another.
                 */
                overlapX: number;

                /**
                 * The amount of vertical overlap (before separation), if this Body is colliding with another.
                 */
                overlapY: number;

                /**
                 * The amount of overlap (before separation), if this StaticBody is circular and colliding with another circular body.
                 */
                overlapR: number;

                /**
                 * Whether this StaticBody has ever overlapped with another while both were not moving.
                 */
                embedded: boolean;

                /**
                 * Whether this StaticBody interacts with the world boundary.
                 * Always false for a Static Body. (Static Bodies never collide with the world boundary.)
                 */
                readonly collideWorldBounds: boolean;

                /**
                 * Whether this StaticBody is checked for collisions and for which directions. You can set `checkCollision.none = true` to disable collision checks.
                 */
                checkCollision: Phaser.Types.Physics.Arcade.ArcadeBodyCollision;

                /**
                 * This property is kept for compatibility with Dynamic Bodies.
                 * Avoid using it.
                 */
                touching: Phaser.Types.Physics.Arcade.ArcadeBodyCollision;

                /**
                 * This property is kept for compatibility with Dynamic Bodies.
                 * Avoid using it.
                 * The values are always false for a Static Body.
                 */
                wasTouching: Phaser.Types.Physics.Arcade.ArcadeBodyCollision;

                /**
                 * This property is kept for compatibility with Dynamic Bodies.
                 * Avoid using it.
                 */
                blocked: Phaser.Types.Physics.Arcade.ArcadeBodyCollision;

                /**
                 * The StaticBody's physics type (static by default).
                 */
                physicsType: number;

                /**
                 * The Arcade Physics Body Collision Category.
                 * 
                 * This can be set to any valid collision bitfield value.
                 * 
                 * See the `setCollisionCategory` method for more details.
                 */
                collisionCategory: number;

                /**
                 * The Arcade Physics Body Collision Mask.
                 * 
                 * See the `setCollidesWith` method for more details.
                 */
                collisionMask: number;

                /**
                 * Changes the Game Object this Body is bound to.
                 * 
                 * First it removes its reference from the old Game Object, then sets the new one.
                 * 
                 * This body will be resized to match the frame dimensions of the given Game Object, if it has a texture frame.
                 * You can optionally update the position and dimensions of this Body to reflect that of the new Game Object.
                 * @param gameObject The Game Object to assign this Body to.
                 * @param update Reposition and resize this Body to match the new Game Object? Default true.
                 * @param enable Automatically enable this Body for physics. Default true.
                 * @returns This Static Body object.
                 */
                setGameObject(gameObject: Phaser.GameObjects.GameObject, update?: boolean, enable?: boolean): Phaser.Physics.Arcade.StaticBody;

                /**
                 * Syncs the Static Body's position and size with its parent Game Object.undefined
                 * @returns This Static Body object.
                 */
                updateFromGameObject(): Phaser.Physics.Arcade.StaticBody;

                /**
                 * Positions the Static Body at an offset from its Game Object.
                 * @param x The horizontal offset of the Static Body from the Game Object's `x`.
                 * @param y The vertical offset of the Static Body from the Game Object's `y`.
                 * @returns This Static Body object.
                 */
                setOffset(x: number, y: number): Phaser.Physics.Arcade.StaticBody;

                /**
                 * Sets the size of the Static Body.
                 * When `center` is true, also repositions it.
                 * Resets the width and height to match current frame, if no width and height provided and a frame is found.
                 * @param width The width of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.
                 * @param height The height of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.
                 * @param center Place the Static Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method. Default true.
                 * @returns This Static Body object.
                 */
                setSize(width?: number, height?: number, center?: boolean): Phaser.Physics.Arcade.StaticBody;

                /**
                 * Sets this Static Body to have a circular body and sets its size and position.
                 * @param radius The radius of the StaticBody, in pixels.
                 * @param offsetX The horizontal offset of the StaticBody from its Game Object, in pixels.
                 * @param offsetY The vertical offset of the StaticBody from its Game Object, in pixels.
                 * @returns This Static Body object.
                 */
                setCircle(radius: number, offsetX?: number, offsetY?: number): Phaser.Physics.Arcade.StaticBody;

                /**
                 * Updates the StaticBody's `center` from its `position` and dimensions.
                 */
                updateCenter(): void;

                /**
                 * Resets this Static Body to its parent Game Object's position.
                 * 
                 * If `x` and `y` are given, the parent Game Object is placed there and this Static Body is centered on it.
                 * Otherwise this Static Body is centered on the Game Object's current position.
                 * @param x The x coordinate to reset the body to. If not given will use the parent Game Object's coordinate.
                 * @param y The y coordinate to reset the body to. If not given will use the parent Game Object's coordinate.
                 */
                reset(x?: number, y?: number): void;

                /**
                 * NOOP function. A Static Body cannot be stopped.undefined
                 * @returns This Static Body object.
                 */
                stop(): Phaser.Physics.Arcade.StaticBody;

                /**
                 * Returns the x and y coordinates of the top left and bottom right points of the StaticBody.
                 * @param obj The object which will hold the coordinates of the bounds.
                 * @returns The same object that was passed with `x`, `y`, `right` and `bottom` values matching the respective values of the StaticBody.
                 */
                getBounds(obj: Phaser.Types.Physics.Arcade.ArcadeBodyBounds): Phaser.Types.Physics.Arcade.ArcadeBodyBounds;

                /**
                 * Checks to see if a given x,y coordinate is colliding with this Static Body.
                 * @param x The x coordinate to check against this body.
                 * @param y The y coordinate to check against this body.
                 * @returns `true` if the given coordinate lies within this body, otherwise `false`.
                 */
                hitTest(x: number, y: number): boolean;

                /**
                 * NOOP
                 */
                postUpdate(): void;

                /**
                 * The absolute (non-negative) change in this StaticBody's horizontal position from the previous step. Always zero.undefined
                 * @returns Always zero for a Static Body.
                 */
                deltaAbsX(): number;

                /**
                 * The absolute (non-negative) change in this StaticBody's vertical position from the previous step. Always zero.undefined
                 * @returns Always zero for a Static Body.
                 */
                deltaAbsY(): number;

                /**
                 * The change in this StaticBody's horizontal position from the previous step. Always zero.undefined
                 * @returns The change in horizontal position since the last step, in pixels. Always zero for a Static Body.
                 */
                deltaX(): number;

                /**
                 * The change in this StaticBody's vertical position from the previous step. Always zero.undefined
                 * @returns The change in vertical position since the last step, in pixels. Always zero for a Static Body.
                 */
                deltaY(): number;

                /**
                 * The change in this StaticBody's rotation from the previous step. Always zero.undefined
                 * @returns The change in this StaticBody's rotation from the previous step. Always zero.
                 */
                deltaZ(): number;

                /**
                 * Disables this Body and marks it for destruction during the next step.
                 */
                destroy(): void;

                /**
                 * Draws a graphical representation of the StaticBody for visual debugging purposes.
                 * @param graphic The Graphics object to use for the debug drawing of the StaticBody.
                 */
                drawDebug(graphic: Phaser.GameObjects.Graphics): void;

                /**
                 * Indicates whether the StaticBody is going to be showing a debug visualization during postUpdate.undefined
                 * @returns Whether or not the StaticBody is going to show the debug visualization during postUpdate.
                 */
                willDrawDebug(): boolean;

                /**
                 * Sets the Mass of the StaticBody. Will set the Mass to 0.1 if the value passed is less than or equal to zero.
                 * @param value The value to set the Mass to. Values of zero or less are changed to 0.1.
                 * @returns This Static Body object.
                 */
                setMass(value: number): Phaser.Physics.Arcade.StaticBody;

                /**
                 * The x coordinate of the StaticBody.
                 */
                x: number;

                /**
                 * The y coordinate of the StaticBody.
                 */
                y: number;

                /**
                 * Returns the left-most x coordinate of the area of the StaticBody.
                 */
                readonly left: number;

                /**
                 * The right-most x coordinate of the area of the StaticBody.
                 */
                readonly right: number;

                /**
                 * The highest y coordinate of the area of the StaticBody.
                 */
                readonly top: number;

                /**
                 * The lowest y coordinate of the area of the StaticBody. (y + height)
                 */
                readonly bottom: number;

                /**
                 * Sets the Collision Category that this Arcade Physics Body
                 * will use in order to determine what it can collide with.
                 * 
                 * It can only have one single category assigned to it.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
                 * @returns This Game Object.
                 */
                setCollisionCategory(category: number): this;

                /**
                 * Checks to see if the given Collision Category will collide with
                 * this Arcade Physics object or not.
                 * @param category Collision category value to test.
                 * @returns `true` if the given category will collide with this object, otherwise `false`.
                 */
                willCollideWith(category: number): boolean;

                /**
                 * Adds the given Collision Category to the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to add to this body's collision mask.
                 * @returns This Game Object.
                 */
                addCollidesWith(category: number): this;

                /**
                 * Removes the given Collision Category from the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to remove from this body's collision mask.
                 * @returns This Game Object.
                 */
                removeCollidesWith(category: number): this;

                /**
                 * Sets all of the Collision Categories that this Arcade Physics Body
                 * will collide with. You can either pass a single category value, or
                 * an array of them.
                 * 
                 * Calling this method will reset all of the collision categories,
                 * so only those passed to this method are enabled.
                 * 
                 * If you wish to add a new category to the existing mask, call
                 * the `addCollidesWith` method.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param categories The collision category to collide with, or an array of them.
                 * @returns This Game Object.
                 */
                setCollidesWith(categories: number | number[]): this;

                /**
                 * Resets the Collision Category and Mask back to the defaults,
                 * which means the body will belong to category 1 and will collide with all other categories.undefined
                 * @returns This Game Object.
                 */
                resetCollisionCategory(): this;

            }

            /**
             * An Arcade Physics Static Group object.
             * 
             * A Static Group is a container for Game Objects that each have a static Arcade Physics body. Static bodies
             * are fixed in place and never move in response to velocity, gravity, or collisions. They are ideal for
             * level geometry such as platforms, walls, floors, and other immovable obstacles. Because their positions
             * never change during gameplay, they are more performant than dynamic bodies for this purpose.
             * 
             * All Game Objects created by or added to this Group will automatically be given a static Arcade Physics
             * body, if they do not already have one. If a Game Object is added that already has a dynamic body, that
             * body is destroyed and replaced with a static one.
             * 
             * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Group}.
             */
            class StaticGroup extends Phaser.GameObjects.Group implements Phaser.Physics.Arcade.Components.Collision {
                /**
                 * 
                 * @param world The physics simulation.
                 * @param scene The scene this group belongs to.
                 * @param children Game Objects to add to this group; or the `config` argument.
                 * @param config Settings for this group.
                 */
                constructor(world: Phaser.Physics.Arcade.World, scene: Phaser.Scene, children?: Phaser.GameObjects.GameObject[] | Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig, config?: Phaser.Types.GameObjects.Group.GroupConfig | Phaser.Types.GameObjects.Group.GroupCreateConfig);

                /**
                 * The physics simulation.
                 */
                world: Phaser.Physics.Arcade.World;

                /**
                 * The type of physics body assigned to children of this group.
                 */
                physicsType: number;

                /**
                 * The Arcade Physics Static Group Collision Category.
                 * 
                 * This can be set to any valid collision bitfield value.
                 * 
                 * See the `setCollisionCategory` method for more details.
                 */
                collisionCategory: number;

                /**
                 * The Arcade Physics Static Group Collision Mask.
                 * 
                 * See the `setCollidesWith` method for more details.
                 */
                collisionMask: number;

                /**
                 * A textual representation of this Game Object.
                 * Used internally by Phaser but is available for your own custom classes to populate.
                 */
                type: string;

                /**
                 * Adds a static physics body to the new group member (if it lacks one) and adds it to the simulation.
                 * @param child The new group member.
                 */
                createCallbackHandler(child: Phaser.GameObjects.GameObject): void;

                /**
                 * Disables the group member's physics body, removing it from the simulation.
                 * @param child The group member being removed.
                 */
                removeCallbackHandler(child: Phaser.GameObjects.GameObject): void;

                /**
                 * Internal callback invoked after multiple group members are created at once via `createMultiple`.
                 * Calls {@link Phaser.Physics.Arcade.StaticGroup#refresh} to synchronize all static physics bodies
                 * with the current positions of their parent Game Objects.
                 * @param entries The newly created group members.
                 */
                createMultipleCallbackHandler(entries: Phaser.GameObjects.GameObject[]): void;

                /**
                 * Resets each static physics body in this group to the current position of its parent Game Object.
                 * Call this after manually repositioning any members so their bodies stay in sync.
                 * Body sizes are not changed by this method; use {@link Phaser.Physics.Arcade.Components.Enable#refreshBody} to resize a body.undefined
                 * @returns This group.
                 */
                refresh(): Phaser.Physics.Arcade.StaticGroup;

                /**
                 * Sets the Collision Category that this Arcade Physics Body
                 * will use in order to determine what it can collide with.
                 * 
                 * It can only have one single category assigned to it.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
                 * @returns This Game Object.
                 */
                setCollisionCategory(category: number): this;

                /**
                 * Checks to see if the given Collision Category will collide with
                 * this Arcade Physics object or not.
                 * @param category Collision category value to test.
                 * @returns `true` if the given category will collide with this object, otherwise `false`.
                 */
                willCollideWith(category: number): boolean;

                /**
                 * Adds the given Collision Category to the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to add to this body's collision mask.
                 * @returns This Game Object.
                 */
                addCollidesWith(category: number): this;

                /**
                 * Removes the given Collision Category from the list of those that this
                 * Arcade Physics Body will collide with.
                 * @param category The collision category to remove from this body's collision mask.
                 * @returns This Game Object.
                 */
                removeCollidesWith(category: number): this;

                /**
                 * Sets all of the Collision Categories that this Arcade Physics Body
                 * will collide with. You can either pass a single category value, or
                 * an array of them.
                 * 
                 * Calling this method will reset all of the collision categories,
                 * so only those passed to this method are enabled.
                 * 
                 * If you wish to add a new category to the existing mask, call
                 * the `addCollidesWith` method.
                 * 
                 * If you wish to reset the collision category and mask, call
                 * the `resetCollisionCategory` method.
                 * @param categories The collision category to collide with, or an array of them.
                 * @returns This Game Object.
                 */
                setCollidesWith(categories: number | number[]): this;

                /**
                 * Resets the Collision Category and Mask back to the defaults,
                 * which means the body will belong to category 1 and will collide with all other categories.undefined
                 * @returns This Game Object.
                 */
                resetCollisionCategory(): this;

            }

            /**
             * The Arcade Physics World.
             * 
             * The World is responsible for creating, managing, colliding and updating all of the bodies within it.
             * 
             * An instance of the World belongs to a Phaser.Scene and is accessed via the property `physics.world`.
             * 
             * It uses an RTree spatial index for fast broad-phase collision detection and supports
             * tilemap collision. The World fires events for collisions, overlaps, world bounds
             * contacts, and pause/resume state changes.
             */
            class World extends Phaser.Events.EventEmitter {
                /**
                 * 
                 * @param scene The Scene to which this World instance belongs.
                 * @param config An Arcade Physics Configuration object.
                 */
                constructor(scene: Phaser.Scene, config: Phaser.Types.Physics.Arcade.ArcadeWorldConfig);

                /**
                 * The Scene this simulation belongs to.
                 */
                scene: Phaser.Scene;

                /**
                 * Dynamic Bodies in this simulation.
                 */
                bodies: Set<Phaser.Physics.Arcade.Body>;

                /**
                 * Static Bodies in this simulation.
                 */
                staticBodies: Set<Phaser.Physics.Arcade.StaticBody>;

                /**
                 * Static Bodies marked for deletion.
                 */
                pendingDestroy: Set<(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)>;

                /**
                 * This simulation's collision processors.
                 */
                colliders: Phaser.Structs.ProcessQueue<Phaser.Physics.Arcade.Collider>;

                /**
                 * Acceleration of Bodies due to gravity, in pixels per second.
                 */
                gravity: Phaser.Math.Vector2;

                /**
                 * A boundary constraining Bodies.
                 */
                bounds: Phaser.Geom.Rectangle;

                /**
                 * The boundary edges that Bodies can collide with.
                 */
                checkCollision: Phaser.Types.Physics.Arcade.CheckCollisionObject;

                /**
                 * The number of physics steps to be taken per second.
                 * 
                 * This property is read-only. Use the `setFPS` method to modify it at run-time.
                 */
                readonly fps: number;

                /**
                 * Should Physics use a fixed update time-step (true) or sync to the render fps (false)?.
                 * False value of this property disables fps and timeScale properties.
                 */
                fixedStep: boolean;

                /**
                 * The number of steps that took place in the last frame.
                 */
                readonly stepsLastFrame: number;

                /**
                 * Scaling factor applied to the frame rate.
                 * 
                 * - 1.0 = normal speed
                 * - 2.0 = half speed
                 * - 0.5 = double speed
                 */
                timeScale: number;

                /**
                 * The maximum absolute difference of a Body's per-step velocity and its overlap with another Body that will result in separation on *each axis*.
                 * Larger values favor separation.
                 * Smaller values favor no separation.
                 */
                OVERLAP_BIAS: number;

                /**
                 * The maximum absolute value of a Body's overlap with a tile that will result in separation on *each axis*.
                 * Larger values favor separation.
                 * Smaller values favor no separation.
                 * The optimum value may be similar to the tile size.
                 */
                TILE_BIAS: number;

                /**
                 * Always separate overlapping Bodies horizontally before vertically.
                 * False (the default) means Bodies are first separated on the axis of greater gravity, or the vertical axis if neither is greater.
                 */
                forceX: boolean;

                /**
                 * Whether the simulation advances with the game loop.
                 */
                isPaused: boolean;

                /**
                 * Enables the debug display.
                 */
                drawDebug: boolean;

                /**
                 * The graphics object drawing the debug display.
                 */
                debugGraphic: Phaser.GameObjects.Graphics;

                /**
                 * Default debug display settings for new Bodies.
                 */
                defaults: Phaser.Types.Physics.Arcade.ArcadeWorldDefaults;

                /**
                 * The maximum number of items per node on the RTree.
                 * 
                 * This is ignored if `useTree` is `false`. If you have a large number of bodies in
                 * your world then you may find search performance improves by increasing this value,
                 * to allow more items per node and less node division.
                 */
                maxEntries: number;

                /**
                 * Should this Arcade Physics World use an RTree for Dynamic bodies?
                 * 
                 * An RTree is a fast way of spatially sorting of all the bodies in the world.
                 * However, at certain limits, the cost of clearing and inserting the bodies into the
                 * tree every frame becomes more expensive than the search speed gains it provides.
                 * 
                 * If you have a large number of dynamic bodies in your world then it may be best to
                 * disable the use of the RTree by setting this property to `false` in the physics config.
                 * 
                 * The number it can cope with depends on browser and device, but a conservative estimate
                 * of around 5,000 bodies should be considered the max before disabling it.
                 * 
                 * This only applies to dynamic bodies. Static bodies are always kept in an RTree,
                 * because they don't have to be cleared every frame, so you benefit from the
                 * massive search speeds all the time.
                 */
                useTree: boolean;

                /**
                 * The spatial index of Dynamic Bodies.
                 */
                tree: Phaser.Structs.RTree;

                /**
                 * The spatial index of Static Bodies.
                 */
                staticTree: Phaser.Structs.RTree;

                /**
                 * Recycled input for tree searches.
                 */
                treeMinMax: Phaser.Types.Physics.Arcade.ArcadeWorldTreeMinMax;

                /**
                 * The Filtering Options passed to `GetTilesWithinWorldXY` as part of the `collideSpriteVsTilemapLayer` check.
                 */
                tileFilterOptions: Phaser.Types.Tilemaps.FilteringOptions;

                /**
                 * Adds an Arcade Physics Body to a Game Object, an array of Game Objects, or the children of a Group.
                 * 
                 * The difference between this and the `enableBody` method is that you can pass arrays or Groups
                 * to this method.
                 * 
                 * You can specify if the bodies are to be Dynamic or Static. A dynamic body can move via velocity and
                 * acceleration. A static body remains fixed in place and as such is able to use an optimized search
                 * tree, making it ideal for static elements such as level objects. You can still collide and overlap
                 * with static bodies.
                 * 
                 * Normally, rather than calling this method directly, you'd use the helper methods available in the
                 * Arcade Physics Factory, such as:
                 * 
                 * ```javascript
                 * this.physics.add.image(x, y, textureKey);
                 * this.physics.add.sprite(x, y, textureKey);
                 * ```
                 * 
                 * Calling factory methods encapsulates the creation of a Game Object and the creation of its
                 * body at the same time. If you are creating custom classes then you can pass them to this
                 * method to have their bodies created.
                 * @param object The object, or objects, on which to create the bodies.
                 * @param bodyType The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`.
                 */
                enable(object: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[] | Phaser.GameObjects.Group | Phaser.GameObjects.Group[], bodyType?: number): void;

                /**
                 * Creates an Arcade Physics Body on a single Game Object.
                 * 
                 * If the Game Object already has a body, this method will simply add it back into the simulation.
                 * 
                 * You can specify if the body is Dynamic or Static. A dynamic body can move via velocity and
                 * acceleration. A static body remains fixed in place and as such is able to use an optimized search
                 * tree, making it ideal for static elements such as level objects. You can still collide and overlap
                 * with static bodies.
                 * 
                 * Normally, rather than calling this method directly, you'd use the helper methods available in the
                 * Arcade Physics Factory, such as:
                 * 
                 * ```javascript
                 * this.physics.add.image(x, y, textureKey);
                 * this.physics.add.sprite(x, y, textureKey);
                 * ```
                 * 
                 * Calling factory methods encapsulates the creation of a Game Object and the creation of its
                 * body at the same time. If you are creating custom classes then you can pass them to this
                 * method to have their bodies created.
                 * @param object The Game Object on which to create the body.
                 * @param bodyType The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`.
                 * @returns The Game Object on which the body was created.
                 */
                enableBody(object: Phaser.GameObjects.GameObject, bodyType?: number): Phaser.GameObjects.GameObject;

                /**
                 * Adds an existing Arcade Physics Body or StaticBody to the simulation.
                 * 
                 * The body is enabled and added to the local search trees.
                 * @param body The Body to be added to the simulation.
                 * @returns The Body that was added to the simulation.
                 */
                add(body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody): Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody;

                /**
                 * Disables the Arcade Physics Body of a Game Object, an array of Game Objects, or the children of a Group.
                 * 
                 * The difference between this and the `disableBody` method is that you can pass arrays or Groups
                 * to this method.
                 * 
                 * The body itself is not deleted, it just has its `enable` property set to false, which
                 * means you can re-enable it again at any point by passing it to `World.enable` or `World.add`.
                 * @param object The object, or objects, on which to disable the bodies.
                 */
                disable(object: Phaser.GameObjects.GameObject | Phaser.GameObjects.GameObject[] | Phaser.GameObjects.Group | Phaser.GameObjects.Group[]): void;

                /**
                 * Disables an existing Arcade Physics Body or StaticBody and removes it from the simulation.
                 * 
                 * The body is disabled and removed from the local search trees.
                 * 
                 * The body itself is not deleted, it just has its `enable` property set to false, which
                 * means you can re-enable it again at any point by passing it to `World.enable` or `World.add`.
                 * @param body The Body to be disabled.
                 */
                disableBody(body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody): void;

                /**
                 * Removes an existing Arcade Physics Body or StaticBody from the simulation.
                 * 
                 * The body is disabled and removed from the local search trees.
                 * 
                 * The body itself is not deleted, it just has its `enabled` property set to false, which
                 * means you can re-enable it again at any point by passing it to `World.enable` or `World.add`.
                 * @param body The body to be removed from the simulation.
                 */
                remove(body: Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody): void;

                /**
                 * Creates a Graphics Game Object that the world will use to render the debug display to.
                 * 
                 * This is called automatically when the World is instantiated if the `debug` config property
                 * was set to `true`. However, you can call it at any point should you need to display the
                 * debug Graphic from a fixed point.
                 * 
                 * You can control which objects are drawn to the Graphics object, and the colors they use,
                 * by setting the debug properties in the physics config.
                 * 
                 * You should not typically use this in a production game. Use it to aid during debugging.undefined
                 * @returns The Graphics object that was created for use by the World.
                 */
                createDebugGraphic(): Phaser.GameObjects.Graphics;

                /**
                 * Sets the position, size and properties of the World boundary.
                 * 
                 * The World boundary is an invisible rectangle that defines the edges of the World.
                 * If a Body is set to collide with the world bounds then it will automatically stop
                 * when it reaches any of the edges. You can optionally set which edges of the boundary
                 * should be checked against.
                 * @param x The top-left x coordinate of the boundary.
                 * @param y The top-left y coordinate of the boundary.
                 * @param width The width of the boundary.
                 * @param height The height of the boundary.
                 * @param checkLeft Should bodies check against the left edge of the boundary?
                 * @param checkRight Should bodies check against the right edge of the boundary?
                 * @param checkUp Should bodies check against the top edge of the boundary?
                 * @param checkDown Should bodies check against the bottom edge of the boundary?
                 * @returns This World object.
                 */
                setBounds(x: number, y: number, width: number, height: number, checkLeft?: boolean, checkRight?: boolean, checkUp?: boolean, checkDown?: boolean): Phaser.Physics.Arcade.World;

                /**
                 * Enables or disables collisions on each edge of the World boundary.
                 * @param left Should bodies check against the left edge of the boundary? Default true.
                 * @param right Should bodies check against the right edge of the boundary? Default true.
                 * @param up Should bodies check against the top edge of the boundary? Default true.
                 * @param down Should bodies check against the bottom edge of the boundary? Default true.
                 * @returns This World object.
                 */
                setBoundsCollision(left?: boolean, right?: boolean, up?: boolean, down?: boolean): Phaser.Physics.Arcade.World;

                /**
                 * Pauses the simulation.
                 * 
                 * A paused simulation does not update any existing bodies, or run any Colliders.
                 * 
                 * However, you can still enable and disable bodies within it, or manually run collide or overlap
                 * checks.undefined
                 * @returns This World object.
                 */
                pause(): Phaser.Physics.Arcade.World;

                /**
                 * Resumes the simulation, if paused.undefined
                 * @returns This World object.
                 */
                resume(): Phaser.Physics.Arcade.World;

                /**
                 * Creates a new Collider object and adds it to the simulation.
                 * 
                 * A Collider is a way to automatically perform collision checks between two objects,
                 * calling the collide and process callbacks if they occur.
                 * 
                 * Colliders are run as part of the World update, after all of the Bodies have updated.
                 * 
                 * By creating a Collider you don't need to then call `World.collide` in your `update` loop,
                 * as it will be handled for you automatically.
                 * @param object1 The first object to check for collision.
                 * @param object2 The second object to check for collision.
                 * @param collideCallback The callback to invoke when the two objects collide.
                 * @param processCallback The callback to invoke when the two objects collide. Must return a boolean.
                 * @param callbackContext The scope in which to call the callbacks.
                 * @returns The Collider that was created.
                 */
                addCollider(object1: Phaser.Types.Physics.Arcade.ArcadeColliderType, object2: Phaser.Types.Physics.Arcade.ArcadeColliderType, collideCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): Phaser.Physics.Arcade.Collider;

                /**
                 * Creates a new Overlap Collider object and adds it to the simulation.
                 * 
                 * A Collider is a way to automatically perform overlap checks between two objects,
                 * calling the collide and process callbacks if they occur.
                 * 
                 * Colliders are run as part of the World update, after all of the Bodies have updated.
                 * 
                 * By creating a Collider you don't need to then call `World.overlap` in your `update` loop,
                 * as it will be handled for you automatically.
                 * @param object1 The first object to check for overlap.
                 * @param object2 The second object to check for overlap.
                 * @param collideCallback The callback to invoke when the two objects overlap.
                 * @param processCallback The callback to invoke when the two objects overlap. Must return a boolean.
                 * @param callbackContext The scope in which to call the callbacks.
                 * @returns The Collider that was created.
                 */
                addOverlap(object1: Phaser.Types.Physics.Arcade.ArcadeColliderType, object2: Phaser.Types.Physics.Arcade.ArcadeColliderType, collideCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): Phaser.Physics.Arcade.Collider;

                /**
                 * Removes a Collider from the simulation so it is no longer processed.
                 * 
                 * This method does not destroy the Collider. If you wish to add it back at a later stage you can call
                 * `World.colliders.add(Collider)`.
                 * 
                 * If you no longer need the Collider you can call the `Collider.destroy` method instead, which will
                 * automatically clear all of its references and then remove it from the World. If you call destroy on
                 * a Collider you _don't_ need to pass it to this method too.
                 * @param collider The Collider to remove from the simulation.
                 * @returns This World object.
                 */
                removeCollider(collider: Phaser.Physics.Arcade.Collider): Phaser.Physics.Arcade.World;

                /**
                 * Sets the frame rate to run the simulation at.
                 * 
                 * The frame rate value is used to simulate a fixed update time step. This fixed
                 * time step allows for a straightforward implementation of a deterministic game state.
                 * 
                 * This frame rate is independent of the frequency at which the game is rendering. The
                 * higher you set the fps, the more physics simulation steps will occur per game step.
                 * Conversely, the lower you set it, the less will take place.
                 * 
                 * You can optionally advance the simulation directly yourself by calling the `step` method.
                 * @param framerate The frame rate to advance the simulation at.
                 * @returns This World object.
                 */
                setFPS(framerate: number): this;

                /**
                 * Advances the simulation based on the elapsed time and fps rate.
                 * 
                 * This is called automatically by your Scene and does not need to be invoked directly.
                 * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
                 * @param delta The delta time, in ms, elapsed since the last frame.
                 */
                update(time: number, delta: number): void;

                /**
                 * Advances the simulation by a time increment.
                 * @param delta The delta time amount, in seconds, by which to advance the simulation.
                 */
                step(delta: number): void;

                /**
                 * Advances the simulation by a single step.
                 */
                singleStep(): void;

                /**
                 * Updates bodies, draws the debug display, and handles pending queue operations.
                 */
                postUpdate(): void;

                /**
                 * Calculates a Body's velocity and updates its position.
                 * @param body The Body to be updated.
                 * @param delta The delta value to be used in the motion calculations, in seconds.
                 */
                updateMotion(body: Phaser.Physics.Arcade.Body, delta: number): void;

                /**
                 * Calculates a Body's angular velocity.
                 * @param body The Body to compute the velocity for.
                 * @param delta The delta value to be used in the calculation, in seconds.
                 */
                computeAngularVelocity(body: Phaser.Physics.Arcade.Body, delta: number): void;

                /**
                 * Calculates a Body's per-axis velocity.
                 * @param body The Body to compute the velocity for.
                 * @param delta The delta value to be used in the calculation, in seconds.
                 */
                computeVelocity(body: Phaser.Physics.Arcade.Body, delta: number): void;

                /**
                 * Separates two Bodies.
                 * @param body1 The first Body to be separated.
                 * @param body2 The second Body to be separated.
                 * @param processCallback The process callback.
                 * @param callbackContext The context in which to invoke the callback.
                 * @param overlapOnly If this is a collide or overlap check?
                 * @returns True if separation occurred, otherwise false.
                 */
                separate(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any, overlapOnly?: boolean): boolean;

                /**
                 * Separates two Bodies, when both are circular.
                 * @param body1 The first Body to be separated.
                 * @param body2 The second Body to be separated.
                 * @param overlapOnly If this is a collide or overlap check?
                 * @returns True if separation occurred, otherwise false.
                 */
                separateCircle(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly?: boolean): boolean;

                /**
                 * Checks to see if two Bodies intersect at all.
                 * @param body1 The first body to check.
                 * @param body2 The second body to check.
                 * @returns True if the two bodies intersect, otherwise false.
                 */
                intersects(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body): boolean;

                /**
                 * Tests if a circular Body intersects with another Body.
                 * @param circle The circular body to test.
                 * @param body The rectangular body to test.
                 * @returns True if the two bodies intersect, otherwise false.
                 */
                circleBodyIntersects(circle: Phaser.Physics.Arcade.Body, body: Phaser.Physics.Arcade.Body): boolean;

                /**
                 * Tests if Game Objects overlap.
                 * 
                 * See details in {@link Phaser.Physics.Arcade.World#collide}.
                 * @param object1 The first object or array of objects to check.
                 * @param object2 The second object or array of objects to check, or `undefined`.
                 * @param overlapCallback An optional callback function that is called if the objects overlap.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`.
                 * @param callbackContext The context in which to run the callbacks.
                 * @returns True if at least one Game Object overlaps another.
                 */
                overlap(object1: Phaser.Types.Physics.Arcade.ArcadeColliderType, object2?: Phaser.Types.Physics.Arcade.ArcadeColliderType, overlapCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): boolean;

                /**
                 * Performs a collision check and separation between the two physics enabled objects given, which can be single
                 * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.
                 * 
                 * If you don't require separation then use {@link Phaser.Physics.Arcade.World#overlap} instead.
                 * 
                 * If two Groups or arrays are passed, each member of one will be tested against each member of the other.
                 * 
                 * If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.
                 * 
                 * If **only** one Array is passed, the array is iterated and every element in it is tested against the others.
                 * 
                 * Two callbacks can be provided; they receive the colliding game objects as arguments.
                 * If an overlap is detected, the `processCallback` is called first. It can cancel the collision by returning false.
                 * Next the objects are separated and `collideCallback` is invoked.
                 * 
                 * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable
                 * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.
                 * The separation that stops two objects penetrating may create a new penetration against a different object. If you
                 * require a high level of stability please consider using an alternative physics system, such as Matter.js.
                 * @param object1 The first object or array of objects to check.
                 * @param object2 The second object or array of objects to check, or `undefined`.
                 * @param collideCallback An optional callback function that is called if the objects collide.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.
                 * @param callbackContext The context in which to run the callbacks.
                 * @returns `true` if any overlapping Game Objects were separated, otherwise `false`.
                 */
                collide(object1: Phaser.Types.Physics.Arcade.ArcadeColliderType, object2?: Phaser.Types.Physics.Arcade.ArcadeColliderType, collideCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): boolean;

                /**
                 * Checks if the two given Arcade Physics bodies will collide, or not,
                 * based on their collision mask and collision categories.
                 * @param body1 The first body to check.
                 * @param body2 The second body to check.
                 * @returns True if the two bodies will collide, otherwise false.
                 */
                canCollide(body1: Phaser.Types.Physics.Arcade.ArcadeColliderType, body2: Phaser.Types.Physics.Arcade.ArcadeColliderType): boolean;

                /**
                 * This advanced method is specifically for testing for collision between a single Sprite and an array of Tile objects.
                 * 
                 * You should generally use the `collide` method instead, with a Sprite vs. a Tilemap Layer, as that will perform
                 * tile filtering and culling for you, as well as handle the interesting face collision automatically.
                 * 
                 * This method is offered for those who would like to check for collision with specific Tiles in a layer, without
                 * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic collisions
                 * on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,
                 * you should filter them before passing them to this method.
                 * 
                 * Important: Use of this method skips the `interesting faces` system that Tilemap Layers use. This means if you have
                 * say a row or column of tiles, and you jump into, or walk over them, it's possible to get stuck on the edges of the
                 * tiles as the interesting face calculations are skipped. However, for quick-fire small collision set tests on
                 * dynamic maps, this method can prove very useful.
                 * 
                 * This method does not factor in the Collision Mask or Category.
                 * @param sprite The first object to check for collision.
                 * @param tiles An array of Tiles to check for collision against.
                 * @param collideCallback An optional callback function that is called if the objects collide.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.
                 * @param callbackContext The context in which to run the callbacks.
                 * @returns True if any overlapping objects were separated, otherwise false.
                 */
                collideTiles(sprite: Phaser.GameObjects.GameObject, tiles: Phaser.Tilemaps.Tile[], collideCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): boolean;

                /**
                 * This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.
                 * 
                 * You should generally use the `overlap` method instead, with a Sprite vs. a Tilemap Layer, as that will perform
                 * tile filtering and culling for you, as well as handle the interesting face collision automatically.
                 * 
                 * This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without
                 * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap
                 * tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,
                 * you should filter them before passing them to this method.
                 * 
                 * This method does not factor in the Collision Mask or Category.
                 * @param sprite The first object to check for collision.
                 * @param tiles An array of Tiles to check for collision against.
                 * @param overlapCallback An optional callback function that is called if the objects overlap.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `overlapCallback` will only be called if this callback returns `true`.
                 * @param callbackContext The context in which to run the callbacks.
                 * @returns True if any objects overlap, otherwise false.
                 */
                overlapTiles(sprite: Phaser.GameObjects.GameObject, tiles: Phaser.Tilemaps.Tile[], overlapCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): boolean;

                /**
                 * Internal handler for Sprite vs. Tilemap collisions.
                 * Please use Phaser.Physics.Arcade.World#collide instead.
                 * @param sprite The first object to check for collision.
                 * @param tilemapLayer The second object to check for collision.
                 * @param collideCallback An optional callback function that is called if the objects collide.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.
                 * @param callbackContext The context in which to run the callbacks.
                 * @param overlapOnly Whether this is a collision or overlap check.
                 * @returns True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.
                 */
                collideSpriteVsTilemapLayer(sprite: Phaser.GameObjects.GameObject, tilemapLayer: Phaser.Tilemaps.TilemapLayer, collideCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any, overlapOnly?: boolean): boolean;

                /**
                 * Wrap an object's coordinates (or several objects' coordinates) within {@link Phaser.Physics.Arcade.World#bounds}.
                 * 
                 * If the object is outside any boundary edge (left, top, right, bottom), it will be moved to the same offset from the opposite edge (the interior).
                 * @param object A Game Object, a Group, an object with `x` and `y` coordinates, or an array of such objects.
                 * @param padding An amount added to each boundary edge during the operation. Default 0.
                 */
                wrap(object: any, padding?: number): void;

                /**
                 * Wrap each object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}.
                 * @param objects An array of objects to be wrapped.
                 * @param padding An amount added to the boundary. Default 0.
                 */
                wrapArray(objects: any[], padding?: number): void;

                /**
                 * Wrap an object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}.
                 * @param object A Game Object, a Physics Body, or any object with `x` and `y` coordinates
                 * @param padding An amount added to the boundary. Default 0.
                 */
                wrapObject(object: any, padding?: number): void;

                /**
                 * Shuts down the simulation, clearing physics data and removing listeners.
                 */
                shutdown(): void;

                /**
                 * Shuts down the simulation and disconnects it from the current scene.
                 */
                destroy(): void;

            }

            namespace Components {
                /**
                 * Provides methods used for setting the acceleration properties of an Arcade Physics Body.
                 */
                interface Acceleration {
                    /**
                     * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration.
                     * @param x The horizontal acceleration, in pixels per second squared.
                     * @param y The vertical acceleration, in pixels per second squared. Default x.
                     * @returns This Game Object.
                     */
                    setAcceleration(x: number, y?: number): this;
                    /**
                     * Sets the body's horizontal acceleration.
                     * @param value The horizontal acceleration, in pixels per second squared.
                     * @returns This Game Object.
                     */
                    setAccelerationX(value: number): this;
                    /**
                     * Sets the body's vertical acceleration.
                     * @param value The vertical acceleration, in pixels per second squared.
                     * @returns This Game Object.
                     */
                    setAccelerationY(value: number): this;
                }

                /**
                 * Provides methods used for setting the angular velocity, acceleration, and drag properties of an Arcade Physics Body.
                 */
                interface Angular {
                    /**
                     * Sets the angular velocity of the body.
                     * 
                     * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.
                     * However, they can have angular motion, which is passed on to the Game Object bound to the body,
                     * causing them to visually rotate, even though the body remains axis-aligned.
                     * @param value The amount of angular velocity, in degrees per second.
                     * @returns This Game Object.
                     */
                    setAngularVelocity(value: number): this;
                    /**
                     * Sets the angular acceleration of the body.
                     * 
                     * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.
                     * However, they can have angular motion, which is passed on to the Game Object bound to the body,
                     * causing them to visually rotate, even though the body remains axis-aligned.
                     * @param value The amount of angular acceleration, in degrees per second squared.
                     * @returns This Game Object.
                     */
                    setAngularAcceleration(value: number): this;
                    /**
                     * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration.
                     * @param value The amount of drag, in degrees per second squared.
                     * @returns This Game Object.
                     */
                    setAngularDrag(value: number): this;
                }

                /**
                 * Provides methods used for setting the bounce properties of an Arcade Physics Body.
                 */
                interface Bounce {
                    /**
                     * Sets the bounce values of this body.
                     * 
                     * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object.
                     * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all.
                     * @param x The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.
                     * @param y The amount of vertical bounce to apply on collision. A float, typically between 0 and 1. Default x.
                     * @returns This Game Object.
                     */
                    setBounce(x: number, y?: number): this;
                    /**
                     * Sets the horizontal bounce value for this body. This is the amount of restitution applied
                     * on the x-axis when the body collides with another object. A value of 1 retains full horizontal
                     * velocity after the rebound. A value of 0 means no horizontal bounce at all.
                     * @param value The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.
                     * @returns This Game Object.
                     */
                    setBounceX(value: number): this;
                    /**
                     * Sets the vertical bounce value for this body. This is the amount of restitution applied
                     * on the y-axis when the body collides with another object. A value of 1 retains full vertical
                     * velocity after the rebound. A value of 0 means no vertical bounce at all.
                     * @param value The amount of vertical bounce to apply on collision. A float, typically between 0 and 1.
                     * @returns This Game Object.
                     */
                    setBounceY(value: number): this;
                    /**
                     * Sets whether this Body collides with the world boundary.
                     * 
                     * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first.
                     * @param value `true` if this body should collide with the world bounds, otherwise `false`. Default true.
                     * @param bounceX If given, this will replace the `worldBounce.x` value.
                     * @param bounceY If given, this will replace the `worldBounce.y` value.
                     * @param onWorldBounds If given this replaces the Body's `onWorldBounds` value.
                     * @returns This Game Object.
                     */
                    setCollideWorldBounds(value?: boolean, bounceX?: number, bounceY?: number, onWorldBounds?: boolean): this;
                }

                /**
                 * Provides methods used for setting the collision category and mask of an Arcade Physics Body.
                 * 
                 * Collision categories and masks allow you to control which bodies interact with each other.
                 * Each body has a collision category (its "identity") and a collision mask (the set of categories
                 * it will collide with). Two bodies will only collide if each body's category is present in the
                 * other body's mask. By default, all bodies belong to category 1 and collide with all categories.
                 */
                interface Collision {
                    /**
                     * Sets the Collision Category that this Arcade Physics Body
                     * will use in order to determine what it can collide with.
                     * 
                     * It can only have one single category assigned to it.
                     * 
                     * If you wish to reset the collision category and mask, call
                     * the `resetCollisionCategory` method.
                     * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
                     * @returns This Game Object.
                     */
                    setCollisionCategory(category: number): this;
                    /**
                     * Checks to see if the given Collision Category will collide with
                     * this Arcade Physics object or not.
                     * @param category Collision category value to test.
                     * @returns `true` if the given category will collide with this object, otherwise `false`.
                     */
                    willCollideWith(category: number): boolean;
                    /**
                     * Adds the given Collision Category to the list of those that this
                     * Arcade Physics Body will collide with.
                     * @param category The collision category to add to this body's collision mask.
                     * @returns This Game Object.
                     */
                    addCollidesWith(category: number): this;
                    /**
                     * Removes the given Collision Category from the list of those that this
                     * Arcade Physics Body will collide with.
                     * @param category The collision category to remove from this body's collision mask.
                     * @returns This Game Object.
                     */
                    removeCollidesWith(category: number): this;
                    /**
                     * Sets all of the Collision Categories that this Arcade Physics Body
                     * will collide with. You can either pass a single category value, or
                     * an array of them.
                     * 
                     * Calling this method will reset all of the collision categories,
                     * so only those passed to this method are enabled.
                     * 
                     * If you wish to add a new category to the existing mask, call
                     * the `addCollidesWith` method.
                     * 
                     * If you wish to reset the collision category and mask, call
                     * the `resetCollisionCategory` method.
                     * @param categories The collision category to collide with, or an array of them.
                     * @returns This Game Object.
                     */
                    setCollidesWith(categories: number | number[]): this;
                    /**
                     * Resets the Collision Category and Mask back to the defaults,
                     * which means the body will belong to category 1 and will collide with all other categories.undefined
                     * @returns This Game Object.
                     */
                    resetCollisionCategory(): this;
                }

                /**
                 * The Debug component is a mixin that provides methods and properties for controlling the
                 * debug visualization of an Arcade Physics Body. When Arcade Physics debug mode is enabled
                 * globally, individual bodies can render their collision outlines and velocity vectors to the
                 * display, making it easier to visualize physics shapes and movement during development.
                 * This component lets you toggle those visuals per body and customize the outline color.
                 * Debug rendering carries a performance overhead and should never be enabled in production builds.
                 */
                interface Debug {
                    /**
                     * Sets the debug values of this body.
                     * 
                     * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole.
                     * Note that there is a performance cost in drawing debug displays. It should never be used in production.
                     * @param showBody Set to `true` to have this body render its outline to the debug display.
                     * @param showVelocity Set to `true` to have this body render a velocity marker to the debug display.
                     * @param bodyColor The color of the body outline when rendered to the debug display.
                     * @returns This Game Object.
                     */
                    setDebug(showBody: boolean, showVelocity: boolean, bodyColor: number): this;
                    /**
                     * Sets the color of the body outline when it renders to the debug display.
                     * @param value The color of the body outline when rendered to the debug display.
                     * @returns This Game Object.
                     */
                    setDebugBodyColor(value: number): this;
                    /**
                     * Set to `true` to have this body render its outline to the debug display.
                     */
                    debugShowBody: boolean;
                    /**
                     * Set to `true` to have this body render a velocity marker to the debug display.
                     */
                    debugShowVelocity: boolean;
                    /**
                     * The color of the body outline when it renders to the debug display.
                     */
                    debugBodyColor: number;
                }

                /**
                 * Provides methods used for setting the drag properties of an Arcade Physics Body.
                 */
                interface Drag {
                    /**
                     * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag.
                     * 
                     * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
                     * It is the absolute loss of velocity due to movement, in pixels per second squared.
                     * The x and y components are applied separately.
                     * 
                     * When `useDamping` is true, this is 1 minus the damping factor.
                     * A value of 1 means the Body loses no velocity.
                     * A value of 0.95 means the Body loses 5% of its velocity per step.
                     * A value of 0.5 means the Body loses 50% of its velocity per step.
                     * 
                     * Drag is applied only when `acceleration` is zero.
                     * @param x The amount of horizontal drag to apply.
                     * @param y The amount of vertical drag to apply. Default x.
                     * @returns This Game Object.
                     */
                    setDrag(x: number, y?: number): this;
                    /**
                     * Sets the body's horizontal drag.
                     * 
                     * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
                     * It is the absolute loss of velocity due to movement, in pixels per second squared.
                     * The x and y components are applied separately.
                     * 
                     * When `useDamping` is true, this is 1 minus the damping factor.
                     * A value of 1 means the Body loses no velocity.
                     * A value of 0.95 means the Body loses 5% of its velocity per step.
                     * A value of 0.5 means the Body loses 50% of its velocity per step.
                     * 
                     * Drag is applied only when `acceleration` is zero.
                     * @param value The amount of horizontal drag to apply.
                     * @returns This Game Object.
                     */
                    setDragX(value: number): this;
                    /**
                     * Sets the body's vertical drag.
                     * 
                     * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
                     * It is the absolute loss of velocity due to movement, in pixels per second squared.
                     * The x and y components are applied separately.
                     * 
                     * When `useDamping` is true, this is 1 minus the damping factor.
                     * A value of 1 means the Body loses no velocity.
                     * A value of 0.95 means the Body loses 5% of its velocity per step.
                     * A value of 0.5 means the Body loses 50% of its velocity per step.
                     * 
                     * Drag is applied only when `acceleration` is zero.
                     * @param value The amount of vertical drag to apply.
                     * @returns This Game Object.
                     */
                    setDragY(value: number): this;
                    /**
                     * If this Body is using `drag` for deceleration this function controls how the drag is applied.
                     * If set to `true` drag will use a damping effect rather than a linear approach. If you are
                     * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in
                     * the game Asteroids) then you will get a far smoother and more visually correct deceleration
                     * by using damping, avoiding the axis-drift that is prone with linear deceleration.
                     * 
                     * If you enable this property then you should use far smaller `drag` values than with linear, as
                     * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow
                     * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.
                     * @param value `true` to use damping for deceleration, or `false` to use linear deceleration.
                     * @returns This Game Object.
                     */
                    setDamping(value: boolean): this;
                }

                /**
                 * Provides methods for enabling, disabling, and refreshing the Arcade Physics Body
                 * belonging to a Game Object. This component is mixed into Game Objects that use
                 * Arcade Physics, giving them the ability to control whether their physics body is
                 * active in the simulation and participates in collision and overlap detection.
                 */
                interface Enable {
                    /**
                     * Sets whether this Body should calculate its velocity based on its change in
                     * position every frame. The default, which is to not do this, means that you
                     * make this Body move by setting the velocity directly. However, if you are
                     * trying to move this Body via a Tween, or have it follow a Path, then you
                     * should enable this instead. This will allow it to still collide with other
                     * bodies, something that isn't possible if you're just changing its position directly.
                     * @param value `true` if the Body calculates velocity based on changes in position, otherwise `false`. Default true.
                     * @returns This Game Object.
                     */
                    setDirectControl(value?: boolean): this;
                    /**
                     * Enables this Game Object's Arcade Physics Body, allowing it to participate in
                     * collision and overlap detection within the physics simulation. Optionally resets
                     * the Body and repositions the Game Object at the given coordinates. If you reset
                     * the Body you must also pass `x` and `y`. You can also optionally set the Game
                     * Object's `active` and `visible` properties at the same time.
                     * @param reset Also reset the Body and place the Game Object at (x, y).
                     * @param x The horizontal position to place the Game Object, if `reset` is true.
                     * @param y The vertical position to place the Game Object, if `reset` is true.
                     * @param enableGameObject Also set this Game Object's `active` to true.
                     * @param showGameObject Also set this Game Object's `visible` to true.
                     * @returns This Game Object.
                     */
                    enableBody(reset?: boolean, x?: number, y?: number, enableGameObject?: boolean, showGameObject?: boolean): this;
                    /**
                     * Stops and disables this Game Object's Arcade Physics Body. The body's velocity is
                     * set to zero and it is removed from collision and overlap detection within the physics
                     * simulation. Optionally sets the Game Object's `active` and `visible` properties to
                     * false at the same time, which is useful when deactivating pooled Game Objects.
                     * @param disableGameObject Also set this Game Object's `active` to false. Default false.
                     * @param hideGameObject Also set this Game Object's `visible` to false. Default false.
                     * @returns This Game Object.
                     */
                    disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this;
                    /**
                     * Syncs the Body's position and size with its parent Game Object.
                     * You don't need to call this for Dynamic Bodies, as it happens automatically.
                     * But for Static bodies it's a useful way of modifying the position of a Static Body
                     * in the Physics World, based on its Game Object.undefined
                     * @returns This Game Object.
                     */
                    refreshBody(): this;
                }

                /**
                 * Methods for setting the friction of an Arcade Physics Body.
                 * 
                 * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body.
                 */
                interface Friction {
                    /**
                     * Sets the friction of this game object's physics body.
                     * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body.
                     * @param x The amount of horizontal friction to apply, [0, 1].
                     * @param y The amount of vertical friction to apply, [0, 1]. Default x.
                     * @returns This Game Object.
                     */
                    setFriction(x: number, y?: number): this;
                    /**
                     * Sets the horizontal friction of this game object's physics body.
                     * This can move a riding body horizontally when it collides with this one on the vertical axis.
                     * @param x The amount of friction to apply, [0, 1].
                     * @returns This Game Object.
                     */
                    setFrictionX(x: number): this;
                    /**
                     * Sets the vertical friction of this game object's physics body.
                     * This can move a riding body vertically when it collides with this one on the horizontal axis.
                     * @param y The amount of friction to apply, [0, 1].
                     * @returns This Game Object.
                     */
                    setFrictionY(y: number): this;
                }

                /**
                 * Provides methods for setting the gravity properties of an Arcade Physics Game Object.
                 * Should be applied as a mixin and not used directly.
                 * 
                 * Body gravity is a per-body acceleration applied in addition to the world gravity defined
                 * in the Arcade Physics configuration. Use this component to give individual Game Objects
                 * a different gravitational pull from the rest of the world, for example to make a Game
                 * Object float upward against a downward world gravity, or to apply stronger gravity to
                 * a specific Game Object without affecting others. Values are specified in pixels per
                 * second squared.
                 */
                interface Gravity {
                    /**
                     * Sets the body gravity for both the X and Y axes. This is an acceleration applied to
                     * this body in addition to the world gravity, in pixels per second squared. Values can
                     * be positive or negative. Larger absolute values result in a stronger effect.
                     * 
                     * If only one value is provided, it will be used for both the X and Y axes.
                     * @param x The gravitational acceleration to be applied to the X-axis, in pixels per second squared.
                     * @param y The gravitational acceleration to be applied to the Y-axis, in pixels per second squared. If not specified, the X value will be used. Default x.
                     * @returns This Game Object.
                     */
                    setGravity(x: number, y?: number): this;
                    /**
                     * Sets the body gravity applied to the X-axis. This is an acceleration in addition to
                     * the world gravity, in pixels per second squared. Use a positive value to pull the body
                     * to the right and a negative value to pull it to the left.
                     * @param x The gravitational acceleration to be applied to the X-axis, in pixels per second squared.
                     * @returns This Game Object.
                     */
                    setGravityX(x: number): this;
                    /**
                     * Sets the body gravity applied to the Y-axis. This is an acceleration in addition to
                     * the world gravity, in pixels per second squared. Use a positive value to pull the body
                     * downward and a negative value to push it upward (against gravity).
                     * @param y The gravitational acceleration to be applied to the Y-axis, in pixels per second squared.
                     * @returns This Game Object.
                     */
                    setGravityY(y: number): this;
                }

                /**
                 * Provides methods for controlling whether an Arcade Physics Body is immovable during collisions.
                 * An immovable body will not be moved or separated when it collides with other bodies, making it
                 * ideal for static obstacles, walls, platforms, or any object that should never be displaced by
                 * physics interactions. This component is mixed into Game Objects that use Arcade Physics.
                 */
                interface Immovable {
                    /**
                     * Sets if this Body can be separated during collisions with other bodies.
                     * 
                     * When a body is immovable it means it won't move at all, not even to separate it from collision
                     * overlap. If you just wish to prevent a body from being knocked around by other bodies, see
                     * the `setPushable` method instead.
                     * @param value Whether this body should be immovable (`true`) or movable (`false`) during collisions. Default true.
                     * @returns This Game Object.
                     */
                    setImmovable(value?: boolean): this;
                }

                /**
                 * Provides methods for setting the mass of an Arcade Physics Body. This component
                 * is mixed into Game Objects that use Arcade Physics. Mass influences how bodies
                 * respond to collisions: a heavier body will exert more force on a lighter one,
                 * affecting the resulting velocity changes during impact resolution.
                 */
                interface Mass {
                    /**
                     * Sets the mass of the physics body. Mass affects collision response -- heavier
                     * bodies push lighter ones more during collisions.
                     * @param value The new mass of the body. Must be a positive number.
                     * @returns This Game Object.
                     */
                    setMass(value: number): this;
                }

                /**
                 * This method will search the given circular area and return an array of all physics bodies that
                 * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.
                 * 
                 * A body only has to intersect with the search area to be considered, it doesn't have to be fully
                 * contained within it.
                 * 
                 * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast,
                 * otherwise the search is O(N) for Dynamic Bodies.
                 */
                interface OverlapCirc {
                }

                /**
                 * This method will search the given rectangular area and return an array of all physics bodies that
                 * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.
                 * 
                 * A body only has to intersect with the search area to be considered, it doesn't have to be fully
                 * contained within it.
                 * 
                 * If Arcade Physics is set to use the RTree (which it is by default) then the search is extremely fast,
                 * otherwise the search is O(N) for Dynamic Bodies.
                 */
                interface OverlapRect {
                }

                /**
                 * The Pushable component provides methods for controlling whether an Arcade Physics body can be
                 * displaced by other bodies during collision resolution. A pushable body will have velocity applied
                 * to it as a result of colliding with other bodies. A non-pushable body will instead reflect its
                 * received velocity back to the colliding body, effectively acting as an immovable surface for
                 * purposes of velocity transfer while still participating in positional separation. This component
                 * is mixed into Game Objects that use Arcade Physics.
                 */
                interface Pushable {
                    /**
                     * Sets if this Body can be pushed by another Body.
                     * 
                     * A body that cannot be pushed will reflect back all of the velocity it is given to the
                     * colliding body. If that body is also not pushable, then the separation will be split
                     * between them evenly.
                     * 
                     * If you want your body to never move or separate at all, see the `setImmovable` method.
                     * @param value Whether this body can be pushed by collisions with another Body. Default true.
                     * @returns This Game Object.
                     */
                    setPushable(value?: boolean): this;
                }

                /**
                 * Provides methods used for controlling the size and offset of the Arcade Physics body belonging
                 * to a Game Object. The physics body dimensions are independent of the Game Object's visual
                 * dimensions, allowing the collision area to be smaller, larger, or offset from the sprite.
                 * This component is mixed into Arcade Physics-enabled Game Objects and should not be used directly.
                 */
                interface Size {
                    /**
                     * Sets the body offset. This allows you to adjust the difference between the center of the body
                     * and the x and y coordinates of the parent Game Object.
                     * @param x The amount to offset the body from the parent Game Object along the x-axis, in pixels.
                     * @param y The amount to offset the body from the parent Game Object along the y-axis, in pixels. Defaults to the value given for the x-axis. Default x.
                     * @returns This Game Object.
                     */
                    setOffset(x: number, y?: number): this;
                    /**
                     * **DEPRECATED**: Please use `setBodySize` instead.
                     * 
                     * Sets the size of this physics body. Setting the size does not adjust the dimensions of the parent Game Object.
                     * @param width The new width of the physics body, in pixels.
                     * @param height The new height of the physics body, in pixels.
                     * @param center Should the body be re-positioned so its center aligns with the parent Game Object? Default true.
                     * @returns This Game Object.
                     */
                    setSize(width: number, height: number, center?: boolean): this;
                    /**
                     * Sets the size of this physics body. Setting the size does not adjust the dimensions of the parent Game Object.
                     * @param width The new width of the physics body, in pixels.
                     * @param height The new height of the physics body, in pixels.
                     * @param center Should the body be re-positioned so its center aligns with the parent Game Object? Default true.
                     * @returns This Game Object.
                     */
                    setBodySize(width: number, height: number, center?: boolean): this;
                    /**
                     * Sets this physics body to use a circle for collision instead of a rectangle.
                     * @param radius The radius of the physics body, in pixels.
                     * @param offsetX The amount to offset the body from the parent Game Object along the x-axis.
                     * @param offsetY The amount to offset the body from the parent Game Object along the y-axis.
                     * @returns This Game Object.
                     */
                    setCircle(radius: number, offsetX?: number, offsetY?: number): this;
                }

                /**
                 * Provides methods for modifying the velocity of an Arcade Physics body.
                 * 
                 * Should be applied as a mixin and not used directly.
                 */
                interface Velocity {
                    /**
                     * Sets the velocity of the Body.
                     * @param x The horizontal velocity of the body, in pixels per second. Positive values move the body to the right, while negative values move it to the left.
                     * @param y The vertical velocity of the body, in pixels per second. Positive values move the body down, while negative values move it up. Default x.
                     * @returns This Game Object.
                     */
                    setVelocity(x: number, y?: number): this;
                    /**
                     * Sets the horizontal component of the body's velocity.
                     * 
                     * Positive values move the body to the right, while negative values move it to the left.
                     * @param x The new horizontal velocity, in pixels per second.
                     * @returns This Game Object.
                     */
                    setVelocityX(x: number): this;
                    /**
                     * Sets the vertical component of the body's velocity.
                     * 
                     * Positive values move the body down, while negative values move it up.
                     * @param y The new vertical velocity, in pixels per second.
                     * @returns This Game Object.
                     */
                    setVelocityY(y: number): this;
                    /**
                     * Sets the maximum velocity of the body.
                     * @param x The new maximum horizontal velocity, in pixels per second.
                     * @param y The new maximum vertical velocity, in pixels per second. Default x.
                     * @returns This Game Object.
                     */
                    setMaxVelocity(x: number, y?: number): this;
                }

            }

            /**
             * Dynamic Body.
             */
            var DYNAMIC_BODY: number;

            /**
             * Static Body.
             */
            var STATIC_BODY: number;

            /**
             * Arcade Physics Group containing Dynamic Bodies.
             */
            var GROUP: number;

            /**
             * A Tilemap Layer.
             */
            var TILEMAPLAYER: number;

            /**
             * Facing no direction (initial value).
             */
            var FACING_NONE: number;

            /**
             * Facing up.
             */
            var FACING_UP: number;

            /**
             * Facing down.
             */
            var FACING_DOWN: number;

            /**
             * Facing left.
             */
            var FACING_LEFT: number;

            /**
             * Facing right.
             */
            var FACING_RIGHT: number;

            namespace Events {
                /**
                 * The Arcade Physics World Collide Event.
                 * 
                 * This event is dispatched by an Arcade Physics World instance if two bodies collide _and_ at least
                 * one of them has their [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`.
                 * 
                 * It provides an alternative means to handling collide events rather than using the callback approach.
                 * 
                 * Listen to it from a Scene using: `this.physics.world.on('collide', listener)`.
                 * 
                 * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.
                 */
                const COLLIDE: string;

                /**
                 * The Arcade Physics World Overlap Event.
                 * 
                 * This event is dispatched by an Arcade Physics World instance if two bodies overlap _and_ at least
                 * one of them has their [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`.
                 * 
                 * It provides an alternative means to handling overlap events rather than using the callback approach.
                 * 
                 * Listen to it from a Scene using: `this.physics.world.on('overlap', listener)`.
                 * 
                 * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.
                 */
                const OVERLAP: string;

                /**
                 * The Arcade Physics World Pause Event.
                 * 
                 * This event is dispatched by an Arcade Physics World instance when it is paused.
                 * 
                 * Listen to it from a Scene using: `this.physics.world.on('pause', listener)`.
                 */
                const PAUSE: string;

                /**
                 * The Arcade Physics World Resume Event.
                 * 
                 * This event is dispatched by an Arcade Physics World instance when it resumes from a paused state.
                 * 
                 * Listen to it from a Scene using: `this.physics.world.on('resume', listener)`.
                 */
                const RESUME: string;

                /**
                 * The Arcade Physics Tile Collide Event.
                 * 
                 * This event is dispatched by an Arcade Physics World instance if a body collides with a Tile _and_
                 * has its [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`.
                 * 
                 * It provides an alternative means to handling collide events rather than using the callback approach.
                 * 
                 * Listen to it from a Scene using: `this.physics.world.on('tilecollide', listener)`.
                 * 
                 * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.
                 */
                const TILE_COLLIDE: string;

                /**
                 * The Arcade Physics Tile Overlap Event.
                 * 
                 * This event is dispatched by an Arcade Physics World instance if a body overlaps with a Tile _and_
                 * has its [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`.
                 * 
                 * It provides an alternative means to handling overlap events rather than using the callback approach.
                 * 
                 * Listen to it from a Scene using: `this.physics.world.on('tileoverlap', listener)`.
                 * 
                 * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.
                 */
                const TILE_OVERLAP: string;

                /**
                 * The Arcade Physics World Bounds Event.
                 * 
                 * This event is dispatched by an Arcade Physics World instance if a body makes contact with the world bounds _and_
                 * it has its [onWorldBounds]{@link Phaser.Physics.Arcade.Body#onWorldBounds} property set to `true`.
                 * 
                 * It provides an alternative means to handling collide events rather than using the callback approach.
                 * 
                 * Listen to it from a Scene using: `this.physics.world.on('worldbounds', listener)`.
                 */
                const WORLD_BOUNDS: string;

                /**
                 * The Arcade Physics World Step Event.
                 * 
                 * This event is dispatched by an Arcade Physics World instance whenever a physics step is run.
                 * It is emitted _after_ the bodies and colliders have been updated.
                 * 
                 * In high framerate settings this can be multiple times per game frame.
                 * 
                 * Listen to it from a Scene using: `this.physics.world.on('worldstep', listener)`.
                 */
                const WORLD_STEP: string;

            }

            namespace Tilemap {
                /**
                 * Checks whether a per-tile or per-tile-index collision callback has been registered for the given tile and, if so,
                 * invokes it with the colliding Game Object. Tile-level callbacks (set directly on the tile) take priority over
                 * layer-level callbacks (set on the tile layer by tile index). If the callback returns `true` the collision is
                 * vetoed and this function returns `false` to skip further processing of this pair. If no callback is registered,
                 * this function returns `true` so that normal Arcade Physics collision resolution continues.
                 * @param tile The Tile to process.
                 * @param sprite The Game Object to process with the Tile.
                 * @returns `true` if collision processing should continue for this tile/sprite pair, or `false` if a callback vetoed the collision and it should be skipped.
                 */
                function ProcessTileCallbacks(tile: Phaser.Tilemaps.Tile, sprite: Phaser.GameObjects.Sprite): boolean;

                /**
                 * Internal function to process the horizontal separation of a physics body from a tile.
                 * It updates the body's left or right blocked flags based on the direction of separation,
                 * moves the body by the separation amount along the x-axis, updates its center, and then
                 * either zeroes the horizontal velocity or applies a bounce depending on the body's bounce coefficient.
                 * @param body The Body object to separate.
                 * @param x The x-axis separation distance, in pixels. A negative value indicates the body is blocked on the left; a positive value indicates it is blocked on the right.
                 */
                function ProcessTileSeparationX(body: Phaser.Physics.Arcade.Body, x: number): void;

                /**
                 * Internal function to process the vertical separation of a physics body from a tile.
                 * 
                 * Updates the body's blocked flags based on the direction of separation, adjusts the
                 * body's vertical position by the separation amount, and then either zeroes the vertical
                 * velocity or applies the body's bounce factor to reverse it.
                 * @param body The Body object to separate.
                 * @param y The vertical separation amount, in pixels. A negative value indicates the body was blocked from above; a positive value indicates it was blocked from below.
                 */
                function ProcessTileSeparationY(body: Phaser.Physics.Arcade.Body, y: number): void;

                /**
                 * The core separation function to separate a physics body from a tile, resolving any overlap
                 * between them. It determines which axis to process first based on the body's current velocity:
                 * if the body is moving faster horizontally the X axis is checked first, and vice versa. When
                 * moving diagonally into a tile with colliding faces on both axes, the axis of least overlap is
                 * prioritized. Separation is performed by calling `TileCheckX` and/or `TileCheckY` as appropriate,
                 * and the check short-circuits early if the first axis separation is sufficient to fully resolve
                 * the intersection.
                 * @param i The index of the tile within the map data.
                 * @param body The Body object to separate.
                 * @param tile The tile to collide against.
                 * @param tileWorldRect A rectangle-like object defining the dimensions of the tile.
                 * @param tilemapLayer The tilemapLayer to collide against.
                 * @param tileBias The tile bias value, defined by the `World.TILE_BIAS` constant. Used to prevent fast-moving bodies from tunneling through thin tiles.
                 * @param isLayer Is this check coming from a TilemapLayer or an array of tiles?
                 * @returns `true` if the body was separated, otherwise `false`.
                 */
                function SeparateTile(i: number, body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileWorldRect: Phaser.Geom.Rectangle, tilemapLayer: Phaser.Tilemaps.TilemapLayer, tileBias: number, isLayer: boolean): boolean;

                /**
                 * Checks the given physics body against a tile on the X axis, calculating the overlap and
                 * applying separation if a collision is detected. Respects the tile's face and collision flags
                 * when the check originates from a TilemapLayer, and dispatches to `ProcessTileSeparationX`
                 * (or sets `body.overlapX` if `customSeparateX` is enabled). Used internally by the SeparateTile function.
                 * @param body The Body object to separate.
                 * @param tile The tile to check.
                 * @param tileLeft The left edge of the tile in world coordinates, in pixels.
                 * @param tileRight The right edge of the tile in world coordinates, in pixels.
                 * @param tileBias The tile bias value. Overlaps greater than this threshold are ignored to prevent tunneling. Typically set to `World.TILE_BIAS`.
                 * @param isLayer Is this check coming from a TilemapLayer or an array of tiles?
                 * @returns The amount of separation that occurred.
                 */
                function TileCheckX(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileLeft: number, tileRight: number, tileBias: number, isLayer: boolean): number;

                /**
                 * Checks for overlap between a physics body and a tile along the Y axis and resolves any
                 * collision that is found. If the body has a custom separator set, the overlap value is stored
                 * on `body.overlapY` for the caller to handle; otherwise `ProcessTileSeparationY` is called to
                 * resolve the collision immediately. Used internally by the SeparateTile function.
                 * @param body The Body object to separate.
                 * @param tile The tile to check.
                 * @param tileTop The top position of the tile in world space, in pixels.
                 * @param tileBottom The bottom position of the tile in world space, in pixels.
                 * @param tileBias The tile bias value, as defined by the `World.TILE_BIAS` constant.
                 * @param isLayer Is this check coming from a TilemapLayer or an array of tiles?
                 * @returns The amount of vertical separation that occurred, in pixels.
                 */
                function TileCheckY(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tilemaps.Tile, tileTop: number, tileBottom: number, tileBias: number, isLayer: boolean): number;

                /**
                 * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body.
                 * @param tileWorldRect A rectangle object that defines the tile placement in the world.
                 * @param body The body to check for intersection against.
                 * @returns Returns `true` if the tile intersects with the body, otherwise `false`.
                 */
                function TileIntersectsBody(tileWorldRect: Object, body: Phaser.Physics.Arcade.Body): boolean;

            }

        }

        namespace Matter {
            /**
             * The Body Bounds class contains methods to help you extract the world coordinates from various points around
             * the bounds of a Matter Body. Because Matter bodies are positioned based on their center of mass, and not a
             * dimension based center, you often need to get the bounds coordinates in order to properly align them in the world.
             * 
             * You can access this class via the MatterPhysics class from a Scene, i.e.:
             * 
             * ```javascript
             * this.matter.bodyBounds.getTopLeft(body);
             * ```
             * 
             * See also the `MatterPhysics.alignBody` method.
             */
            class BodyBounds {
                /**
                 * A Vector2 that stores the temporary bounds center value during calculations by methods in this class.
                 */
                boundsCenter: Phaser.Math.Vector2;

                /**
                 * A Vector2 that stores the temporary center diff values during calculations by methods in this class.
                 */
                centerDiff: Phaser.Math.Vector2;

                /**
                 * Parses the given body to get the bounds diff values from it.
                 * 
                 * They're stored in this class in the temporary properties `boundsCenter` and `centerDiff`.
                 * 
                 * This method is called automatically by all other methods in this class.
                 * @param body The Body to get the bounds position from.
                 * @returns `true` if it was able to get the bounds, otherwise `false`.
                 */
                parseBody(body: Phaser.Types.Physics.Matter.MatterBody): boolean;

                /**
                 * Takes a Body and returns the world coordinates of the top-left of its _bounds_.
                 * 
                 * Body bounds are updated by Matter each step and factor in scale and rotation.
                 * This will return the world coordinate based on the body's _current_ position and bounds.
                 * @param body The Body to get the position from.
                 * @param x Optional horizontal offset to add to the returned coordinates. Default 0.
                 * @param y Optional vertical offset to add to the returned coordinates. Default 0.
                 * @returns A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
                 */
                getTopLeft(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false;

                /**
                 * Takes a Body and returns the world coordinates of the top-center of its _bounds_.
                 * 
                 * Body bounds are updated by Matter each step and factor in scale and rotation.
                 * This will return the world coordinate based on the body's _current_ position and bounds.
                 * @param body The Body to get the position from.
                 * @param x Optional horizontal offset to add to the returned coordinates. Default 0.
                 * @param y Optional vertical offset to add to the returned coordinates. Default 0.
                 * @returns A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
                 */
                getTopCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false;

                /**
                 * Takes a Body and returns the world coordinates of the top-right of its _bounds_.
                 * 
                 * Body bounds are updated by Matter each step and factor in scale and rotation.
                 * This will return the world coordinate based on the body's _current_ position and bounds.
                 * @param body The Body to get the position from.
                 * @param x Optional horizontal offset to add to the returned coordinates. Default 0.
                 * @param y Optional vertical offset to add to the returned coordinates. Default 0.
                 * @returns A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
                 */
                getTopRight(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false;

                /**
                 * Takes a Body and returns the world coordinates of the left-center of its _bounds_.
                 * 
                 * Body bounds are updated by Matter each step and factor in scale and rotation.
                 * This will return the world coordinate based on the body's _current_ position and bounds.
                 * @param body The Body to get the position from.
                 * @param x Optional horizontal offset to add to the returned coordinates. Default 0.
                 * @param y Optional vertical offset to add to the returned coordinates. Default 0.
                 * @returns A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
                 */
                getLeftCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false;

                /**
                 * Takes a Body and returns the world coordinates of the center of its _bounds_.
                 * 
                 * Body bounds are updated by Matter each step and factor in scale and rotation.
                 * This will return the world coordinate based on the body's _current_ position and bounds.
                 * @param body The Body to get the position from.
                 * @param x Optional horizontal offset to add to the returned coordinates. Default 0.
                 * @param y Optional vertical offset to add to the returned coordinates. Default 0.
                 * @returns A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
                 */
                getCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false;

                /**
                 * Takes a Body and returns the world coordinates of the right-center of its _bounds_.
                 * 
                 * Body bounds are updated by Matter each step and factor in scale and rotation.
                 * This will return the world coordinate based on the body's _current_ position and bounds.
                 * @param body The Body to get the position from.
                 * @param x Optional horizontal offset to add to the returned coordinates. Default 0.
                 * @param y Optional vertical offset to add to the returned coordinates. Default 0.
                 * @returns A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
                 */
                getRightCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false;

                /**
                 * Takes a Body and returns the world coordinates of the bottom-left of its _bounds_.
                 * 
                 * Body bounds are updated by Matter each step and factor in scale and rotation.
                 * This will return the world coordinate based on the body's _current_ position and bounds.
                 * @param body The Body to get the position from.
                 * @param x Optional horizontal offset to add to the returned coordinates. Default 0.
                 * @param y Optional vertical offset to add to the returned coordinates. Default 0.
                 * @returns A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
                 */
                getBottomLeft(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false;

                /**
                 * Takes a Body and returns the world coordinates of the bottom-center of its _bounds_.
                 * 
                 * Body bounds are updated by Matter each step and factor in scale and rotation.
                 * This will return the world coordinate based on the body's _current_ position and bounds.
                 * @param body The Body to get the position from.
                 * @param x Optional horizontal offset to add to the returned coordinates. Default 0.
                 * @param y Optional vertical offset to add to the returned coordinates. Default 0.
                 * @returns A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
                 */
                getBottomCenter(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false;

                /**
                 * Takes a Body and returns the world coordinates of the bottom-right of its _bounds_.
                 * 
                 * Body bounds are updated by Matter each step and factor in scale and rotation.
                 * This will return the world coordinate based on the body's _current_ position and bounds.
                 * @param body The Body to get the position from.
                 * @param x Optional horizontal offset to add to the returned coordinates. Default 0.
                 * @param y Optional vertical offset to add to the returned coordinates. Default 0.
                 * @returns A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
                 */
                getBottomRight(body: Phaser.Types.Physics.Matter.MatterBody, x?: number, y?: number): Phaser.Math.Vector2 | false;

            }

            namespace Matter {
            }

            /**
             * The Matter Factory is responsible for quickly creating a variety of different types of
             * bodies, constraints and Game Objects and adding them into the physics world.
             * 
             * You access the factory from within a Scene using `add`:
             * 
             * ```javascript
             * this.matter.add.rectangle(x, y, width, height);
             * ```
             * 
             * Use of the Factory is optional. All of the objects it creates can also be created
             * directly via your own code or constructors. It is provided as a means to keep your
             * code concise.
             */
            class Factory {
                /**
                 * 
                 * @param world The Matter World which this Factory adds to.
                 */
                constructor(world: Phaser.Physics.Matter.World);

                /**
                 * The Matter World which this Factory adds to.
                 */
                world: Phaser.Physics.Matter.World;

                /**
                 * The Scene which this Factory's Matter World belongs to.
                 */
                scene: Phaser.Scene;

                /**
                 * A reference to the Scene.Systems this Matter Physics instance belongs to.
                 */
                sys: Phaser.Scenes.Systems;

                /**
                 * Creates a new rigid rectangular Body and adds it to the World.
                 * @param x The X coordinate of the center of the Body.
                 * @param y The Y coordinate of the center of the Body.
                 * @param width The width of the Body.
                 * @param height The height of the Body.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns A Matter JS Body.
                 */
                rectangle(x: number, y: number, width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType;

                /**
                 * Creates a new rigid trapezoidal Body and adds it to the World.
                 * @param x The X coordinate of the center of the Body.
                 * @param y The Y coordinate of the center of the Body.
                 * @param width The width of the trapezoid Body.
                 * @param height The height of the trapezoid Body.
                 * @param slope The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns A Matter JS Body.
                 */
                trapezoid(x: number, y: number, width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType;

                /**
                 * Creates a new rigid circular Body and adds it to the World.
                 * @param x The X coordinate of the center of the Body.
                 * @param y The Y coordinate of the center of the Body.
                 * @param radius The radius of the circle.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @param maxSides The maximum amount of sides to use for the polygon which will approximate this circle.
                 * @returns A Matter JS Body.
                 */
                circle(x: number, y: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, maxSides?: number): MatterJS.BodyType;

                /**
                 * Creates a new rigid polygonal Body and adds it to the World.
                 * @param x The X coordinate of the center of the Body.
                 * @param y The Y coordinate of the center of the Body.
                 * @param sides The number of sides the polygon will have.
                 * @param radius The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns A Matter JS Body.
                 */
                polygon(x: number, y: number, sides: number, radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType;

                /**
                 * Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World.
                 * If the vertices are convex, they will pass through as supplied. Otherwise, if the vertices are concave, they will be decomposed. Note that this process is not guaranteed to support complex sets of vertices, e.g. ones with holes.
                 * @param x The X coordinate of the center of the Body.
                 * @param y The Y coordinate of the center of the Body.
                 * @param vertexSets The vertices data. Either a path string or an array of vertices.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @param flagInternal Flag internal edges (coincident part edges) Default false.
                 * @param removeCollinear Whether Matter.js will discard collinear edges (to improve performance). Default 0.01.
                 * @param minimumArea During decomposition discard parts that have an area less than this. Default 10.
                 * @returns A Matter JS Body.
                 */
                fromVertices(x: number, y: number, vertexSets: string | any[], options?: Phaser.Types.Physics.Matter.MatterBodyConfig, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): MatterJS.BodyType;

                /**
                 * Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor)
                 * 
                 * The PhysicsEditor file should be loaded as JSON:
                 * 
                 * ```javascript
                 * preload ()
                 * {
                 *   this.load.json('vehicles', 'assets/vehicles.json);
                 * }
                 * 
                 * create ()
                 * {
                 *   const vehicleShapes = this.cache.json.get('vehicles');
                 *   this.matter.add.fromPhysicsEditor(400, 300, vehicleShapes.truck);
                 * }
                 * ```
                 * 
                 * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it.
                 * 
                 * If you pass in an `options` object, any settings in there will override those in the PhysicsEditor config object.
                 * @param x The horizontal world location of the body.
                 * @param y The vertical world location of the body.
                 * @param config The JSON data exported from PhysicsEditor.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @param addToWorld Should the newly created body be immediately added to the World? Default true.
                 * @returns A Matter JS Body.
                 */
                fromPhysicsEditor(x: number, y: number, config: any, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.BodyType;

                /**
                 * Creates a body using the path data from an SVG file.
                 * 
                 * SVG Parsing requires the pathseg polyfill from https://github.com/progers/pathseg
                 * 
                 * The SVG file should be loaded as XML, as this method requires the ability to extract
                 * the path data from it. I.e.:
                 * 
                 * ```javascript
                 * preload ()
                 * {
                 *   this.load.xml('face', 'assets/face.svg);
                 * }
                 * 
                 * create ()
                 * {
                 *   this.matter.add.fromSVG(400, 300, this.cache.xml.get('face'));
                 * }
                 * ```
                 * @param x The X coordinate of the body.
                 * @param y The Y coordinate of the body.
                 * @param xml The SVG Path data.
                 * @param scale Scale the vertices by this amount after creation. Default 1.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @param addToWorld Should the newly created body be immediately added to the World? Default true.
                 * @returns A Matter JS Body.
                 */
                fromSVG(x: number, y: number, xml: object, scale?: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.BodyType;

                /**
                 * Creates a body using the supplied physics data, as provided by a JSON file.
                 * 
                 * The data file should be loaded as JSON:
                 * 
                 * ```javascript
                 * preload ()
                 * {
                 *   this.load.json('ninjas', 'assets/ninjas.json);
                 * }
                 * 
                 * create ()
                 * {
                 *   const ninjaShapes = this.cache.json.get('ninjas');
                 * 
                 *   this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi);
                 * }
                 * ```
                 * 
                 * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it.
                 * 
                 * If you pass in an `options` object, any settings in there will override those in the config object.
                 * 
                 * The structure of the JSON file is as follows:
                 * 
                 * ```text
                 * {
                 *   'generator_info': // The name of the application that created the JSON data
                 *   'shapeName': {
                 *     'type': // The type of body
                 *     'label': // Optional body label
                 *     'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs
                 *   }
                 * }
                 * ```
                 * 
                 * At the time of writing, only the Phaser Physics Tracer App exports in this format.
                 * @param x The X coordinate of the body.
                 * @param y The Y coordinate of the body.
                 * @param config The JSON physics data.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @param addToWorld Should the newly created body be immediately added to the World? Default true.
                 * @returns A Matter JS Body.
                 */
                fromJSON(x: number, y: number, config: any, options?: Phaser.Types.Physics.Matter.MatterBodyConfig, addToWorld?: boolean): MatterJS.BodyType;

                /**
                 * Create a new composite containing Matter Image objects created in a grid arrangement.
                 * This function uses the body bounds to prevent overlaps.
                 * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.
                 * @param x The horizontal position of this composite in the world.
                 * @param y The vertical position of this composite in the world.
                 * @param columns The number of columns in the grid.
                 * @param rows The number of rows in the grid.
                 * @param columnGap The distance between each column. Default 0.
                 * @param rowGap The distance between each row. Default 0.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns A Matter JS Composite Stack.
                 */
                imageStack(key: string, frame: string | number, x: number, y: number, columns: number, rows: number, columnGap?: number, rowGap?: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.CompositeType;

                /**
                 * Create a new composite containing bodies created in the callback in a grid arrangement.
                 * 
                 * This function uses the body bounds to prevent overlaps.
                 * @param x The horizontal position of this composite in the world.
                 * @param y The vertical position of this composite in the world.
                 * @param columns The number of columns in the grid.
                 * @param rows The number of rows in the grid.
                 * @param columnGap The distance between each column.
                 * @param rowGap The distance between each row.
                 * @param callback The callback that creates the stack.
                 * @returns A new composite containing objects created in the callback.
                 */
                stack(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): MatterJS.CompositeType;

                /**
                 * Create a new composite containing bodies created in the callback in a pyramid arrangement.
                 * This function uses the body bounds to prevent overlaps.
                 * @param x The horizontal position of this composite in the world.
                 * @param y The vertical position of this composite in the world.
                 * @param columns The number of columns in the pyramid.
                 * @param rows The number of rows in the pyramid.
                 * @param columnGap The distance between each column.
                 * @param rowGap The distance between each row.
                 * @param callback The callback function to be invoked.
                 * @returns A Matter JS Composite pyramid.
                 */
                pyramid(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, callback: Function): MatterJS.CompositeType;

                /**
                 * Chains all bodies in the given composite together using constraints.
                 * @param composite The composite in which all bodies will be chained together sequentially.
                 * @param xOffsetA The horizontal offset of the BodyA constraint. This is a percentage based on the body size, not a world position.
                 * @param yOffsetA The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position.
                 * @param xOffsetB The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position.
                 * @param yOffsetB The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position.
                 * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation.
                 * @returns The original composite that was passed to this method.
                 */
                chain(composite: MatterJS.CompositeType, xOffsetA: number, yOffsetA: number, xOffsetB: number, yOffsetB: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.CompositeType;

                /**
                 * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.
                 * @param composite The composite in which all bodies will be chained together.
                 * @param columns The number of columns in the mesh.
                 * @param rows The number of rows in the mesh.
                 * @param crossBrace Create cross braces for the mesh as well?
                 * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation.
                 * @returns The original composite that was passed to this method.
                 */
                mesh(composite: MatterJS.CompositeType, columns: number, rows: number, crossBrace: boolean, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.CompositeType;

                /**
                 * Creates a composite with a Newton's Cradle setup of bodies and constraints.
                 * @param x The horizontal position of the start of the cradle.
                 * @param y The vertical position of the start of the cradle.
                 * @param number The number of balls in the cradle.
                 * @param size The radius of each ball in the cradle.
                 * @param length The length of the 'string' the balls hang from.
                 * @returns A Newton's cradle composite.
                 */
                newtonsCradle(x: number, y: number, number: number, size: number, length: number): MatterJS.CompositeType;

                /**
                 * Creates a composite with simple car setup of bodies and constraints.
                 * @param x The horizontal position of the car in the world.
                 * @param y The vertical position of the car in the world.
                 * @param width The width of the car chassis.
                 * @param height The height of the car chassis.
                 * @param wheelSize The radius of the car wheels.
                 * @returns A new composite car body.
                 */
                car(x: number, y: number, width: number, height: number, wheelSize: number): MatterJS.CompositeType;

                /**
                 * Creates a simple soft body like object.
                 * @param x The horizontal position of this composite in the world.
                 * @param y The vertical position of this composite in the world.
                 * @param columns The number of columns in the Composite.
                 * @param rows The number of rows in the Composite.
                 * @param columnGap The distance between each column.
                 * @param rowGap The distance between each row.
                 * @param crossBrace `true` to create cross braces between the bodies, or `false` to create just straight braces.
                 * @param particleRadius The radius of each circular particle body in the composite.
                 * @param particleOptions An optional Body configuration object that is used to set initial Body properties on creation.
                 * @param constraintOptions An optional Constraint configuration object that is used to set initial Constraint properties on creation.
                 * @returns A new composite simple soft body.
                 */
                softBody(x: number, y: number, columns: number, rows: number, columnGap: number, rowGap: number, crossBrace: boolean, particleRadius: number, particleOptions?: Phaser.Types.Physics.Matter.MatterBodyConfig, constraintOptions?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.CompositeType;

                /**
                 * This method is an alias for `Factory.constraint`.
                 * 
                 * Constraints (or joints) are used for specifying that a fixed distance must be maintained
                 * between two bodies, or a body and a fixed world-space position.
                 * 
                 * The stiffness of constraints can be modified to create springs or elastic.
                 * 
                 * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness`
                 * value (e.g. `0.7` or above).
                 * 
                 * If the constraint is unstable, try lowering the `stiffness` value and / or increasing
                 * `constraintIterations` within the Matter Config.
                 * 
                 * For compound bodies, constraints must be applied to the parent body and not one of its parts.
                 * @param bodyA The first possible `Body` that this constraint is attached to.
                 * @param bodyB The second possible `Body` that this constraint is attached to.
                 * @param length A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.
                 * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1.
                 * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation.
                 * @returns A Matter JS Constraint.
                 */
                joint(bodyA: MatterJS.BodyType, bodyB: MatterJS.BodyType, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType;

                /**
                 * This method is an alias for `Factory.constraint`.
                 * 
                 * Constraints (or joints) are used for specifying that a fixed distance must be maintained
                 * between two bodies, or a body and a fixed world-space position.
                 * 
                 * The stiffness of constraints can be modified to create springs or elastic.
                 * 
                 * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness`
                 * value (e.g. `0.7` or above).
                 * 
                 * If the constraint is unstable, try lowering the `stiffness` value and / or increasing
                 * `constraintIterations` within the Matter Config.
                 * 
                 * For compound bodies, constraints must be applied to the parent body and not one of its parts.
                 * @param bodyA The first possible `Body` that this constraint is attached to.
                 * @param bodyB The second possible `Body` that this constraint is attached to.
                 * @param length A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.
                 * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1.
                 * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation.
                 * @returns A Matter JS Constraint.
                 */
                spring(bodyA: MatterJS.BodyType, bodyB: MatterJS.BodyType, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType;

                /**
                 * Constraints (or joints) are used for specifying that a fixed distance must be maintained
                 * between two bodies, or a body and a fixed world-space position.
                 * 
                 * The stiffness of constraints can be modified to create springs or elastic.
                 * 
                 * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness`
                 * value (e.g. `0.7` or above).
                 * 
                 * If the constraint is unstable, try lowering the `stiffness` value and / or increasing
                 * `constraintIterations` within the Matter Config.
                 * 
                 * For compound bodies, constraints must be applied to the parent body and not one of its parts.
                 * @param bodyA The first possible `Body` that this constraint is attached to.
                 * @param bodyB The second possible `Body` that this constraint is attached to.
                 * @param length A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.
                 * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1.
                 * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation.
                 * @returns A Matter JS Constraint.
                 */
                constraint(bodyA: MatterJS.BodyType, bodyB: MatterJS.BodyType, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType;

                /**
                 * Constraints (or joints) are used for specifying that a fixed distance must be maintained
                 * between two bodies, or a body and a fixed world-space position.
                 * 
                 * A world constraint has only one body, you should specify a `pointA` position in
                 * the constraint options parameter to attach the constraint to the world.
                 * 
                 * The stiffness of constraints can be modified to create springs or elastic.
                 * 
                 * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness`
                 * value (e.g. `0.7` or above).
                 * 
                 * If the constraint is unstable, try lowering the `stiffness` value and / or increasing
                 * `constraintIterations` within the Matter Config.
                 * 
                 * For compound bodies, constraints must be applied to the parent body and not one of its parts.
                 * @param body The Matter `Body` that this constraint is attached to.
                 * @param length A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.
                 * @param stiffness A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. Default 1.
                 * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation.
                 * @returns A Matter JS Constraint.
                 */
                worldConstraint(body: MatterJS.BodyType, length?: number, stiffness?: number, options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType;

                /**
                 * This method is an alias for `Factory.pointerConstraint`.
                 * 
                 * A Pointer Constraint is a special type of constraint that allows you to click
                 * and drag bodies in a Matter World. It monitors the active Pointers in a Scene,
                 * and when one is pressed down it checks to see if that hit any part of any active
                 * body in the world. If it did, and the body has input enabled, it will begin to
                 * drag it until either released, or you stop it via the `stopDrag` method.
                 * 
                 * You can adjust the stiffness, length and other properties of the constraint via
                 * the `options` object on creation.
                 * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation.
                 * @returns A Matter JS Constraint.
                 */
                mouseSpring(options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType;

                /**
                 * A Pointer Constraint is a special type of constraint that allows you to click
                 * and drag bodies in a Matter World. It monitors the active Pointers in a Scene,
                 * and when one is pressed down it checks to see if that hit any part of any active
                 * body in the world. If it did, and the body has input enabled, it will begin to
                 * drag it until either released, or you stop it via the `stopDrag` method.
                 * 
                 * You can adjust the stiffness, length and other properties of the constraint via
                 * the `options` object on creation.
                 * @param options An optional Constraint configuration object that is used to set initial Constraint properties on creation.
                 * @returns A Matter JS Constraint.
                 */
                pointerConstraint(options?: Phaser.Types.Physics.Matter.MatterConstraintConfig): MatterJS.ConstraintType;

                /**
                 * Creates a Matter Physics Image Game Object.
                 * 
                 * An Image is a light-weight Game Object useful for the display of static images in your game,
                 * such as logos, backgrounds, scenery or other non-animated elements. Images can have input
                 * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an
                 * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns The Matter Image Game Object.
                 */
                image(x: number, y: number, key: string, frame?: string | number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.Physics.Matter.Image;

                /**
                 * Creates a wrapper around a Tile that provides access to a corresponding Matter body. A tile can only
                 * have one Matter body associated with it. You can either pass in an existing Matter body for
                 * the tile or allow the constructor to create the corresponding body for you. If the Tile has a
                 * collision group (defined in Tiled), those shapes will be used to create the body. If not, the
                 * tile's rectangle bounding box will be used.
                 * 
                 * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody.
                 * 
                 * Note: not all Tiled collision shapes are supported. See
                 * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information.
                 * @param tile The target tile that should have a Matter body.
                 * @param options Options to be used when creating the Matter body.
                 * @returns The Matter Tile Body Game Object.
                 */
                tileBody(tile: Phaser.Tilemaps.Tile, options?: Phaser.Types.Physics.Matter.MatterTileOptions): Phaser.Physics.Matter.TileBody;

                /**
                 * Creates a Matter Physics Sprite Game Object.
                 * 
                 * A Sprite Game Object is used for the display of both static and animated images in your game.
                 * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled
                 * and animated.
                 * 
                 * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.
                 * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation
                 * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param key The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns The Matter Sprite Game Object.
                 */
                sprite(x: number, y: number, key: string, frame?: string | number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): Phaser.Physics.Matter.Sprite;

                /**
                 * Takes an existing Game Object and injects all of the Matter Components into it.
                 * 
                 * This enables you to use component methods such as `setVelocity` or `isSensor` directly from
                 * this Game Object.
                 * 
                 * You can also pass in either a Matter Body Configuration object, or a Matter Body instance
                 * to link with this Game Object.
                 * @param gameObject The Game Object to inject the Matter Components in to.
                 * @param options A Matter Body configuration object, or an instance of a Matter Body.
                 * @param addToWorld Add this Matter Body to the World? Default true.
                 * @returns The Game Object that had the Matter Components injected into it.
                 */
                gameObject(gameObject: Phaser.GameObjects.GameObject, options?: Phaser.Types.Physics.Matter.MatterBodyConfig | MatterJS.Body, addToWorld?: boolean): Phaser.Physics.Matter.Image | Phaser.Physics.Matter.Sprite | Phaser.GameObjects.GameObject;

                /**
                 * Destroys this Factory.
                 */
                destroy(): void;

            }

            /**
             * A factory function that mixes all Matter.js physics components into any existing Phaser Game
             * Object, including those you have extended or created yourself. This enables you to give any
             * Game Object full Matter physics capabilities without requiring it to extend a specific class.
             * 
             * The following components are mixed directly onto the Game Object: Bounce, Collision, Force,
             * Friction, Gravity, Mass, Sensor, SetBody, Sleep, Static, Transform, and Velocity. This means
             * methods such as `setVelocity`, `setFriction`, and `isSensor` become available directly on the
             * Game Object after this function is called.
             * 
             * If `options` is an existing Matter Body instance (i.e. its `type` property equals `'body'`),
             * that body is attached via `setExistingBody`. Otherwise, `options` is treated as a
             * `MatterBodyConfig` and a new body is created via `setBody`, defaulting to a rectangle shape
             * if no `shape` property is provided.
             * @param world The Matter world to add the body to.
             * @param gameObject The Game Object that will have the Matter body applied to it.
             * @param options A Matter Body configuration object, or an instance of a Matter Body.
             * @param addToWorld Should the newly created body be immediately added to the World? Default true.
             * @returns The Game Object that was passed in, now enhanced with Matter physics components.
             */
            function MatterGameObject(world: Phaser.Physics.Matter.World, gameObject: Phaser.GameObjects.GameObject, options?: Phaser.Types.Physics.Matter.MatterBodyConfig | MatterJS.Body, addToWorld?: boolean): Phaser.GameObjects.GameObject;

            /**
             * A Matter Physics Image Game Object.
             * 
             * A MatterImage is a standard Phaser Image Game Object with a Matter.js physics body automatically
             * created and attached to it. It combines the lightweight rendering of a static image with the full
             * suite of Matter.js rigid body physics simulation, including gravity, friction, bounce, mass, and
             * accurate collision response against other Matter bodies.
             * 
             * By default, a rectangular physics body matching the image's display dimensions is created. You can
             * supply a custom shape via the `options` parameter to use a circle, polygon, or a compound body
             * defined in a physics editor such as PhysicsEditor.
             * 
             * Use a MatterImage for non-animated physics objects in your scene, such as platforms, crates, walls,
             * debris, or collectibles. If you need frame-based animation alongside Matter.js physics, use
             * `Phaser.Physics.Matter.Sprite` instead. The main difference between a MatterImage and a MatterSprite
             * is that MatterImage does not have the Animation component and cannot play texture-based animations.
             */
            class Image extends Phaser.GameObjects.Image implements Phaser.Physics.Matter.Components.Bounce, Phaser.Physics.Matter.Components.Collision, Phaser.Physics.Matter.Components.Force, Phaser.Physics.Matter.Components.Friction, Phaser.Physics.Matter.Components.Gravity, Phaser.Physics.Matter.Components.Mass, Phaser.Physics.Matter.Components.Sensor, Phaser.Physics.Matter.Components.SetBody, Phaser.Physics.Matter.Components.Sleep, Phaser.Physics.Matter.Components.Static, Phaser.Physics.Matter.Components.Transform, Phaser.Physics.Matter.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
                /**
                 * 
                 * @param world A reference to the Matter.World instance that this body belongs to.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 */
                constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig);

                /**
                 * A reference to the Matter.World instance that this body belongs to.
                 */
                world: Phaser.Physics.Matter.World;

                /**
                 * The Camera used for filters.
                 * You can use this to alter the perspective of filters.
                 * It is not necessary to use this camera for ordinary rendering.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                filterCamera: Phaser.Cameras.Scene2D.Camera;

                /**
                 * The filter lists for this Game Object.
                 * This is an object with `internal` and `external` properties.
                 * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

                /**
                 * Whether any filters should be rendered on this Game Object.
                 * This is `true` by default, even if there are no filters yet.
                 * Disable this to skip filter rendering.
                 * 
                 * Use `willRenderFilters()` to see if there are any active filters.
                 */
                renderFilters: boolean;

                /**
                 * The maximum size of the base filter texture.
                 * Filters may use a larger texture after the base texture is rendered.
                 * The maximum texture size is at least 4096 in WebGL, based on the hardware.
                 * You may set this lower to save memory or prevent resizing.
                 */
                maxFilterSize: Phaser.Math.Vector2;

                /**
                 * Whether `filterCamera` should update every frame
                 * to focus on the Game Object.
                 * Disable this if you want to manually control the camera.
                 */
                filtersAutoFocus: boolean;

                /**
                 * Whether the filters should focus on the context,
                 * rather than attempt to focus on the Game Object.
                 * This is enabled automatically when enabling filters on objects
                 * which don't have well-defined bounds.
                 * 
                 * This effectively sets the internal filters to render the same way
                 * as the external filters.
                 * 
                 * This is only used if `filtersAutoFocus` is enabled.
                 * 
                 * The "context" is the framebuffer to which the Game Object is rendered.
                 * This is usually the main framebuffer, but might be another framebuffer.
                 * It can even be several different framebuffers if the Game Object is
                 * rendered multiple times.
                 */
                filtersFocusContext: boolean;

                /**
                 * Whether the Filters component should always draw to a framebuffer,
                 * even if there are no active filters.
                 */
                filtersForceComposite: boolean;

                /**
                 * Whether this Game Object will render filters.
                 * This is true if it has active filters,
                 * and if the `renderFilters` property is also true.undefined
                 * @returns Whether the Game Object will render filters.
                 */
                willRenderFilters(): boolean;

                /**
                 * Enable this Game Object to have filters.
                 * 
                 * You need to call this method if you want to use the `filterCamera`
                 * and `filters` properties. It sets up the necessary data structures.
                 * You may disable filter rendering with the `renderFilters` property.
                 * 
                 * This is a WebGL only feature. It will return early if not available.undefined
                 * @returns undefined
                 */
                enableFilters(): this;

                /**
                 * Render this object using filters.
                 * 
                 * This function's scope is not guaranteed, so it doesn't refer to `this`.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
                 * @returns undefined
                 */
                renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

                /**
                 * Focus the filter camera.
                 * This sets the size and position of the filter camera to match the GameObject.
                 * This is called automatically on render if `filtersAutoFocus` is enabled.
                 * 
                 * This will focus on the GameObject's raw dimensions if available.
                 * If the GameObject has no dimensions, this will focus on the context:
                 * the camera belonging to the DrawingContext used to render the GameObject.
                 * Context focus occurs during rendering,
                 * as the context is not known until then.undefined
                 * @returns undefined
                 */
                focusFilters(): this;

                /**
                 * Focus the filter camera on a specific camera.
                 * This is used internally when `filtersFocusContext` is enabled.
                 * @param camera The camera to focus on.
                 * @returns undefined
                 */
                focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

                /**
                 * Manually override the focus of the filter camera.
                 * This allows you to set the size and position of the filter camera manually.
                 * It deactivates `filtersAutoFocus` when called.
                 * 
                 * The camera will set scroll to place the game object at the
                 * given position within a rectangle of the given width and height.
                 * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
                 * will focus the camera to place the object's center
                 * 100 pixels above the center of the camera (which is at 400x300).
                 * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param width The width of the focus area. Default is the filter width.
                 * @param height The height of the focus area. Default is the filter height.
                 * @returns undefined
                 */
                focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Set the base size of the filter camera.
                 * This is the size of the texture that internal filters will be drawn to.
                 * External filters are drawn to the size of the context (usually the game canvas).
                 * 
                 * This is typically the size of the GameObject.
                 * It is set automatically when the Game Object is rendered
                 * and `filtersAutoFocus` is enabled.
                 * Turn off auto focus to set it manually.
                 * 
                 * Technically, larger framebuffers may be used to provide padding.
                 * This is the size of the final framebuffer used for "internal" rendering.
                 * @param width Base width of the filter texture.
                 * @param height Base height of the filter texture.
                 * @returns undefined
                 */
                setFilterSize(width: number, height: number): this;

                /**
                 * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
                 * Sets the `filtersAutoFocus` property.
                 * @param value Whether filters should be updated every frame.
                 * @returns undefined
                 */
                setFiltersAutoFocus(value: boolean): this;

                /**
                 * Set whether the filters should focus on the context.
                 * Sets the `filtersFocusContext` property.
                 * @param value Whether the filters should focus on the context.
                 * @returns undefined
                 */
                setFiltersFocusContext(value: boolean): this;

                /**
                 * Set whether the filters should always draw to a framebuffer.
                 * Sets the `filtersForceComposite` property.
                 * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
                 * @returns undefined
                 */
                setFiltersForceComposite(value: boolean): this;

                /**
                 * Set whether the filters should be rendered.
                 * Sets the `renderFilters` property.
                 * @param value Whether the filters should be rendered.
                 * @returns undefined
                 */
                setRenderFilters(value: boolean): this;

                /**
                 * Run a step in the render process.
                 * This is called automatically by the Render module.
                 * 
                 * In most cases, it just runs the `renderWebGL` function.
                 * 
                 * When `_renderSteps` has more than one entry,
                 * such as when Filters are enabled for this object,
                 * it allows those processes to defer `renderWebGL`
                 * and otherwise manage the flow of rendering.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep Which step of the rendering process should be run? Default 0.
                 * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
                 * @param displayListIndex The index of the Game Object within the display list. Default 0.
                 */
                renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

                /**
                 * Adds a render step function to this Game Object's WebGL render pipeline.
                 * 
                 * The first render step in `_renderSteps` is run first.
                 * It should call the next render step in the list.
                 * This allows render steps to control the rendering flow.
                 * @param fn The render step function to add.
                 * @param index The index in the render list to add the step to. Omit to add to the end.
                 * @returns This Game Object instance.
                 */
                addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

                /**
                 * Clears all alpha values associated with this Game Object.
                 * 
                 * Immediately sets the alpha levels back to 1 (fully opaque).undefined
                 * @returns This Game Object instance.
                 */
                clearAlpha(): this;

                /**
                 * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
                 * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
                 * 
                 * If your game is running under WebGL you can optionally specify four different alpha values, each of which
                 * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
                 * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
                 * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
                 * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
                 * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
                 * @returns This Game Object instance.
                 */
                setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

                /**
                 * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
                 * 
                 * This is a global value that impacts the entire Game Object. Setting it also updates
                 * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
                 * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
                 */
                alpha: number;

                /**
                 * The alpha value starting from the top-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopLeft: number;

                /**
                 * The alpha value starting from the top-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopRight: number;

                /**
                 * The alpha value starting from the bottom-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomLeft: number;

                /**
                 * The alpha value starting from the bottom-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomRight: number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 */
                blendMode: Phaser.BlendModes | string | number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 * @param value The BlendMode value. Either a string, a CONST or a number.
                 * @returns This Game Object instance.
                 */
                setBlendMode(value: string | Phaser.BlendModes | number): this;

                /**
                 * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * The default depth is zero. A Game Object with a higher depth
                 * value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 */
                depth: number;

                /**
                 * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * A Game Object with a higher depth value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
                 * @returns This Game Object instance.
                 */
                setDepth(value: number): this;

                /**
                 * Sets this Game Object to be at the top of the display list, or the top of its parent container.
                 * 
                 * Being at the top means it will render on top of everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToTop(): this;

                /**
                 * Sets this Game Object to the back of the display list, or the back of its parent container.
                 * 
                 * Being at the back means it will render below everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToBack(): this;

                /**
                 * Move this Game Object so that it appears above the given Game Object.
                 * 
                 * This means it will render immediately after the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be above.
                 * @returns This Game Object instance.
                 */
                setAbove(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * Move this Game Object so that it appears below the given Game Object.
                 * 
                 * This means it will render immediately under the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be below.
                 * @returns This Game Object instance.
                 */
                setBelow(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * The horizontally flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipX: boolean;

                /**
                 * The vertically flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipY: boolean;

                /**
                 * Toggles the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipX(): this;

                /**
                 * Toggles the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipY(): this;

                /**
                 * Sets the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipX(value: boolean): this;

                /**
                 * Sets the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipY(value: boolean): this;

                /**
                 * Sets the horizontal and vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped will render inverted on the flipped axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
                 * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlip(x: boolean, y: boolean): this;

                /**
                 * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
                 * @returns This Game Object instance.
                 */
                resetFlip(): this;

                /**
                 * Gets the center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the left-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the right-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
                 * 
                 * The bounding rectangle is computed by retrieving all four corner positions of the
                 * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
                 * and parent Container transforms, and then calculating the smallest axis-aligned
                 * rectangle that fully encloses all four points.
                 * 
                 * The values are stored and returned in a Rectangle, or Rectangle-like, object.
                 * @param output An object to store the values in. If not provided a new Rectangle will be created.
                 * @returns The values stored in the output object.
                 */
                getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

                /**
                 * Controls whether this Game Object participates in the WebGL lighting system.
                 * When `true`, the object will respond to dynamic lights added via the Lights plugin,
                 * using normal maps to calculate per-pixel diffuse lighting.
                 * 
                 * This flag is used to select the appropriate WebGL shader at render time.
                 */
                readonly lighting: boolean;

                /**
                 * Configuration object controlling self-shadowing for this Game Object.
                 * Self-shadowing causes surfaces to cast contact shadows on themselves based on
                 * the normal map, giving the appearance of depth. It is only active when
                 * `lighting` is also enabled.
                 * 
                 * If `enabled` is `null`, the value from the game config option `render.selfShadow`
                 * is used instead.
                 * 
                 * This object is used to select and configure the appropriate WebGL shader at render time.
                 */
                selfShadow: Object;

                /**
                 * Enables or disables WebGL-based per-pixel lighting for this Game Object.
                 * When enabled, the object will respond to dynamic lights added to the scene
                 * via the Lights plugin, using a normal map for lighting calculations.
                 * Disabling lighting restores the standard unlit rendering path.
                 * @param enable `true` to use lighting, or `false` to disable it.
                 * @returns This GameObject instance.
                 */
                setLighting(enable: boolean): this;

                /**
                 * Configures the self-shadowing properties of this Game Object.
                 * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
                 * giving the impression of depth and raised detail. It is only active when
                 * `lighting` is also enabled on this Game Object.
                 * 
                 * Parameters that are `undefined` are left unchanged, allowing partial updates.
                 * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
                 * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
                 * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
                 * @returns This GameObject instance.
                 */
                setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

                /**
                 * The Mask this Game Object is using during render, or `null` if no mask has been set.
                 */
                mask: Phaser.Display.Masks.GeometryMask;

                /**
                 * Sets the mask that this Game Object will use to render with.
                 * 
                 * The mask must have been previously created and must be a GeometryMask.
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * 
                 * If a mask is already set on this Game Object it will be immediately replaced.
                 * 
                 * Masks are positioned in global space and are not relative to the Game Object to which they
                 * are applied. The reason for this is that multiple Game Objects can all share the same mask.
                 * 
                 * Masks have no impact on physics or input detection. They are purely a rendering component
                 * that allows you to limit what is visible during the render pass.
                 * @param mask The mask this Game Object will use when rendering.
                 * @returns This Game Object instance.
                 */
                setMask(mask: Phaser.Display.Masks.GeometryMask): this;

                /**
                 * Clears the mask that this Game Object was using.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param destroyMask Destroy the mask before clearing it? Default false.
                 * @returns This Game Object instance.
                 */
                clearMask(destroyMask?: boolean): this;

                /**
                 * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
                 * including this one.
                 * 
                 * To create the mask you need to pass in a reference to a Graphics Game Object.
                 * 
                 * If you do not provide a graphics object, and this Game Object is an instance
                 * of a Graphics object, then it will use itself to create the mask.
                 * 
                 * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
                 * @returns This Geometry Mask that was created.
                 */
                createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

                /**
                 * The horizontal origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the left of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originX: number;

                /**
                 * The vertical origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the top of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originY: number;

                /**
                 * The horizontal display origin of this Game Object, expressed in pixels.
                 * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
                 * Setting this property updates `originX` accordingly.
                 */
                displayOriginX: number;

                /**
                 * The vertical display origin of this Game Object, expressed in pixels.
                 * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
                 * Setting this property updates `originY` accordingly.
                 */
                displayOriginY: number;

                /**
                 * Sets the origin of this Game Object.
                 * 
                 * The values are given in the range 0 to 1.
                 * @param x The horizontal origin value. Default 0.5.
                 * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setOrigin(x?: number, y?: number): this;

                /**
                 * Sets the origin of this Game Object based on the Pivot values in its Frame.
                 * If the Frame has a custom pivot point defined, the origin is set to match it.
                 * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
                 * resetting the origin to the default value of 0.5 for both axes.undefined
                 * @returns This Game Object instance.
                 */
                setOriginFromFrame(): this;

                /**
                 * Sets the display origin of this Game Object.
                 * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
                 * @param x The horizontal display origin value. Default 0.
                 * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setDisplayOrigin(x?: number, y?: number): this;

                /**
                 * Updates the Display Origin cached values internally stored on this Game Object.
                 * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
                 * @returns This Game Object instance.
                 */
                updateDisplayOrigin(): this;

                /**
                 * Customized WebGL render nodes of this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * A default set of RenderNodes is coded into the engine,
                 * but the renderer will check this object first to see if a custom node has been set.
                 */
                customRenderNodes: object;

                /**
                 * The default RenderNodes for this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * These are the nodes that are used if no custom ones are set.
                 * 
                 * RenderNodes are identified by a unique key for their role.
                 * 
                 * Common role keys include:
                 * 
                 * - 'Submitter': responsible for running other node roles for each element.
                 * - 'Transformer': responsible for providing vertex coordinates for an element.
                 * - 'Texturer': responsible for handling textures for an element.
                 */
                defaultRenderNodes: object;

                /**
                 * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * 
                 * Render nodes store their data under their own name, not their role.
                 */
                renderNodeData: object;

                /**
                 * Initializes the render nodes for this Game Object.
                 * 
                 * This method is called when the Game Object is added to the Scene.
                 * It is responsible for setting up the default render nodes
                 * this Game Object will use.
                 * @param defaultNodes The default render nodes to set for this Game Object.
                 */
                initRenderNodes(defaultNodes: Map<string, string>): void;

                /**
                 * Sets the RenderNode for a given role.
                 * 
                 * Also sets the relevant render node data object, if specified.
                 * 
                 * If the node cannot be set, no changes are made.
                 * @param key The key of the role to set the render node for.
                 * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
                 * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
                 * @returns This Game Object instance.
                 */
                setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

                /**
                 * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
                 * 
                 * If `key` is not set, it is created. If it is set, it is updated.
                 * 
                 * If `value` is undefined and `key` exists, the key is removed.
                 * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
                 * @param key The key of the property to set.
                 * @param value The value to set the property to.
                 * @returns This Game Object instance.
                 */
                setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

                /**
                 * The horizontal scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorX: number;

                /**
                 * The vertical scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorY: number;

                /**
                 * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
                 * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
                 * and `scrollFactorY` in a single call.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 * @param x The horizontal scroll factor of this Game Object.
                 * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScrollFactor(x: number, y?: number): this;

                /**
                 * The native (un-scaled) width of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayWidth` property.
                 */
                width: number;

                /**
                 * The native (un-scaled) height of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayHeight` property.
                 */
                height: number;

                /**
                 * The displayed width of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayWidth: number;

                /**
                 * The displayed height of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayHeight: number;

                /**
                 * Sets the size of this Game Object to be that of the given Frame.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param frame The frame to base the size of this Game Object on.
                 * @returns This Game Object instance.
                 */
                setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

                /**
                 * Sets the internal size of this Game Object, as used for frame or physics body creation.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setSize(width: number, height: number): this;

                /**
                 * Sets the display (rendered) size of this Game Object in pixels.
                 * 
                 * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
                 * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
                 * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
                 * the scale manually, but more convenient when you want to work in pixel values directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setDisplaySize(width: number, height: number): this;

                /**
                 * The Texture this Game Object is using to render with.
                 */
                texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

                /**
                 * The Texture Frame this Game Object is using to render with.
                 */
                frame: Phaser.Textures.Frame;

                /**
                 * A boolean flag indicating if this Game Object is being cropped or not.
                 * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
                 * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
                 */
                isCropped: boolean;

                /**
                 * Applies a crop to a texture based Game Object, such as a Sprite or Image.
                 * 
                 * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
                 * 
                 * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
                 * changes what is shown when rendered.
                 * 
                 * The crop size as well as coordinates can not exceed the size of the texture frame.
                 * 
                 * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
                 * 
                 * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
                 * half of it, you could call `setCrop(0, 0, 400, 600)`.
                 * 
                 * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
                 * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
                 * 
                 * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
                 * 
                 * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
                 * 
                 * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
                 * the renderer to skip several internal calculations.
                 * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
                 * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
                 * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
                 * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
                 * @returns This Game Object instance.
                 */
                setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

                /**
                 * Sets the texture and frame this Game Object will use to render with.
                 * 
                 * Textures are referenced by their string-based keys, as stored in the Texture Manager.
                 * @param key The key of the texture to be used, as stored in the Texture Manager.
                 * @param frame The name or index of the frame within the Texture.
                 * @returns This Game Object instance.
                 */
                setTexture(key: string, frame?: string | number): this;

                /**
                 * Sets the frame this Game Object will use to render with.
                 * 
                 * If you pass a string or index then the Frame has to belong to the current Texture being used
                 * by this Game Object.
                 * 
                 * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
                 * 
                 * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
                 * 
                 * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
                 * @param frame The name or index of the frame within the Texture, or a Frame instance.
                 * @param updateSize Should this call adjust the size of the Game Object? Default true.
                 * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
                 * @returns This Game Object instance.
                 */
                setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

                /**
                 * The tint value being applied to the top-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopLeft: number;

                /**
                 * The tint value being applied to the top-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopRight: number;

                /**
                 * The tint value being applied to the bottom-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomLeft: number;

                /**
                 * The tint value being applied to the bottom-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomRight: number;

                /**
                 * The tint mode to use when applying the tint to the texture.
                 * 
                 * Available modes are:
                 * - Phaser.TintModes.MULTIPLY (default)
                 * - Phaser.TintModes.FILL
                 * - Phaser.TintModes.ADD
                 * - Phaser.TintModes.SCREEN
                 * - Phaser.TintModes.OVERLAY
                 * - Phaser.TintModes.HARD_LIGHT
                 * 
                 * Note that in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 */
                tintMode: Phaser.TintModes;

                /**
                 * Clears all tint values associated with this Game Object.
                 * 
                 * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
                 * which results in no visible change to the texture.undefined
                 * @returns This Game Object instance.
                 */
                clearTint(): this;

                /**
                 * Sets the tint color on this Game Object.
                 * 
                 * The tint works by taking the pixel color values from the Game Objects texture, and then
                 * combining it with the color value of the tint. You can provide either one color value,
                 * in which case the whole Game Object will be tinted in that color. Or you can provide a color
                 * per corner. The colors are blended together across the extent of the Game Object.
                 * 
                 * To modify the tint color once set, either call this method again with new values or use the
                 * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
                 * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
                 * 
                 * To remove a tint call `clearTint`.
                 * 
                 * The tint color is combined according to the tint mode.
                 * By default, this is `MULTIPLY`.
                 * 
                 * Note that, in Phaser 3, this would also swap the tint mode if it was set
                 * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
                 * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
                 * @param topRight The tint being applied to the top-right of the Game Object.
                 * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
                 * @param bottomRight The tint being applied to the bottom-right of the Game Object.
                 * @returns This Game Object instance.
                 */
                setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

                /**
                 * Sets the tint mode to use when applying the tint to the texture.
                 * 
                 * Note that, in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 * @param mode The tint mode to use.
                 * @returns This Game Object instance.
                 */
                setTintMode(mode: number | Phaser.TintModes): this;

                /**
                 * Deprecated method which does nothing.
                 * In Phaser 3, this would set the tint color, and set the tint mode to fill.
                 * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
                 */
                setTintFill(): void;

                /**
                 * The tint value being applied to the whole of the Game Object.
                 * Returns the value of `tintTopLeft` when read. When written, the same
                 * color value is applied to all four corner tint properties (`tintTopLeft`,
                 * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
                 */
                tint: number;

                /**
                 * Does this Game Object have a tint applied?
                 * 
                 * Returns `true` if any of the four corner tint values differ from 0xffffff,
                 * or if the `tintMode` property is set to anything other than `MULTIPLY`.
                 * Returns `false` when all four tint values are 0xffffff and the tint mode
                 * is `MULTIPLY`, which is the default untinted state.
                 */
                readonly isTinted: boolean;

                /**
                 * A property indicating that a Game Object has this component.
                 */
                readonly hasTransformComponent: boolean;

                /**
                 * The x position of this Game Object.
                 */
                x: number;

                /**
                 * The y position of this Game Object.
                 */
                y: number;

                /**
                 * The z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#depth} instead.
                 */
                z: number;

                /**
                 * The w position of this Game Object.
                 */
                w: number;

                /**
                 * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
                 * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
                 * 
                 * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
                 * isn't the case, use the `scaleX` or `scaleY` properties instead.
                 */
                scale: number;

                /**
                 * The horizontal scale of this Game Object.
                 */
                scaleX: number;

                /**
                 * The vertical scale of this Game Object.
                 */
                scaleY: number;

                /**
                 * The angle of this Game Object as expressed in degrees.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
                 * and -90 is up.
                 * 
                 * If you prefer to work in radians, see the `rotation` property instead.
                 */
                angle: number;

                /**
                 * The angle of this Game Object in radians.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
                 * and -PI/2 is up.
                 * 
                 * If you prefer to work in degrees, see the `angle` property instead.
                 */
                rotation: number;

                /**
                 * Sets the position of this Game Object.
                 * @param x The x position of this Game Object. Default 0.
                 * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
                 * @param z The z position of this Game Object. Default 0.
                 * @param w The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setPosition(x?: number, y?: number, z?: number, w?: number): this;

                /**
                 * Copies an object's coordinates to this Game Object's position.
                 * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
                 * @returns This Game Object instance.
                 */
                copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

                /**
                 * Sets the position of this Game Object to be a random position within the confines of
                 * the given area.
                 * 
                 * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
                 * 
                 * The position does not factor in the size of this Game Object, meaning that only the origin is
                 * guaranteed to be within the area.
                 * @param x The x position of the top-left of the random area. Default 0.
                 * @param y The y position of the top-left of the random area. Default 0.
                 * @param width The width of the random area.
                 * @param height The height of the random area.
                 * @returns This Game Object instance.
                 */
                setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Sets the rotation of this Game Object.
                 * @param radians The rotation of this Game Object, in radians. Default 0.
                 * @returns This Game Object instance.
                 */
                setRotation(radians?: number): this;

                /**
                 * Sets the angle of this Game Object.
                 * @param degrees The rotation of this Game Object, in degrees. Default 0.
                 * @returns This Game Object instance.
                 */
                setAngle(degrees?: number): this;

                /**
                 * Sets the scale of this Game Object.
                 * @param x The horizontal scale of this Game Object. Default 1.
                 * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScale(x?: number, y?: number): this;

                /**
                 * Sets the x position of this Game Object.
                 * @param value The x position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setX(value?: number): this;

                /**
                 * Sets the y position of this Game Object.
                 * @param value The y position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setY(value?: number): this;

                /**
                 * Sets the z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
                 * @param value The z position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setZ(value?: number): this;

                /**
                 * Sets the w position of this Game Object.
                 * @param value The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setW(value?: number): this;

                /**
                 * Gets the local transform matrix for this Game Object.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @returns The populated Transform Matrix.
                 */
                getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @param parentMatrix A temporary matrix to hold parent values during the calculations.
                 * @returns The populated Transform Matrix.
                 */
                getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Takes the given `x` and `y` coordinates and converts them into local space for this
                 * Game Object, taking into account parent and local transforms, and the Display Origin.
                 * 
                 * The returned Vector2 contains the translated point in its properties.
                 * 
                 * A Camera needs to be provided in order to handle modified scroll factors. If no
                 * camera is specified, it will use the `main` camera from the Scene to which this
                 * Game Object belongs.
                 * @param x The x position to translate.
                 * @param y The y position to translate.
                 * @param point A Vector2, or point-like object, to store the results in.
                 * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
                 * @returns The translated point.
                 */
                getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

                /**
                 * Gets the world position of this Game Object, factoring in any parent Containers.
                 * @param point A Vector2, or point-like object, to store the result in.
                 * @param tempMatrix A temporary matrix to hold the Game Object's values.
                 * @param parentMatrix A temporary matrix to hold parent values.
                 * @returns The world position of this Game Object.
                 */
                getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

                /**
                 * Gets the sum total rotation of all of this Game Object's parent Containers.
                 * 
                 * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
                 * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
                 */
                getParentRotation(): number;

                /**
                 * The visible state of the Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 */
                visible: boolean;

                /**
                 * Sets the visibility of this Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 * @param value The visible state of the Game Object.
                 * @returns This Game Object instance.
                 */
                setVisible(value: boolean): this;

                /**
                 * Sets the restitution (bounciness) of this Game Object's Matter.js physics body.
                 * This controls how much of the body's kinetic energy is preserved after a collision.
                 * @param value A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)`
                 * @returns This Game Object instance.
                 */
                setBounce(value: number): this;

                /**
                 * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31.
                 * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision
                 * categories are included in their collision masks (see {@link #setCollidesWith}).
                 * @param value Unique category bitfield.
                 * @returns This Game Object instance.
                 */
                setCollisionCategory(value: number): this;

                /**
                 * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values,
                 * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollidesWith}).
                 * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value,
                 * they will never collide.
                 * @param value Unique group index.
                 * @returns This Game Object instance.
                 */
                setCollisionGroup(value: number): this;

                /**
                 * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only
                 * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0`
                 * and `(categoryB & maskA) !== 0` are both true.
                 * @param categories A unique category bitfield, or an array of them.
                 * @returns This Game Object instance.
                 */
                setCollidesWith(categories: number | number[]): this;

                /**
                 * Sets a callback to be invoked when this Game Object's Matter Body begins colliding with another body.
                 * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param callback The callback to invoke when this body starts colliding with another.
                 * @returns This Game Object instance.
                 */
                setOnCollide(callback: Function): this;

                /**
                 * Sets a callback to be invoked when this Game Object's Matter Body stops colliding with another body.
                 * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param callback The callback to invoke when this body stops colliding with another.
                 * @returns This Game Object instance.
                 */
                setOnCollideEnd(callback: Function): this;

                /**
                 * Sets a callback to be invoked each step while this Game Object's Matter Body is actively colliding with another body.
                 * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param callback The callback to invoke for the duration of this body colliding with another.
                 * @returns This Game Object instance.
                 */
                setOnCollideActive(callback: Function): this;

                /**
                 * Sets a callback to be invoked when this Game Object's Matter Body collides with a specific body or bodies.
                 * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param body The body, or an array of bodies, to test for collisions with.
                 * @param callback The callback to invoke when this body collides with the given body or bodies.
                 * @returns This Game Object instance.
                 */
                setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): this;

                /**
                 * Applies a force to a body at its current center of mass position.
                 * @param force A Vector that specifies the force to apply.
                 * @returns This Game Object instance.
                 */
                applyForce(force: Phaser.Math.Vector2): this;

                /**
                 * Applies a force to a body from a given position.
                 * @param position The position in which the force comes from.
                 * @param force A Vector that specifies the force to apply.
                 * @returns This Game Object instance.
                 */
                applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): this;

                /**
                 * Apply thrust in the forward direction of the body.
                 * 
                 * Use very small values, such as 0.1, depending on the mass and required speed.
                 * @param speed A speed value to be applied to a directional force.
                 * @returns This Game Object instance.
                 */
                thrust(speed: number): this;

                /**
                 * Apply thrust in the left direction of the body.
                 * 
                 * Use very small values, such as 0.1, depending on the mass and required speed.
                 * @param speed A speed value to be applied to a directional force.
                 * @returns This Game Object instance.
                 */
                thrustLeft(speed: number): this;

                /**
                 * Apply thrust in the right direction of the body.
                 * 
                 * Use very small values, such as 0.1, depending on the mass and required speed.
                 * @param speed A speed value to be applied to a directional force.
                 * @returns This Game Object instance.
                 */
                thrustRight(speed: number): this;

                /**
                 * Apply thrust in the reverse direction of the body.
                 * 
                 * Use very small values, such as 0.1, depending on the mass and required speed.
                 * @param speed A speed value to be applied to a directional force.
                 * @returns This Game Object instance.
                 */
                thrustBack(speed: number): this;

                /**
                 * Sets new friction values for this Game Object's Matter Body.
                 * @param value The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied.
                 * @param air If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance.
                 * @param fstatic If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never "stick" when it is nearly stationary.
                 * @returns This Game Object instance.
                 */
                setFriction(value: number, air?: number, fstatic?: number): this;

                /**
                 * Sets a new air resistance for this Game Object's Matter Body.
                 * A value of 0 means the Body will never slow as it moves through space.
                 * The higher the value, the faster a Body slows when moving through space.
                 * @param value The new air resistance for the Body.
                 * @returns This Game Object instance.
                 */
                setFrictionAir(value: number): this;

                /**
                 * Sets a new static friction for this Game Object's Matter Body.
                 * A value of 0 means the Body will never "stick" when it is nearly stationary.
                 * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary.
                 * @param value The new static friction for the Body.
                 * @returns This Game Object instance.
                 */
                setFrictionStatic(value: number): this;

                /**
                 * Sets whether this Game Object's Matter.js body should ignore world gravity. When set to
                 * `true`, the body will not be influenced by the global gravity defined in the Matter.js
                 * world configuration, allowing it to float freely regardless of the world's gravity settings.
                 * This can be changed at any time during gameplay to dynamically enable or disable gravity on the body.
                 * @param value Set to true to ignore the effect of world gravity, or false to not ignore it.
                 * @returns This Game Object instance.
                 */
                setIgnoreGravity(value: boolean): this;

                /**
                 * Sets the mass of the Game Object's Matter Body.
                 * @param value The new mass of the body.
                 * @returns This Game Object instance.
                 */
                setMass(value: number): this;

                /**
                 * Sets the density of the body.
                 * @param value The new density of the body.
                 * @returns This Game Object instance.
                 */
                setDensity(value: number): this;

                /**
                 * The body's center of mass.
                 * 
                 * Calling this creates a new `Vector2` each time to avoid mutation.
                 * 
                 * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`.
                 */
                readonly centerOfMass: Phaser.Math.Vector2;

                /**
                 * Set the body belonging to this Game Object to be a sensor.
                 * Sensors trigger collision events, but don't physically react to or push colliding bodies.
                 * @param value `true` to set the body as a sensor, or `false` to disable it.
                 * @returns This Game Object instance.
                 */
                setSensor(value: boolean): this;

                /**
                 * Is the body belonging to this Game Object a sensor or not?undefined
                 * @returns `true` if the body is a sensor, otherwise `false`.
                 */
                isSensor(): boolean;

                /**
                 * Set this Game Object's Matter physics body to be a rectangle shape.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param width Width of the rectangle.
                 * @param height Height of the rectangle.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setRectangle(width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Set this Game Object's Matter physics body to be a circle shape.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param radius The radius of the circle.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setCircle(radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Set this Game Object's Matter physics body to be a polygon shape.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param radius The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle.
                 * @param sides The number of sides the polygon will have.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setPolygon(radius: number, sides: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Set this Game Object's Matter physics body to be a trapezoid shape.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param width The width of the trapezoid Body.
                 * @param height The height of the trapezoid Body.
                 * @param slope The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setTrapezoid(width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Set this Game Object to use the given existing Matter Body.
                 * 
                 * The body is first removed from the world before being added to this Game Object.
                 * @param body The Body this Game Object should use.
                 * @param addToWorld Should the body be immediately added to the World? Default true.
                 * @returns This Game Object instance.
                 */
                setExistingBody(body: MatterJS.BodyType, addToWorld?: boolean): this;

                /**
                 * Set this Game Object to create and use a new Body based on the configuration object given.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param config Either a string, such as `circle`, or a Matter Set Body Configuration object.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setBody(config: string | Phaser.Types.Physics.Matter.MatterSetBodyConfig, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Immediately puts this physics body to sleep, removing it from active simulation.
                 * A sleeping body will not move, generate collisions, or consume CPU until it is woken.
                 * It can be woken manually via `setAwake`, or automatically when struck by another body.undefined
                 * @returns This Game Object instance.
                 */
                setToSleep(): this;

                /**
                 * Wakes this physics body if it is currently asleep, returning it to active simulation.
                 * Once awake, the body will resume participating in collisions and physics updates.undefined
                 * @returns This Game Object instance.
                 */
                setAwake(): this;

                /**
                 * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine).
                 * @param value The number of consecutive updates with near-zero velocity required before the body is put to sleep. Default 60.
                 * @returns This Game Object instance.
                 */
                setSleepThreshold(value?: number): this;

                /**
                 * Enable sleep and wake events for this body.
                 * 
                 * By default when a body goes to sleep, or wakes up, it will not emit any events.
                 * 
                 * The events are emitted by the Matter World instance and can be listened to via
                 * the `SLEEP_START` and `SLEEP_END` events.
                 * @param start `true` if you want the sleep start event to be emitted for this body.
                 * @param end `true` if you want the sleep end event to be emitted for this body.
                 * @returns This Game Object instance.
                 */
                setSleepEvents(start: boolean, end: boolean): this;

                /**
                 * Enables or disables the Sleep Start event for this body.
                 * @param value `true` to enable the `SLEEP_START` event for this body, or `false` to disable it.
                 * @returns This Game Object instance.
                 */
                setSleepStartEvent(value: boolean): this;

                /**
                 * Enables or disables the Sleep End event for this body.
                 * @param value `true` to enable the `SLEEP_END` event for this body, or `false` to disable it.
                 * @returns This Game Object instance.
                 */
                setSleepEndEvent(value: boolean): this;

                /**
                 * Changes the physics body to be either static `true` or dynamic `false`.
                 * @param value `true` to set the body as being static, or `false` to make it dynamic.
                 * @returns This Game Object instance.
                 */
                setStatic(value: boolean): this;

                /**
                 * Returns `true` if the body is static, otherwise `false` for a dynamic body.undefined
                 * @returns `true` if the body is static, otherwise `false`.
                 */
                isStatic(): boolean;

                /**
                 * Setting fixed rotation sets the Body inertia to Infinity, which stops it
                 * from being able to rotate when forces are applied to it.undefined
                 * @returns This Game Object instance.
                 */
                setFixedRotation(): this;

                /**
                 * Sets the horizontal velocity of the physics body.
                 * @param x The horizontal velocity value, in pixels per second.
                 * @returns This Game Object instance.
                 */
                setVelocityX(x: number): this;

                /**
                 * Sets the vertical velocity of the physics body.
                 * @param y The vertical velocity value, in pixels per second.
                 * @returns This Game Object instance.
                 */
                setVelocityY(y: number): this;

                /**
                 * Sets both the horizontal and vertical velocity of the physics body.
                 * @param x The horizontal velocity value.
                 * @param y The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setVelocity(x: number, y?: number): this;

                /**
                 * Gets the current linear velocity of the physics body.undefined
                 * @returns The current linear velocity of the body.
                 */
                getVelocity(): Phaser.Types.Math.Vector2Like;

                /**
                 * Sets the angular velocity of the body instantly.
                 * Position, angle, force etc. are unchanged.
                 * @param velocity The angular velocity.
                 * @returns This Game Object instance.
                 */
                setAngularVelocity(velocity: number): this;

                /**
                 * Gets the current rotational velocity of the body.undefined
                 * @returns The current angular velocity of the body.
                 */
                getAngularVelocity(): number;

                /**
                 * Sets the current rotational speed of the body.
                 * Direction is maintained. Affects body angular velocity.
                 * @param speed The angular speed.
                 * @returns This Game Object instance.
                 */
                setAngularSpeed(speed: number): this;

                /**
                 * Gets the current rotational speed of the body.
                 * Equivalent to the magnitude of its angular velocity.undefined
                 * @returns The current angular speed of the body.
                 */
                getAngularSpeed(): number;

            }

            /**
             * The Phaser Matter plugin provides the ability to use the Matter JS Physics Engine within your Phaser games.
             * 
             * Unlike Arcade Physics, the other physics system provided with Phaser, Matter JS is a full-body physics system.
             * It features:
             * 
             * * Rigid bodies
             * * Compound bodies
             * * Composite bodies
             * * Concave and convex hulls
             * * Physical properties (mass, area, density etc.)
             * * Restitution (elastic and inelastic collisions)
             * * Collisions (broad-phase, mid-phase and narrow-phase)
             * * Stable stacking and resting
             * * Conservation of momentum
             * * Friction and resistance
             * * Constraints
             * * Gravity
             * * Sleeping and static bodies
             * * Rounded corners (chamfering)
             * * Views (translate, zoom)
             * * Collision queries (raycasting, region tests)
             * * Time scaling (slow-mo, speed-up)
             * 
             * Configuration of Matter is handled via the Matter World Config object, which can be passed in either the
             * Phaser Game Config, or Phaser Scene Config. Here is a basic example:
             * 
             * ```js
             * physics: {
             *     default: 'matter',
             *     matter: {
             *         enableSleeping: true,
             *         gravity: {
             *             y: 0
             *         },
             *         debug: {
             *             showBody: true,
             *             showStaticBody: true
             *         }
             *     }
             * }
             * ```
             * 
             * This class acts as an interface between a Phaser Scene and a single instance of the Matter Engine.
             * 
             * Use it to access the most common Matter features and helper functions.
             * 
             * You can find details, documentation and examples on the Matter JS website: https://brm.io/matter-js/
             */
            class MatterPhysics {
                /**
                 * 
                 * @param scene The Phaser Scene that owns this Matter Physics instance.
                 */
                constructor(scene: Phaser.Scene);

                /**
                 * The Phaser Scene that owns this Matter Physics instance.
                 */
                scene: Phaser.Scene;

                /**
                 * A reference to the Scene Systems that belong to the Scene owning this Matter Physics instance.
                 */
                systems: Phaser.Scenes.Systems;

                /**
                 * The parsed Matter Configuration object.
                 */
                config: Phaser.Types.Physics.Matter.MatterWorldConfig;

                /**
                 * An instance of the Matter World class. This class is responsible for the updating of the
                 * Matter Physics world, as well as handling debug drawing functions.
                 */
                world: Phaser.Physics.Matter.World;

                /**
                 * An instance of the Matter Factory. This class provides lots of functions for creating a
                 * wide variety of physics objects and adds them automatically to the Matter World.
                 * 
                 * You can use this class to cut-down on the amount of code required in your game, however,
                 * use of the Factory is entirely optional and should be seen as a development aid. It's
                 * perfectly possible to create and add components to the Matter world without using it.
                 */
                add: Phaser.Physics.Matter.Factory;

                /**
                 * An instance of the Body Bounds class. This class contains functions used for getting the
                 * world position from various points around the bounds of a physics body.
                 */
                bodyBounds: Phaser.Physics.Matter.BodyBounds;

                /**
                 * A reference to the `Matter.Body` module.
                 * 
                 * The `Matter.Body` module contains methods for creating and manipulating body models.
                 * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.
                 * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the `Bodies` module.
                 */
                body: MatterJS.BodyFactory;

                /**
                 * A reference to the `Matter.Composite` module.
                 * 
                 * The `Matter.Composite` module contains methods for creating and manipulating composite bodies.
                 * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.
                 * It is important to use the functions in this module to modify composites, rather than directly modifying their properties.
                 * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.
                 */
                composite: MatterJS.CompositeFactory;

                /**
                 * A reference to the `Matter.Collision` module.
                 * 
                 * The `Matter.Collision` module contains methods for detecting collisions between a given pair of bodies.
                 * 
                 * For efficient detection between a list of bodies, see `Matter.Detector` and `Matter.Query`.
                 */
                collision: MatterJS.Collision;

                /**
                 * A reference to the `Matter.Detector` module.
                 * 
                 * The `Matter.Detector` module contains methods for detecting collisions given a set of pairs.
                 */
                detector: MatterJS.DetectorFactory;

                /**
                 * A reference to the `Matter.Pair` module.
                 * 
                 * The `Matter.Pair` module contains methods for creating and manipulating collision pairs.
                 */
                pair: MatterJS.PairFactory;

                /**
                 * A reference to the `Matter.Pairs` module.
                 * 
                 * The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets.
                 */
                pairs: MatterJS.PairsFactory;

                /**
                 * A reference to the `Matter.Query` module.
                 * 
                 * The `Matter.Query` module contains methods for performing collision queries.
                 */
                query: MatterJS.QueryFactory;

                /**
                 * A reference to the `Matter.Resolver` module.
                 * 
                 * The `Matter.Resolver` module contains methods for resolving collision pairs.
                 */
                resolver: MatterJS.ResolverFactory;

                /**
                 * A reference to the `Matter.Constraint` module.
                 * 
                 * The `Matter.Constraint` module contains methods for creating and manipulating constraints.
                 * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).
                 * The stiffness of constraints can be modified to create springs or elastic.
                 */
                constraint: MatterJS.ConstraintFactory;

                /**
                 * A reference to the `Matter.Bodies` module.
                 * 
                 * The `Matter.Bodies` module contains factory methods for creating rigid bodies
                 * with commonly used body configurations (such as rectangles, circles and other polygons).
                 */
                bodies: MatterJS.BodiesFactory;

                /**
                 * A reference to the `Matter.Composites` module.
                 * 
                 * The `Matter.Composites` module contains factory methods for creating composite bodies
                 * with commonly used configurations (such as stacks and chains).
                 */
                composites: MatterJS.CompositesFactory;

                /**
                 * A reference to the `Matter.Axes` module.
                 * 
                 * The `Matter.Axes` module contains methods for creating and manipulating sets of axes.
                 */
                axes: MatterJS.AxesFactory;

                /**
                 * A reference to the `Matter.Bounds` module.
                 * 
                 * The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB).
                 */
                bounds: MatterJS.BoundsFactory;

                /**
                 * A reference to the `Matter.Svg` module.
                 * 
                 * The `Matter.Svg` module contains methods for converting SVG images into an array of vector points.
                 * 
                 * To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg
                 */
                svg: MatterJS.SvgFactory;

                /**
                 * A reference to the `Matter.Vector` module.
                 * 
                 * The `Matter.Vector` module contains methods for creating and manipulating vectors.
                 * Vectors are the basis of all the geometry related operations in the engine.
                 * A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`.
                 */
                vector: MatterJS.VectorFactory;

                /**
                 * A reference to the `Matter.Vertices` module.
                 * 
                 * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.
                 * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.
                 * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).
                 */
                vertices: MatterJS.VerticesFactory;

                /**
                 * A reference to the `Matter.Vertices` module. This is an alias for {@link Phaser.Physics.Matter.MatterPhysics#vertices}.
                 * 
                 * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.
                 * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.
                 * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).
                 */
                verts: MatterJS.VerticesFactory;

                /**
                 * This internal method is called when this class starts and retrieves the final Matter World Config.undefined
                 * @returns The Matter World Config.
                 */
                getConfig(): Phaser.Types.Physics.Matter.MatterWorldConfig;

                /**
                 * Pauses the Matter World instance and sets `enabled` to `false`.
                 * 
                 * A paused world will not run any simulations for the duration it is paused.undefined
                 * @returns The Matter World object.
                 */
                pause(): Phaser.Physics.Matter.World;

                /**
                 * Resumes this Matter World instance from a paused state and sets `enabled` to `true`.undefined
                 * @returns The Matter World object.
                 */
                resume(): Phaser.Physics.Matter.World;

                /**
                 * Sets the Matter Engine to run at fixed timestep of 60Hz and enables `autoUpdate`.
                 * If you have set a custom `getDelta` function then this will override it.undefined
                 * @returns This Matter Physics instance.
                 */
                set60Hz(): this;

                /**
                 * Sets the Matter Engine to run at fixed timestep of 30Hz and enables `autoUpdate`.
                 * If you have set a custom `getDelta` function then this will override it.undefined
                 * @returns This Matter Physics instance.
                 */
                set30Hz(): this;

                /**
                 * Manually advances the physics simulation by one iteration.
                 * 
                 * You can optionally pass in the `delta` and `correction` values to be used by Engine.update.
                 * If undefined they use the Matter defaults of 60Hz and no correction.
                 * 
                 * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`.
                 * 
                 * It also ignores any custom `getDelta` functions, as you should be passing the delta
                 * value in to this call.
                 * 
                 * You can adjust the number of iterations that Engine.update performs internally.
                 * Use the Scene Matter Physics config object to set the following properties:
                 * 
                 * positionIterations (defaults to 6)
                 * velocityIterations (defaults to 4)
                 * constraintIterations (defaults to 2)
                 * 
                 * Adjusting these values can help performance in certain situations, depending on the physics requirements
                 * of your game.
                 * @param delta The delta value. Default 16.666.
                 * @param correction Optional delta correction value. Default 1.
                 */
                step(delta?: number, correction?: number): void;

                /**
                 * Checks if the vertices of the given body, or an array of bodies, contains the given point, or not.
                 * 
                 * You can pass in either a single body, or an array of bodies to be checked. This method will
                 * return `true` if _any_ of the bodies in the array contain the point. See the `intersectPoint` method if you need
                 * to get a list of intersecting bodies.
                 * 
                 * The point should be transformed into the Matter World coordinate system in advance. This happens by
                 * default with Input Pointers, but if you wish to use points from another system you may need to
                 * transform them before passing them.
                 * @param body The body, or an array of bodies, to check against the point.
                 * @param x The horizontal coordinate of the point.
                 * @param y The vertical coordinate of the point.
                 * @returns `true` if the point is within one of the bodies given, otherwise `false`.
                 */
                containsPoint(body: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], x: number, y: number): boolean;

                /**
                 * Checks the given coordinates to see if any vertices of the given bodies contain it.
                 * 
                 * If no bodies are provided it will search all bodies in the Matter World, including within Composites.
                 * 
                 * The coordinates should be transformed into the Matter World coordinate system in advance. This happens by
                 * default with Input Pointers, but if you wish to use coordinates from another system you may need to
                 * transform them before passing them.
                 * @param x The horizontal coordinate of the point.
                 * @param y The vertical coordinate of the point.
                 * @param bodies An array of bodies to check. If not provided it will search all bodies in the world.
                 * @returns An array of bodies which contain the given point.
                 */
                intersectPoint(x: number, y: number, bodies?: Phaser.Types.Physics.Matter.MatterBody[]): Phaser.Types.Physics.Matter.MatterBody[];

                /**
                 * Checks the given rectangular area to see if any vertices of the given bodies intersect with it.
                 * Or, if the `outside` parameter is set to `true`, it checks to see which bodies do not
                 * intersect with it.
                 * 
                 * If no bodies are provided it will search all bodies in the Matter World, including within Composites.
                 * @param x The horizontal coordinate of the top-left of the area.
                 * @param y The vertical coordinate of the top-left of the area.
                 * @param width The width of the area.
                 * @param height The height of the area.
                 * @param outside If `false` it checks for vertices inside the area, if `true` it checks for vertices outside the area. Default false.
                 * @param bodies An array of bodies to check. If not provided it will search all bodies in the world.
                 * @returns An array of bodies that intersect with the given area.
                 */
                intersectRect(x: number, y: number, width: number, height: number, outside?: boolean, bodies?: Phaser.Types.Physics.Matter.MatterBody[]): Phaser.Types.Physics.Matter.MatterBody[];

                /**
                 * Checks the given ray segment to see if any vertices of the given bodies intersect with it.
                 * 
                 * If no bodies are provided it will search all bodies in the Matter World.
                 * 
                 * The width of the ray can be specified via the `rayWidth` parameter.
                 * @param x1 The horizontal coordinate of the start of the ray segment.
                 * @param y1 The vertical coordinate of the start of the ray segment.
                 * @param x2 The horizontal coordinate of the end of the ray segment.
                 * @param y2 The vertical coordinate of the end of the ray segment.
                 * @param rayWidth The width of the ray segment. Default 1.
                 * @param bodies An array of bodies to check. If not provided it will search all bodies in the world.
                 * @returns An array of bodies whose vertices intersect with the ray segment.
                 */
                intersectRay(x1: number, y1: number, x2: number, y2: number, rayWidth?: number, bodies?: Phaser.Types.Physics.Matter.MatterBody[]): Phaser.Types.Physics.Matter.MatterBody[];

                /**
                 * Checks the given Matter Body to see if it intersects with any of the given bodies.
                 * 
                 * If no bodies are provided it will check against all bodies in the Matter World.
                 * @param body The target body.
                 * @param bodies An array of bodies to check the target body against. If not provided it will search all bodies in the world.
                 * @returns An array of bodies whose vertices intersect with the target body.
                 */
                intersectBody(body: Phaser.Types.Physics.Matter.MatterBody, bodies?: Phaser.Types.Physics.Matter.MatterBody[]): Phaser.Types.Physics.Matter.MatterBody[];

                /**
                 * Checks to see if the target body, or an array of target bodies, intersects with any of the given bodies.
                 * 
                 * If intersection occurs this method will return `true` and, if provided, invoke the callbacks.
                 * 
                 * If no bodies are provided for the second parameter the target will check against all bodies in the Matter World.
                 * 
                 * **Note that bodies can only overlap if they are in non-colliding collision groups or categories.**
                 * 
                 * If you provide a `processCallback` then the two bodies that overlap are sent to it. This callback
                 * must return a boolean and is used to allow you to perform additional processing tests before a final
                 * outcome is decided. If it returns `true` then the bodies are finally passed to the `overlapCallback`, if set.
                 * 
                 * If you provide an `overlapCallback` then the matching pairs of overlapping bodies will be sent to it.
                 * 
                 * Both callbacks have the following signature: `function (bodyA, bodyB, collisionInfo)` where `bodyA` is always
                 * the target body. The `collisionInfo` object contains additional data, such as the angle and depth of penetration.
                 * @param target The target body, or array of target bodies, to check.
                 * @param bodies The second body, or array of bodies, to check. If falsey it will check against all bodies in the world.
                 * @param overlapCallback An optional callback function that is called if the bodies overlap.
                 * @param processCallback An optional callback function that lets you perform additional checks against the two bodies if they overlap. If this is set then `overlapCallback` will only be invoked if this callback returns `true`.
                 * @param callbackContext The context, or scope, in which to run the callbacks.
                 * @returns `true` if the target body intersects with _any_ of the bodies given, otherwise `false`.
                 */
                overlap(target: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], bodies?: Phaser.Types.Physics.Matter.MatterBody[], overlapCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, processCallback?: Phaser.Types.Physics.Arcade.ArcadePhysicsCallback, callbackContext?: any): boolean;

                /**
                 * Sets the collision filter category of all given Matter Bodies to the given value.
                 * 
                 * This number must be a power of two between 2^0 (= 1) and 2^31.
                 * 
                 * Bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision
                 * categories are included in their collision masks (see {@link #setCollidesWith}).
                 * @param bodies An array of bodies to update. If falsey it will use all bodies in the world.
                 * @param value Unique category bitfield.
                 * @returns This Matter Physics instance.
                 */
                setCollisionCategory(bodies: Phaser.Types.Physics.Matter.MatterBody[], value: number): this;

                /**
                 * Sets the collision filter group of all given Matter Bodies to the given value.
                 * 
                 * If the group value is zero, or if two Matter Bodies have different group values,
                 * they will collide according to the usual collision filter rules (see {@link #setCollisionCategory} and {@link #setCollidesWith}).
                 * 
                 * If two Matter Bodies have the same positive group value, they will always collide;
                 * if they have the same negative group value they will never collide.
                 * @param bodies An array of bodies to update. If falsey it will use all bodies in the world.
                 * @param value Unique group index.
                 * @returns This Matter Physics instance.
                 */
                setCollisionGroup(bodies: Phaser.Types.Physics.Matter.MatterBody[], value: number): this;

                /**
                 * Sets the collision filter mask of all given Matter Bodies to the given value.
                 * 
                 * Two Matter Bodies with different collision groups will only collide if each one includes the others
                 * category in its mask based on a bitwise AND operation: `(categoryA & maskB) !== 0` and
                 * `(categoryB & maskA) !== 0` are both true.
                 * @param bodies An array of bodies to update. If falsey it will use all bodies in the world.
                 * @param categories A unique category bitfield, or an array of them.
                 * @returns This Matter Physics instance.
                 */
                setCollidesWith(bodies: Phaser.Types.Physics.Matter.MatterBody[], categories: number | number[]): this;

                /**
                 * Takes an array and returns a new array made from all of the Matter Bodies found in the original array.
                 * 
                 * For example, passing in Matter Game Objects, such as a bunch of Matter Sprites, to this method, would
                 * return an array containing all of their native Matter Body objects.
                 * 
                 * If the `bodies` argument is falsey, it will return all bodies in the world.
                 * @param bodies An array of objects to extract the bodies from. If falsey, it will return all bodies in the world.
                 * @returns An array of native Matter Body objects.
                 */
                getMatterBodies(bodies?: any[]): MatterJS.BodyType[];

                /**
                 * Sets both the horizontal and vertical linear velocity of the physics bodies.
                 * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world.
                 * @param x The horizontal linear velocity value.
                 * @param y The vertical linear velocity value.
                 * @returns This Matter Physics instance.
                 */
                setVelocity(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], x: number, y: number): this;

                /**
                 * Sets just the horizontal linear velocity of the physics bodies.
                 * The vertical velocity of the body is unchanged.
                 * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world.
                 * @param x The horizontal linear velocity value.
                 * @returns This Matter Physics instance.
                 */
                setVelocityX(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], x: number): this;

                /**
                 * Sets just the vertical linear velocity of the physics bodies.
                 * The horizontal velocity of the body is unchanged.
                 * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world.
                 * @param y The vertical linear velocity value.
                 * @returns This Matter Physics instance.
                 */
                setVelocityY(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], y: number): this;

                /**
                 * Sets the angular velocity of the bodies instantly.
                 * Position, angle, force etc. are unchanged.
                 * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world.
                 * @param value The angular velocity.
                 * @returns This Matter Physics instance.
                 */
                setAngularVelocity(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], value: number): this;

                /**
                 * Applies a force to a body, at the bodies current position, including resulting torque.
                 * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world.
                 * @param force A Vector that specifies the force to apply.
                 * @returns This Matter Physics instance.
                 */
                applyForce(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], force: Phaser.Types.Math.Vector2Like): this;

                /**
                 * Applies a force to a body, from the given world position, including resulting torque.
                 * If no angle is given, the current body angle is used.
                 * 
                 * Use very small speed values, such as 0.1, depending on the mass and required velocity.
                 * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world.
                 * @param position A Vector that specifies the world-space position to apply the force at.
                 * @param speed A speed value to be applied to a directional force.
                 * @param angle The angle, in radians, to apply the force from. Leave undefined to use the current body angle.
                 * @returns This Matter Physics instance.
                 */
                applyForceFromPosition(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], position: Phaser.Types.Math.Vector2Like, speed: number, angle?: number): this;

                /**
                 * Apply a force to a body based on the given angle and speed.
                 * If no angle is given, the current body angle is used.
                 * 
                 * Use very small speed values, such as 0.1, depending on the mass and required velocity.
                 * @param bodies Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world.
                 * @param speed A speed value to be applied to a directional force.
                 * @param angle The angle, in radians, to apply the force from. Leave undefined to use the current body angle.
                 * @returns This Matter Physics instance.
                 */
                applyForceFromAngle(bodies: Phaser.Types.Physics.Matter.MatterBody | Phaser.Types.Physics.Matter.MatterBody[], speed: number, angle?: number): this;

                /**
                 * Returns the length of the given constraint, which is the distance between the two points.
                 * @param constraint The constraint to get the length from.
                 * @returns The length of the constraint.
                 */
                getConstraintLength(constraint: MatterJS.ConstraintType): number;

                /**
                 * Aligns a Body, or Matter Game Object, against the given coordinates.
                 * 
                 * The alignment takes place using the body bounds, which take into consideration things
                 * like body scale and rotation.
                 * 
                 * Although a Body has a `position` property, it is based on the center of mass for the body,
                 * not a dimension based center. This makes aligning bodies difficult, especially if they have
                 * rotated or scaled. This method will derive the correct position based on the body bounds and
                 * its center of mass offset, in order to align the body with the given coordinate.
                 * 
                 * For example, if you wanted to align a body so it sat in the bottom-center of the
                 * Scene, and the world was 800 x 600 in size:
                 * 
                 * ```javascript
                 * this.matter.alignBody(body, 400, 600, Phaser.Display.Align.BOTTOM_CENTER);
                 * ```
                 * 
                 * You pass in 400 for the x coordinate, because that is the center of the world, and 600 for
                 * the y coordinate, as that is the base of the world.
                 * @param body The Body to align.
                 * @param x The horizontal position to align the body to.
                 * @param y The vertical position to align the body to.
                 * @param align One of the `Phaser.Display.Align` constants, such as `Phaser.Display.Align.TOP_LEFT`.
                 * @returns This Matter Physics instance.
                 */
                alignBody(body: Phaser.Types.Physics.Matter.MatterBody, x: number, y: number, align: number): this;

            }

            /**
             * A Matter Physics Sprite Game Object.
             * 
             * This is a Sprite that has been enabled for use with the Matter.js physics engine. It combines
             * the full rendering and animation capabilities of a standard Phaser Sprite with a Matter.js
             * physics body, allowing it to participate in complex physics simulations including polygon
             * collisions, joints, springs, and constraints.
             * 
             * Unlike Arcade Physics, which uses simple axis-aligned bounding boxes or circles, Matter.js
             * supports arbitrary convex and concave polygon shapes, compound bodies, and realistic rigid-body
             * dynamics. Use this class when you need that level of physics fidelity for an animated Game Object.
             * 
             * On construction a rectangular body matching the sprite's frame dimensions is created by default.
             * You can override this by providing a `shape` property in the `options` configuration object,
             * or by calling one of the `setBody`, `setRectangle`, `setCircle`, `setPolygon`, or `setTrapezoid`
             * methods after creation.
             * 
             * A Sprite Game Object is used for the display of both static and animated images in your game.
             * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled
             * and animated.
             * 
             * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.
             * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation
             * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.
             */
            class Sprite extends Phaser.GameObjects.Sprite implements Phaser.Physics.Matter.Components.Bounce, Phaser.Physics.Matter.Components.Collision, Phaser.Physics.Matter.Components.Force, Phaser.Physics.Matter.Components.Friction, Phaser.Physics.Matter.Components.Gravity, Phaser.Physics.Matter.Components.Mass, Phaser.Physics.Matter.Components.Sensor, Phaser.Physics.Matter.Components.SetBody, Phaser.Physics.Matter.Components.Sleep, Phaser.Physics.Matter.Components.Static, Phaser.Physics.Matter.Components.Transform, Phaser.Physics.Matter.Components.Velocity, Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Size, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Tint, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible {
                /**
                 * 
                 * @param world A reference to the Matter.World instance that this body belongs to.
                 * @param x The horizontal position of this Game Object in the world.
                 * @param y The vertical position of this Game Object in the world.
                 * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
                 * @param frame An optional frame from the Texture this Game Object is rendering with.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 */
                constructor(world: Phaser.Physics.Matter.World, x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig);

                /**
                 * A reference to the Matter.World instance that this body belongs to.
                 */
                world: Phaser.Physics.Matter.World;

                /**
                 * The Camera used for filters.
                 * You can use this to alter the perspective of filters.
                 * It is not necessary to use this camera for ordinary rendering.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                filterCamera: Phaser.Cameras.Scene2D.Camera;

                /**
                 * The filter lists for this Game Object.
                 * This is an object with `internal` and `external` properties.
                 * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
                 * 
                 * This is only available if you use the `enableFilters` method.
                 */
                readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

                /**
                 * Whether any filters should be rendered on this Game Object.
                 * This is `true` by default, even if there are no filters yet.
                 * Disable this to skip filter rendering.
                 * 
                 * Use `willRenderFilters()` to see if there are any active filters.
                 */
                renderFilters: boolean;

                /**
                 * The maximum size of the base filter texture.
                 * Filters may use a larger texture after the base texture is rendered.
                 * The maximum texture size is at least 4096 in WebGL, based on the hardware.
                 * You may set this lower to save memory or prevent resizing.
                 */
                maxFilterSize: Phaser.Math.Vector2;

                /**
                 * Whether `filterCamera` should update every frame
                 * to focus on the Game Object.
                 * Disable this if you want to manually control the camera.
                 */
                filtersAutoFocus: boolean;

                /**
                 * Whether the filters should focus on the context,
                 * rather than attempt to focus on the Game Object.
                 * This is enabled automatically when enabling filters on objects
                 * which don't have well-defined bounds.
                 * 
                 * This effectively sets the internal filters to render the same way
                 * as the external filters.
                 * 
                 * This is only used if `filtersAutoFocus` is enabled.
                 * 
                 * The "context" is the framebuffer to which the Game Object is rendered.
                 * This is usually the main framebuffer, but might be another framebuffer.
                 * It can even be several different framebuffers if the Game Object is
                 * rendered multiple times.
                 */
                filtersFocusContext: boolean;

                /**
                 * Whether the Filters component should always draw to a framebuffer,
                 * even if there are no active filters.
                 */
                filtersForceComposite: boolean;

                /**
                 * Whether this Game Object will render filters.
                 * This is true if it has active filters,
                 * and if the `renderFilters` property is also true.undefined
                 * @returns Whether the Game Object will render filters.
                 */
                willRenderFilters(): boolean;

                /**
                 * Enable this Game Object to have filters.
                 * 
                 * You need to call this method if you want to use the `filterCamera`
                 * and `filters` properties. It sets up the necessary data structures.
                 * You may disable filter rendering with the `renderFilters` property.
                 * 
                 * This is a WebGL only feature. It will return early if not available.undefined
                 * @returns undefined
                 */
                enableFilters(): this;

                /**
                 * Render this object using filters.
                 * 
                 * This function's scope is not guaranteed, so it doesn't refer to `this`.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
                 * @returns undefined
                 */
                renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

                /**
                 * Focus the filter camera.
                 * This sets the size and position of the filter camera to match the GameObject.
                 * This is called automatically on render if `filtersAutoFocus` is enabled.
                 * 
                 * This will focus on the GameObject's raw dimensions if available.
                 * If the GameObject has no dimensions, this will focus on the context:
                 * the camera belonging to the DrawingContext used to render the GameObject.
                 * Context focus occurs during rendering,
                 * as the context is not known until then.undefined
                 * @returns undefined
                 */
                focusFilters(): this;

                /**
                 * Focus the filter camera on a specific camera.
                 * This is used internally when `filtersFocusContext` is enabled.
                 * @param camera The camera to focus on.
                 * @returns undefined
                 */
                focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

                /**
                 * Manually override the focus of the filter camera.
                 * This allows you to set the size and position of the filter camera manually.
                 * It deactivates `filtersAutoFocus` when called.
                 * 
                 * The camera will set scroll to place the game object at the
                 * given position within a rectangle of the given width and height.
                 * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
                 * will focus the camera to place the object's center
                 * 100 pixels above the center of the camera (which is at 400x300).
                 * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
                 * @param width The width of the focus area. Default is the filter width.
                 * @param height The height of the focus area. Default is the filter height.
                 * @returns undefined
                 */
                focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Set the base size of the filter camera.
                 * This is the size of the texture that internal filters will be drawn to.
                 * External filters are drawn to the size of the context (usually the game canvas).
                 * 
                 * This is typically the size of the GameObject.
                 * It is set automatically when the Game Object is rendered
                 * and `filtersAutoFocus` is enabled.
                 * Turn off auto focus to set it manually.
                 * 
                 * Technically, larger framebuffers may be used to provide padding.
                 * This is the size of the final framebuffer used for "internal" rendering.
                 * @param width Base width of the filter texture.
                 * @param height Base height of the filter texture.
                 * @returns undefined
                 */
                setFilterSize(width: number, height: number): this;

                /**
                 * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
                 * Sets the `filtersAutoFocus` property.
                 * @param value Whether filters should be updated every frame.
                 * @returns undefined
                 */
                setFiltersAutoFocus(value: boolean): this;

                /**
                 * Set whether the filters should focus on the context.
                 * Sets the `filtersFocusContext` property.
                 * @param value Whether the filters should focus on the context.
                 * @returns undefined
                 */
                setFiltersFocusContext(value: boolean): this;

                /**
                 * Set whether the filters should always draw to a framebuffer.
                 * Sets the `filtersForceComposite` property.
                 * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
                 * @returns undefined
                 */
                setFiltersForceComposite(value: boolean): this;

                /**
                 * Set whether the filters should be rendered.
                 * Sets the `renderFilters` property.
                 * @param value Whether the filters should be rendered.
                 * @returns undefined
                 */
                setRenderFilters(value: boolean): this;

                /**
                 * Run a step in the render process.
                 * This is called automatically by the Render module.
                 * 
                 * In most cases, it just runs the `renderWebGL` function.
                 * 
                 * When `_renderSteps` has more than one entry,
                 * such as when Filters are enabled for this object,
                 * it allows those processes to defer `renderWebGL`
                 * and otherwise manage the flow of rendering.
                 * @param renderer The WebGL Renderer instance to render with.
                 * @param gameObject The Game Object being rendered.
                 * @param drawingContext The current drawing context.
                 * @param parentMatrix The parent matrix of the Game Object, if it has one.
                 * @param renderStep Which step of the rendering process should be run? Default 0.
                 * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
                 * @param displayListIndex The index of the Game Object within the display list. Default 0.
                 */
                renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

                /**
                 * Adds a render step function to this Game Object's WebGL render pipeline.
                 * 
                 * The first render step in `_renderSteps` is run first.
                 * It should call the next render step in the list.
                 * This allows render steps to control the rendering flow.
                 * @param fn The render step function to add.
                 * @param index The index in the render list to add the step to. Omit to add to the end.
                 * @returns This Game Object instance.
                 */
                addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

                /**
                 * Clears all alpha values associated with this Game Object.
                 * 
                 * Immediately sets the alpha levels back to 1 (fully opaque).undefined
                 * @returns This Game Object instance.
                 */
                clearAlpha(): this;

                /**
                 * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
                 * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
                 * 
                 * If your game is running under WebGL you can optionally specify four different alpha values, each of which
                 * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
                 * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
                 * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
                 * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
                 * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
                 * @returns This Game Object instance.
                 */
                setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

                /**
                 * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
                 * 
                 * This is a global value that impacts the entire Game Object. Setting it also updates
                 * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
                 * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
                 */
                alpha: number;

                /**
                 * The alpha value starting from the top-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopLeft: number;

                /**
                 * The alpha value starting from the top-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaTopRight: number;

                /**
                 * The alpha value starting from the bottom-left of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomLeft: number;

                /**
                 * The alpha value starting from the bottom-right of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 */
                alphaBottomRight: number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 */
                blendMode: Phaser.BlendModes | string | number;

                /**
                 * Sets the Blend Mode being used by this Game Object.
                 * 
                 * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
                 * 
                 * Under WebGL only the following Blend Modes are available:
                 * 
                 * * NORMAL
                 * * ADD
                 * * MULTIPLY
                 * * SCREEN
                 * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
                 * 
                 * Canvas has more available depending on browser support.
                 * 
                 * You can also create your own custom Blend Modes in WebGL.
                 * 
                 * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
                 * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
                 * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
                 * are used.
                 * @param value The BlendMode value. Either a string, a CONST or a number.
                 * @returns This Game Object instance.
                 */
                setBlendMode(value: string | Phaser.BlendModes | number): this;

                /**
                 * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * The default depth is zero. A Game Object with a higher depth
                 * value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 */
                depth: number;

                /**
                 * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
                 * 
                 * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
                 * of Game Objects, without actually moving their position in the display list.
                 * 
                 * A Game Object with a higher depth value will always render in front of one with a lower value.
                 * 
                 * Setting the depth will queue a depth sort event within the Scene.
                 * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
                 * @returns This Game Object instance.
                 */
                setDepth(value: number): this;

                /**
                 * Sets this Game Object to be at the top of the display list, or the top of its parent container.
                 * 
                 * Being at the top means it will render on top of everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToTop(): this;

                /**
                 * Sets this Game Object to the back of the display list, or the back of its parent container.
                 * 
                 * Being at the back means it will render below everything else.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
                 * @returns This Game Object instance.
                 */
                setToBack(): this;

                /**
                 * Move this Game Object so that it appears above the given Game Object.
                 * 
                 * This means it will render immediately after the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be above.
                 * @returns This Game Object instance.
                 */
                setAbove(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * Move this Game Object so that it appears below the given Game Object.
                 * 
                 * This means it will render immediately under the other object in the display list.
                 * 
                 * Both objects must belong to the same display list, or parent container.
                 * 
                 * This method does not change this Game Objects `depth` value, it simply alters its list position.
                 * @param gameObject The Game Object that this Game Object will be moved to be below.
                 * @returns This Game Object instance.
                 */
                setBelow(gameObject: Phaser.GameObjects.GameObject): this;

                /**
                 * The horizontally flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipX: boolean;

                /**
                 * The vertically flipped state of the Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 */
                flipY: boolean;

                /**
                 * Toggles the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipX(): this;

                /**
                 * Toggles the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
                 * @returns This Game Object instance.
                 */
                toggleFlipY(): this;

                /**
                 * Sets the horizontal flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipX(value: boolean): this;

                /**
                 * Sets the vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped vertically will render inverted on the vertical axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param value The flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlipY(value: boolean): this;

                /**
                 * Sets the horizontal and vertical flipped state of this Game Object.
                 * 
                 * A Game Object that is flipped will render inverted on the flipped axis.
                 * Flipping always takes place from the middle of the texture and does not impact the scale value.
                 * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
                 * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
                 * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
                 * @returns This Game Object instance.
                 */
                setFlip(x: boolean, y: boolean): this;

                /**
                 * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
                 * @returns This Game Object instance.
                 */
                resetFlip(): this;

                /**
                 * Gets the center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the top-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the left-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the right-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-center coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
                 * 
                 * The returned point is calculated in local space and does not factor in any parent Containers,
                 * unless the `includeParent` argument is set to `true`.
                 * @param output An object to store the values in. If not provided a new Vector2 will be created.
                 * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
                 * @returns The values stored in the output object.
                 */
                getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

                /**
                 * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
                 * 
                 * The bounding rectangle is computed by retrieving all four corner positions of the
                 * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
                 * and parent Container transforms, and then calculating the smallest axis-aligned
                 * rectangle that fully encloses all four points.
                 * 
                 * The values are stored and returned in a Rectangle, or Rectangle-like, object.
                 * @param output An object to store the values in. If not provided a new Rectangle will be created.
                 * @returns The values stored in the output object.
                 */
                getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

                /**
                 * Controls whether this Game Object participates in the WebGL lighting system.
                 * When `true`, the object will respond to dynamic lights added via the Lights plugin,
                 * using normal maps to calculate per-pixel diffuse lighting.
                 * 
                 * This flag is used to select the appropriate WebGL shader at render time.
                 */
                readonly lighting: boolean;

                /**
                 * Configuration object controlling self-shadowing for this Game Object.
                 * Self-shadowing causes surfaces to cast contact shadows on themselves based on
                 * the normal map, giving the appearance of depth. It is only active when
                 * `lighting` is also enabled.
                 * 
                 * If `enabled` is `null`, the value from the game config option `render.selfShadow`
                 * is used instead.
                 * 
                 * This object is used to select and configure the appropriate WebGL shader at render time.
                 */
                selfShadow: Object;

                /**
                 * Enables or disables WebGL-based per-pixel lighting for this Game Object.
                 * When enabled, the object will respond to dynamic lights added to the scene
                 * via the Lights plugin, using a normal map for lighting calculations.
                 * Disabling lighting restores the standard unlit rendering path.
                 * @param enable `true` to use lighting, or `false` to disable it.
                 * @returns This GameObject instance.
                 */
                setLighting(enable: boolean): this;

                /**
                 * Configures the self-shadowing properties of this Game Object.
                 * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
                 * giving the impression of depth and raised detail. It is only active when
                 * `lighting` is also enabled on this Game Object.
                 * 
                 * Parameters that are `undefined` are left unchanged, allowing partial updates.
                 * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
                 * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
                 * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
                 * @returns This GameObject instance.
                 */
                setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

                /**
                 * The Mask this Game Object is using during render, or `null` if no mask has been set.
                 */
                mask: Phaser.Display.Masks.GeometryMask;

                /**
                 * Sets the mask that this Game Object will use to render with.
                 * 
                 * The mask must have been previously created and must be a GeometryMask.
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * 
                 * If a mask is already set on this Game Object it will be immediately replaced.
                 * 
                 * Masks are positioned in global space and are not relative to the Game Object to which they
                 * are applied. The reason for this is that multiple Game Objects can all share the same mask.
                 * 
                 * Masks have no impact on physics or input detection. They are purely a rendering component
                 * that allows you to limit what is visible during the render pass.
                 * @param mask The mask this Game Object will use when rendering.
                 * @returns This Game Object instance.
                 */
                setMask(mask: Phaser.Display.Masks.GeometryMask): this;

                /**
                 * Clears the mask that this Game Object was using.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param destroyMask Destroy the mask before clearing it? Default false.
                 * @returns This Game Object instance.
                 */
                clearMask(destroyMask?: boolean): this;

                /**
                 * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
                 * including this one.
                 * 
                 * To create the mask you need to pass in a reference to a Graphics Game Object.
                 * 
                 * If you do not provide a graphics object, and this Game Object is an instance
                 * of a Graphics object, then it will use itself to create the mask.
                 * 
                 * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
                 * 
                 * This only works in the Canvas Renderer.
                 * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
                 * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
                 * @returns This Geometry Mask that was created.
                 */
                createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

                /**
                 * The horizontal origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the left of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originX: number;

                /**
                 * The vertical origin of this Game Object.
                 * The origin maps the relationship between the size and position of the Game Object.
                 * The default value is 0.5, meaning all Game Objects are positioned based on their center.
                 * Setting the value to 0 means the position now relates to the top of the Game Object.
                 * Set this value with `setOrigin()`.
                 */
                originY: number;

                /**
                 * The horizontal display origin of this Game Object, expressed in pixels.
                 * Unlike `originX`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's width multiplied by its `originX` value.
                 * Setting this property updates `originX` accordingly.
                 */
                displayOriginX: number;

                /**
                 * The vertical display origin of this Game Object, expressed in pixels.
                 * Unlike `originY`, which is a normalized value between 0 and 1, the display origin is the
                 * calculated pixel offset derived from the Game Object's height multiplied by its `originY` value.
                 * Setting this property updates `originY` accordingly.
                 */
                displayOriginY: number;

                /**
                 * Sets the origin of this Game Object.
                 * 
                 * The values are given in the range 0 to 1.
                 * @param x The horizontal origin value. Default 0.5.
                 * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setOrigin(x?: number, y?: number): this;

                /**
                 * Sets the origin of this Game Object based on the Pivot values in its Frame.
                 * If the Frame has a custom pivot point defined, the origin is set to match it.
                 * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
                 * resetting the origin to the default value of 0.5 for both axes.undefined
                 * @returns This Game Object instance.
                 */
                setOriginFromFrame(): this;

                /**
                 * Sets the display origin of this Game Object.
                 * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
                 * @param x The horizontal display origin value. Default 0.
                 * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
                 * @returns This Game Object instance.
                 */
                setDisplayOrigin(x?: number, y?: number): this;

                /**
                 * Updates the Display Origin cached values internally stored on this Game Object.
                 * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
                 * @returns This Game Object instance.
                 */
                updateDisplayOrigin(): this;

                /**
                 * Customized WebGL render nodes of this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * A default set of RenderNodes is coded into the engine,
                 * but the renderer will check this object first to see if a custom node has been set.
                 */
                customRenderNodes: object;

                /**
                 * The default RenderNodes for this Game Object.
                 * RenderNodes are responsible for managing the rendering process of this Game Object.
                 * These are the nodes that are used if no custom ones are set.
                 * 
                 * RenderNodes are identified by a unique key for their role.
                 * 
                 * Common role keys include:
                 * 
                 * - 'Submitter': responsible for running other node roles for each element.
                 * - 'Transformer': responsible for providing vertex coordinates for an element.
                 * - 'Texturer': responsible for handling textures for an element.
                 */
                defaultRenderNodes: object;

                /**
                 * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * 
                 * Render nodes store their data under their own name, not their role.
                 */
                renderNodeData: object;

                /**
                 * Initializes the render nodes for this Game Object.
                 * 
                 * This method is called when the Game Object is added to the Scene.
                 * It is responsible for setting up the default render nodes
                 * this Game Object will use.
                 * @param defaultNodes The default render nodes to set for this Game Object.
                 */
                initRenderNodes(defaultNodes: Map<string, string>): void;

                /**
                 * Sets the RenderNode for a given role.
                 * 
                 * Also sets the relevant render node data object, if specified.
                 * 
                 * If the node cannot be set, no changes are made.
                 * @param key The key of the role to set the render node for.
                 * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
                 * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
                 * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
                 * @returns This Game Object instance.
                 */
                setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

                /**
                 * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
                 * 
                 * If `key` is not set, it is created. If it is set, it is updated.
                 * 
                 * If `value` is undefined and `key` exists, the key is removed.
                 * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
                 * @param key The key of the property to set.
                 * @param value The value to set the property to.
                 * @returns This Game Object instance.
                 */
                setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

                /**
                 * The horizontal scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorX: number;

                /**
                 * The vertical scroll factor of this Game Object.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 */
                scrollFactorY: number;

                /**
                 * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
                 * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
                 * and `scrollFactorY` in a single call.
                 * 
                 * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
                 * 
                 * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
                 * It does not change the Game Objects actual position values.
                 * 
                 * A value of 1 means it will move exactly in sync with a camera.
                 * A value of 0 means it will not move at all, even if the camera moves.
                 * Other values control the degree to which the camera movement is mapped to this Game Object.
                 * 
                 * Please be aware that scroll factor values other than 1 are not taken into consideration when
                 * calculating physics collisions. Bodies always collide based on their world position, but changing
                 * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
                 * them from physics bodies if not accounted for in your code.
                 * @param x The horizontal scroll factor of this Game Object.
                 * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScrollFactor(x: number, y?: number): this;

                /**
                 * The native (un-scaled) width of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayWidth` property.
                 */
                width: number;

                /**
                 * The native (un-scaled) height of this Game Object.
                 * 
                 * Changing this value will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or use
                 * the `displayHeight` property.
                 */
                height: number;

                /**
                 * The displayed width of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayWidth: number;

                /**
                 * The displayed height of this Game Object.
                 * 
                 * This value takes into account the scale factor.
                 * 
                 * Setting this value will adjust the Game Object's scale property.
                 */
                displayHeight: number;

                /**
                 * Sets the size of this Game Object to be that of the given Frame.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param frame The frame to base the size of this Game Object on.
                 * @returns This Game Object instance.
                 */
                setSizeToFrame(frame?: Phaser.Textures.Frame | boolean): this;

                /**
                 * Sets the internal size of this Game Object, as used for frame or physics body creation.
                 * 
                 * This will not change the size that the Game Object is rendered in-game.
                 * For that you need to either set the scale of the Game Object (`setScale`) or call the
                 * `setDisplaySize` method, which is the same thing as changing the scale but allows you
                 * to do so by giving pixel values.
                 * 
                 * If you have enabled this Game Object for input, changing the size will _not_ change the
                 * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setSize(width: number, height: number): this;

                /**
                 * Sets the display (rendered) size of this Game Object in pixels.
                 * 
                 * Unlike `setSize`, which changes the native logical dimensions without affecting rendering,
                 * this method adjusts the `scaleX` and `scaleY` properties so that the Game Object appears
                 * at exactly the given pixel dimensions in-game. It is equivalent to calculating and setting
                 * the scale manually, but more convenient when you want to work in pixel values directly.
                 * @param width The width of this Game Object.
                 * @param height The height of this Game Object.
                 * @returns This Game Object instance.
                 */
                setDisplaySize(width: number, height: number): this;

                /**
                 * The Texture this Game Object is using to render with.
                 */
                texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture;

                /**
                 * The Texture Frame this Game Object is using to render with.
                 */
                frame: Phaser.Textures.Frame;

                /**
                 * A boolean flag indicating if this Game Object is being cropped or not.
                 * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.
                 * Equally, calling `setCrop` with no arguments will reset the crop and disable it.
                 */
                isCropped: boolean;

                /**
                 * Applies a crop to a texture based Game Object, such as a Sprite or Image.
                 * 
                 * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.
                 * 
                 * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just
                 * changes what is shown when rendered.
                 * 
                 * The crop size as well as coordinates can not exceed the size of the texture frame.
                 * 
                 * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.
                 * 
                 * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left
                 * half of it, you could call `setCrop(0, 0, 400, 600)`.
                 * 
                 * It is also scaled to match the Game Object scale automatically. Therefore a crop rectangle of 100x50 would crop
                 * an area of 200x100 when applied to a Game Object that had a scale factor of 2.
                 * 
                 * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.
                 * 
                 * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.
                 * 
                 * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow
                 * the renderer to skip several internal calculations.
                 * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.
                 * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
                 * @param width The width of the crop rectangle in pixels. Cannot exceed the Frame width.
                 * @param height The height of the crop rectangle in pixels. Cannot exceed the Frame height.
                 * @returns This Game Object instance.
                 */
                setCrop(x?: number | Phaser.Geom.Rectangle, y?: number, width?: number, height?: number): this;

                /**
                 * Sets the texture and frame this Game Object will use to render with.
                 * 
                 * Textures are referenced by their string-based keys, as stored in the Texture Manager.
                 * @param key The key of the texture to be used, as stored in the Texture Manager.
                 * @param frame The name or index of the frame within the Texture.
                 * @returns This Game Object instance.
                 */
                setTexture(key: string, frame?: string | number): this;

                /**
                 * Sets the frame this Game Object will use to render with.
                 * 
                 * If you pass a string or index then the Frame has to belong to the current Texture being used
                 * by this Game Object.
                 * 
                 * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.
                 * 
                 * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
                 * 
                 * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
                 * @param frame The name or index of the frame within the Texture, or a Frame instance.
                 * @param updateSize Should this call adjust the size of the Game Object? Default true.
                 * @param updateOrigin Should this call adjust the origin of the Game Object? Default true.
                 * @returns This Game Object instance.
                 */
                setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this;

                /**
                 * The tint value being applied to the top-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopLeft: number;

                /**
                 * The tint value being applied to the top-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintTopRight: number;

                /**
                 * The tint value being applied to the bottom-left vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomLeft: number;

                /**
                 * The tint value being applied to the bottom-right vertex of the Game Object.
                 * This value is interpolated from the corner to the center of the Game Object.
                 * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.
                 */
                tintBottomRight: number;

                /**
                 * The tint mode to use when applying the tint to the texture.
                 * 
                 * Available modes are:
                 * - Phaser.TintModes.MULTIPLY (default)
                 * - Phaser.TintModes.FILL
                 * - Phaser.TintModes.ADD
                 * - Phaser.TintModes.SCREEN
                 * - Phaser.TintModes.OVERLAY
                 * - Phaser.TintModes.HARD_LIGHT
                 * 
                 * Note that in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 */
                tintMode: Phaser.TintModes;

                /**
                 * Clears all tint values associated with this Game Object.
                 * 
                 * Immediately sets the color values back to 0xffffff and the tint mode to `MULTIPLY`,
                 * which results in no visible change to the texture.undefined
                 * @returns This Game Object instance.
                 */
                clearTint(): this;

                /**
                 * Sets the tint color on this Game Object.
                 * 
                 * The tint works by taking the pixel color values from the Game Objects texture, and then
                 * combining it with the color value of the tint. You can provide either one color value,
                 * in which case the whole Game Object will be tinted in that color. Or you can provide a color
                 * per corner. The colors are blended together across the extent of the Game Object.
                 * 
                 * To modify the tint color once set, either call this method again with new values or use the
                 * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight`,
                 * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.
                 * 
                 * To remove a tint call `clearTint`.
                 * 
                 * The tint color is combined according to the tint mode.
                 * By default, this is `MULTIPLY`.
                 * 
                 * Note that, in Phaser 3, this would also swap the tint mode if it was set
                 * to fill. In Phaser 4, the tint mode is separate: use `setTintMode`.
                 * @param topLeft The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. Default 0xffffff.
                 * @param topRight The tint being applied to the top-right of the Game Object.
                 * @param bottomLeft The tint being applied to the bottom-left of the Game Object.
                 * @param bottomRight The tint being applied to the bottom-right of the Game Object.
                 * @returns This Game Object instance.
                 */
                setTint(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

                /**
                 * Sets the tint mode to use when applying the tint to the texture.
                 * 
                 * Note that, in Phaser 3, tint mode and color were set at the same time.
                 * In Phaser 4 they are separate settings.
                 * @param mode The tint mode to use.
                 * @returns This Game Object instance.
                 */
                setTintMode(mode: number | Phaser.TintModes): this;

                /**
                 * Deprecated method which does nothing.
                 * In Phaser 3, this would set the tint color, and set the tint mode to fill.
                 * In Phaser 4, use `gameObject.setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.
                 */
                setTintFill(): void;

                /**
                 * The tint value being applied to the whole of the Game Object.
                 * Returns the value of `tintTopLeft` when read. When written, the same
                 * color value is applied to all four corner tint properties (`tintTopLeft`,
                 * `tintTopRight`, `tintBottomLeft`, and `tintBottomRight`) simultaneously.
                 */
                tint: number;

                /**
                 * Does this Game Object have a tint applied?
                 * 
                 * Returns `true` if any of the four corner tint values differ from 0xffffff,
                 * or if the `tintMode` property is set to anything other than `MULTIPLY`.
                 * Returns `false` when all four tint values are 0xffffff and the tint mode
                 * is `MULTIPLY`, which is the default untinted state.
                 */
                readonly isTinted: boolean;

                /**
                 * A property indicating that a Game Object has this component.
                 */
                readonly hasTransformComponent: boolean;

                /**
                 * The x position of this Game Object.
                 */
                x: number;

                /**
                 * The y position of this Game Object.
                 */
                y: number;

                /**
                 * The z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#depth} instead.
                 */
                z: number;

                /**
                 * The w position of this Game Object.
                 */
                w: number;

                /**
                 * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
                 * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
                 * 
                 * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
                 * isn't the case, use the `scaleX` or `scaleY` properties instead.
                 */
                scale: number;

                /**
                 * The horizontal scale of this Game Object.
                 */
                scaleX: number;

                /**
                 * The vertical scale of this Game Object.
                 */
                scaleY: number;

                /**
                 * The angle of this Game Object as expressed in degrees.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
                 * and -90 is up.
                 * 
                 * If you prefer to work in radians, see the `rotation` property instead.
                 */
                angle: number;

                /**
                 * The angle of this Game Object in radians.
                 * 
                 * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
                 * and -PI/2 is up.
                 * 
                 * If you prefer to work in degrees, see the `angle` property instead.
                 */
                rotation: number;

                /**
                 * Sets the position of this Game Object.
                 * @param x The x position of this Game Object. Default 0.
                 * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
                 * @param z The z position of this Game Object. Default 0.
                 * @param w The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setPosition(x?: number, y?: number, z?: number, w?: number): this;

                /**
                 * Copies an object's coordinates to this Game Object's position.
                 * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
                 * @returns This Game Object instance.
                 */
                copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

                /**
                 * Sets the position of this Game Object to be a random position within the confines of
                 * the given area.
                 * 
                 * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
                 * 
                 * The position does not factor in the size of this Game Object, meaning that only the origin is
                 * guaranteed to be within the area.
                 * @param x The x position of the top-left of the random area. Default 0.
                 * @param y The y position of the top-left of the random area. Default 0.
                 * @param width The width of the random area.
                 * @param height The height of the random area.
                 * @returns This Game Object instance.
                 */
                setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

                /**
                 * Sets the rotation of this Game Object.
                 * @param radians The rotation of this Game Object, in radians. Default 0.
                 * @returns This Game Object instance.
                 */
                setRotation(radians?: number): this;

                /**
                 * Sets the angle of this Game Object.
                 * @param degrees The rotation of this Game Object, in degrees. Default 0.
                 * @returns This Game Object instance.
                 */
                setAngle(degrees?: number): this;

                /**
                 * Sets the scale of this Game Object.
                 * @param x The horizontal scale of this Game Object. Default 1.
                 * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setScale(x?: number, y?: number): this;

                /**
                 * Sets the x position of this Game Object.
                 * @param value The x position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setX(value?: number): this;

                /**
                 * Sets the y position of this Game Object.
                 * @param value The y position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setY(value?: number): this;

                /**
                 * Sets the z position of this Game Object.
                 * 
                 * Note: The z position does not control the rendering order of 2D Game Objects. Use
                 * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
                 * @param value The z position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setZ(value?: number): this;

                /**
                 * Sets the w position of this Game Object.
                 * @param value The w position of this Game Object. Default 0.
                 * @returns This Game Object instance.
                 */
                setW(value?: number): this;

                /**
                 * Gets the local transform matrix for this Game Object.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @returns The populated Transform Matrix.
                 */
                getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
                 * @param tempMatrix The matrix to populate with the values from this Game Object.
                 * @param parentMatrix A temporary matrix to hold parent values during the calculations.
                 * @returns The populated Transform Matrix.
                 */
                getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

                /**
                 * Takes the given `x` and `y` coordinates and converts them into local space for this
                 * Game Object, taking into account parent and local transforms, and the Display Origin.
                 * 
                 * The returned Vector2 contains the translated point in its properties.
                 * 
                 * A Camera needs to be provided in order to handle modified scroll factors. If no
                 * camera is specified, it will use the `main` camera from the Scene to which this
                 * Game Object belongs.
                 * @param x The x position to translate.
                 * @param y The y position to translate.
                 * @param point A Vector2, or point-like object, to store the results in.
                 * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
                 * @returns The translated point.
                 */
                getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

                /**
                 * Gets the world position of this Game Object, factoring in any parent Containers.
                 * @param point A Vector2, or point-like object, to store the result in.
                 * @param tempMatrix A temporary matrix to hold the Game Object's values.
                 * @param parentMatrix A temporary matrix to hold parent values.
                 * @returns The world position of this Game Object.
                 */
                getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

                /**
                 * Gets the sum total rotation of all of this Game Object's parent Containers.
                 * 
                 * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
                 * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
                 */
                getParentRotation(): number;

                /**
                 * The visible state of the Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 */
                visible: boolean;

                /**
                 * Sets the visibility of this Game Object.
                 * 
                 * An invisible Game Object will skip rendering, but will still process update logic.
                 * @param value The visible state of the Game Object.
                 * @returns This Game Object instance.
                 */
                setVisible(value: boolean): this;

                /**
                 * Sets the restitution (bounciness) of this Game Object's Matter.js physics body.
                 * This controls how much of the body's kinetic energy is preserved after a collision.
                 * @param value A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)`
                 * @returns This Game Object instance.
                 */
                setBounce(value: number): this;

                /**
                 * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31.
                 * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision
                 * categories are included in their collision masks (see {@link #setCollidesWith}).
                 * @param value Unique category bitfield.
                 * @returns This Game Object instance.
                 */
                setCollisionCategory(value: number): this;

                /**
                 * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values,
                 * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollidesWith}).
                 * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value,
                 * they will never collide.
                 * @param value Unique group index.
                 * @returns This Game Object instance.
                 */
                setCollisionGroup(value: number): this;

                /**
                 * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only
                 * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0`
                 * and `(categoryB & maskA) !== 0` are both true.
                 * @param categories A unique category bitfield, or an array of them.
                 * @returns This Game Object instance.
                 */
                setCollidesWith(categories: number | number[]): this;

                /**
                 * Sets a callback to be invoked when this Game Object's Matter Body begins colliding with another body.
                 * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param callback The callback to invoke when this body starts colliding with another.
                 * @returns This Game Object instance.
                 */
                setOnCollide(callback: Function): this;

                /**
                 * Sets a callback to be invoked when this Game Object's Matter Body stops colliding with another body.
                 * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param callback The callback to invoke when this body stops colliding with another.
                 * @returns This Game Object instance.
                 */
                setOnCollideEnd(callback: Function): this;

                /**
                 * Sets a callback to be invoked each step while this Game Object's Matter Body is actively colliding with another body.
                 * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param callback The callback to invoke for the duration of this body colliding with another.
                 * @returns This Game Object instance.
                 */
                setOnCollideActive(callback: Function): this;

                /**
                 * Sets a callback to be invoked when this Game Object's Matter Body collides with a specific body or bodies.
                 * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param body The body, or an array of bodies, to test for collisions with.
                 * @param callback The callback to invoke when this body collides with the given body or bodies.
                 * @returns This Game Object instance.
                 */
                setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): this;

                /**
                 * Applies a force to a body at its current center of mass position.
                 * @param force A Vector that specifies the force to apply.
                 * @returns This Game Object instance.
                 */
                applyForce(force: Phaser.Math.Vector2): this;

                /**
                 * Applies a force to a body from a given position.
                 * @param position The position in which the force comes from.
                 * @param force A Vector that specifies the force to apply.
                 * @returns This Game Object instance.
                 */
                applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): this;

                /**
                 * Apply thrust in the forward direction of the body.
                 * 
                 * Use very small values, such as 0.1, depending on the mass and required speed.
                 * @param speed A speed value to be applied to a directional force.
                 * @returns This Game Object instance.
                 */
                thrust(speed: number): this;

                /**
                 * Apply thrust in the left direction of the body.
                 * 
                 * Use very small values, such as 0.1, depending on the mass and required speed.
                 * @param speed A speed value to be applied to a directional force.
                 * @returns This Game Object instance.
                 */
                thrustLeft(speed: number): this;

                /**
                 * Apply thrust in the right direction of the body.
                 * 
                 * Use very small values, such as 0.1, depending on the mass and required speed.
                 * @param speed A speed value to be applied to a directional force.
                 * @returns This Game Object instance.
                 */
                thrustRight(speed: number): this;

                /**
                 * Apply thrust in the reverse direction of the body.
                 * 
                 * Use very small values, such as 0.1, depending on the mass and required speed.
                 * @param speed A speed value to be applied to a directional force.
                 * @returns This Game Object instance.
                 */
                thrustBack(speed: number): this;

                /**
                 * Sets new friction values for this Game Object's Matter Body.
                 * @param value The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied.
                 * @param air If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance.
                 * @param fstatic If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never "stick" when it is nearly stationary.
                 * @returns This Game Object instance.
                 */
                setFriction(value: number, air?: number, fstatic?: number): this;

                /**
                 * Sets a new air resistance for this Game Object's Matter Body.
                 * A value of 0 means the Body will never slow as it moves through space.
                 * The higher the value, the faster a Body slows when moving through space.
                 * @param value The new air resistance for the Body.
                 * @returns This Game Object instance.
                 */
                setFrictionAir(value: number): this;

                /**
                 * Sets a new static friction for this Game Object's Matter Body.
                 * A value of 0 means the Body will never "stick" when it is nearly stationary.
                 * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary.
                 * @param value The new static friction for the Body.
                 * @returns This Game Object instance.
                 */
                setFrictionStatic(value: number): this;

                /**
                 * Sets whether this Game Object's Matter.js body should ignore world gravity. When set to
                 * `true`, the body will not be influenced by the global gravity defined in the Matter.js
                 * world configuration, allowing it to float freely regardless of the world's gravity settings.
                 * This can be changed at any time during gameplay to dynamically enable or disable gravity on the body.
                 * @param value Set to true to ignore the effect of world gravity, or false to not ignore it.
                 * @returns This Game Object instance.
                 */
                setIgnoreGravity(value: boolean): this;

                /**
                 * Sets the mass of the Game Object's Matter Body.
                 * @param value The new mass of the body.
                 * @returns This Game Object instance.
                 */
                setMass(value: number): this;

                /**
                 * Sets the density of the body.
                 * @param value The new density of the body.
                 * @returns This Game Object instance.
                 */
                setDensity(value: number): this;

                /**
                 * The body's center of mass.
                 * 
                 * Calling this creates a new `Vector2` each time to avoid mutation.
                 * 
                 * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`.
                 */
                readonly centerOfMass: Phaser.Math.Vector2;

                /**
                 * Set the body belonging to this Game Object to be a sensor.
                 * Sensors trigger collision events, but don't physically react to or push colliding bodies.
                 * @param value `true` to set the body as a sensor, or `false` to disable it.
                 * @returns This Game Object instance.
                 */
                setSensor(value: boolean): this;

                /**
                 * Is the body belonging to this Game Object a sensor or not?undefined
                 * @returns `true` if the body is a sensor, otherwise `false`.
                 */
                isSensor(): boolean;

                /**
                 * Set this Game Object's Matter physics body to be a rectangle shape.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param width Width of the rectangle.
                 * @param height Height of the rectangle.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setRectangle(width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Set this Game Object's Matter physics body to be a circle shape.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param radius The radius of the circle.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setCircle(radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Set this Game Object's Matter physics body to be a polygon shape.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param radius The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle.
                 * @param sides The number of sides the polygon will have.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setPolygon(radius: number, sides: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Set this Game Object's Matter physics body to be a trapezoid shape.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param width The width of the trapezoid Body.
                 * @param height The height of the trapezoid Body.
                 * @param slope The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setTrapezoid(width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Set this Game Object to use the given existing Matter Body.
                 * 
                 * The body is first removed from the world before being added to this Game Object.
                 * @param body The Body this Game Object should use.
                 * @param addToWorld Should the body be immediately added to the World? Default true.
                 * @returns This Game Object instance.
                 */
                setExistingBody(body: MatterJS.BodyType, addToWorld?: boolean): this;

                /**
                 * Set this Game Object to create and use a new Body based on the configuration object given.
                 * 
                 * Calling this method resets all previous properties you may have set on the body, including
                 * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                 * @param config Either a string, such as `circle`, or a Matter Set Body Configuration object.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns This Game Object instance.
                 */
                setBody(config: string | Phaser.Types.Physics.Matter.MatterSetBodyConfig, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;

                /**
                 * Immediately puts this physics body to sleep, removing it from active simulation.
                 * A sleeping body will not move, generate collisions, or consume CPU until it is woken.
                 * It can be woken manually via `setAwake`, or automatically when struck by another body.undefined
                 * @returns This Game Object instance.
                 */
                setToSleep(): this;

                /**
                 * Wakes this physics body if it is currently asleep, returning it to active simulation.
                 * Once awake, the body will resume participating in collisions and physics updates.undefined
                 * @returns This Game Object instance.
                 */
                setAwake(): this;

                /**
                 * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine).
                 * @param value The number of consecutive updates with near-zero velocity required before the body is put to sleep. Default 60.
                 * @returns This Game Object instance.
                 */
                setSleepThreshold(value?: number): this;

                /**
                 * Enable sleep and wake events for this body.
                 * 
                 * By default when a body goes to sleep, or wakes up, it will not emit any events.
                 * 
                 * The events are emitted by the Matter World instance and can be listened to via
                 * the `SLEEP_START` and `SLEEP_END` events.
                 * @param start `true` if you want the sleep start event to be emitted for this body.
                 * @param end `true` if you want the sleep end event to be emitted for this body.
                 * @returns This Game Object instance.
                 */
                setSleepEvents(start: boolean, end: boolean): this;

                /**
                 * Enables or disables the Sleep Start event for this body.
                 * @param value `true` to enable the `SLEEP_START` event for this body, or `false` to disable it.
                 * @returns This Game Object instance.
                 */
                setSleepStartEvent(value: boolean): this;

                /**
                 * Enables or disables the Sleep End event for this body.
                 * @param value `true` to enable the `SLEEP_END` event for this body, or `false` to disable it.
                 * @returns This Game Object instance.
                 */
                setSleepEndEvent(value: boolean): this;

                /**
                 * Changes the physics body to be either static `true` or dynamic `false`.
                 * @param value `true` to set the body as being static, or `false` to make it dynamic.
                 * @returns This Game Object instance.
                 */
                setStatic(value: boolean): this;

                /**
                 * Returns `true` if the body is static, otherwise `false` for a dynamic body.undefined
                 * @returns `true` if the body is static, otherwise `false`.
                 */
                isStatic(): boolean;

                /**
                 * Setting fixed rotation sets the Body inertia to Infinity, which stops it
                 * from being able to rotate when forces are applied to it.undefined
                 * @returns This Game Object instance.
                 */
                setFixedRotation(): this;

                /**
                 * Sets the horizontal velocity of the physics body.
                 * @param x The horizontal velocity value, in pixels per second.
                 * @returns This Game Object instance.
                 */
                setVelocityX(x: number): this;

                /**
                 * Sets the vertical velocity of the physics body.
                 * @param y The vertical velocity value, in pixels per second.
                 * @returns This Game Object instance.
                 */
                setVelocityY(y: number): this;

                /**
                 * Sets both the horizontal and vertical velocity of the physics body.
                 * @param x The horizontal velocity value.
                 * @param y The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value. Default x.
                 * @returns This Game Object instance.
                 */
                setVelocity(x: number, y?: number): this;

                /**
                 * Gets the current linear velocity of the physics body.undefined
                 * @returns The current linear velocity of the body.
                 */
                getVelocity(): Phaser.Types.Math.Vector2Like;

                /**
                 * Sets the angular velocity of the body instantly.
                 * Position, angle, force etc. are unchanged.
                 * @param velocity The angular velocity.
                 * @returns This Game Object instance.
                 */
                setAngularVelocity(velocity: number): this;

                /**
                 * Gets the current rotational velocity of the body.undefined
                 * @returns The current angular velocity of the body.
                 */
                getAngularVelocity(): number;

                /**
                 * Sets the current rotational speed of the body.
                 * Direction is maintained. Affects body angular velocity.
                 * @param speed The angular speed.
                 * @returns This Game Object instance.
                 */
                setAngularSpeed(speed: number): this;

                /**
                 * Gets the current rotational speed of the body.
                 * Equivalent to the magnitude of its angular velocity.undefined
                 * @returns The current angular speed of the body.
                 */
                getAngularSpeed(): number;

            }

            /**
             * A wrapper around a Tile that provides access to a corresponding Matter body. A tile can only
             * have one Matter body associated with it. You can either pass in an existing Matter body for
             * the tile or allow the constructor to create the corresponding body for you. If the Tile has a
             * collision group (defined in Tiled), those shapes will be used to create the body. If not, the
             * tile's rectangle bounding box will be used.
             * 
             * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody.
             * 
             * Note: not all Tiled collision shapes are supported. See
             * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information.
             */
            class TileBody extends Phaser.Events.EventEmitter implements Phaser.Physics.Matter.Components.Bounce, Phaser.Physics.Matter.Components.Collision, Phaser.Physics.Matter.Components.Friction, Phaser.Physics.Matter.Components.Gravity, Phaser.Physics.Matter.Components.Mass, Phaser.Physics.Matter.Components.Sensor, Phaser.Physics.Matter.Components.Sleep, Phaser.Physics.Matter.Components.Static {
                /**
                 * 
                 * @param world The Matter world instance this body belongs to.
                 * @param tile The target tile that should have a Matter body.
                 * @param options Options to be used when creating the Matter body.
                 */
                constructor(world: Phaser.Physics.Matter.World, tile: Phaser.Tilemaps.Tile, options?: Phaser.Types.Physics.Matter.MatterTileOptions);

                /**
                 * The tile object the body is associated with.
                 */
                tile: Phaser.Tilemaps.Tile;

                /**
                 * The Matter world the body exists within.
                 */
                world: Phaser.Physics.Matter.World;

                /**
                 * Sets the current body to a rectangle that matches the bounds of the tile.
                 * @param options Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts.
                 * @returns This TileBody object.
                 */
                setFromTileRectangle(options?: Phaser.Types.Physics.Matter.MatterBodyTileOptions): Phaser.Physics.Matter.TileBody;

                /**
                 * Sets the current body from the collision group associated with the Tile. This is typically
                 * set up in Tiled's collision editor.
                 * 
                 * Note: Matter doesn't support all shapes from Tiled. Rectangles and polygons are directly
                 * supported. Ellipses are converted into circle bodies. Polylines are treated as if they are
                 * closed polygons. If a tile has multiple shapes, a multi-part body will be created. Concave
                 * shapes are supported if poly-decomp library is included. Decomposition is not guaranteed to
                 * work for complex shapes (e.g. holes), so it's often best to manually decompose a concave
                 * polygon into multiple convex polygons yourself.
                 * @param options Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts.
                 * @returns This TileBody object.
                 */
                setFromTileCollision(options?: Phaser.Types.Physics.Matter.MatterBodyTileOptions): Phaser.Physics.Matter.TileBody;

                /**
                 * Sets the current body to the given body. This will remove the previous body, if one already
                 * exists.
                 * @param body The new Matter body to use.
                 * @param addToWorld Whether or not to add the body to the Matter world. Default true.
                 * @returns This TileBody object.
                 */
                setBody(body: MatterJS.BodyType, addToWorld?: boolean): Phaser.Physics.Matter.TileBody;

                /**
                 * Removes the current body from the TileBody and from the Matter world.undefined
                 * @returns This TileBody object.
                 */
                removeBody(): Phaser.Physics.Matter.TileBody;

                /**
                 * Destroys this TileBody, removing the current body from the Matter world, clearing the
                 * reference on the tile, and removing all event listeners.undefined
                 * @returns This TileBody object.
                 */
                destroy(): Phaser.Physics.Matter.TileBody;

                /**
                 * Sets the restitution (bounciness) of this Game Object's Matter.js physics body.
                 * This controls how much of the body's kinetic energy is preserved after a collision.
                 * @param value A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)`
                 * @returns This Game Object instance.
                 */
                setBounce(value: number): this;

                /**
                 * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31.
                 * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision
                 * categories are included in their collision masks (see {@link #setCollidesWith}).
                 * @param value Unique category bitfield.
                 * @returns This Game Object instance.
                 */
                setCollisionCategory(value: number): this;

                /**
                 * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values,
                 * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollidesWith}).
                 * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value,
                 * they will never collide.
                 * @param value Unique group index.
                 * @returns This Game Object instance.
                 */
                setCollisionGroup(value: number): this;

                /**
                 * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only
                 * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0`
                 * and `(categoryB & maskA) !== 0` are both true.
                 * @param categories A unique category bitfield, or an array of them.
                 * @returns This Game Object instance.
                 */
                setCollidesWith(categories: number | number[]): this;

                /**
                 * Sets a callback to be invoked when this Game Object's Matter Body begins colliding with another body.
                 * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param callback The callback to invoke when this body starts colliding with another.
                 * @returns This Game Object instance.
                 */
                setOnCollide(callback: Function): this;

                /**
                 * Sets a callback to be invoked when this Game Object's Matter Body stops colliding with another body.
                 * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param callback The callback to invoke when this body stops colliding with another.
                 * @returns This Game Object instance.
                 */
                setOnCollideEnd(callback: Function): this;

                /**
                 * Sets a callback to be invoked each step while this Game Object's Matter Body is actively colliding with another body.
                 * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param callback The callback to invoke for the duration of this body colliding with another.
                 * @returns This Game Object instance.
                 */
                setOnCollideActive(callback: Function): this;

                /**
                 * Sets a callback to be invoked when this Game Object's Matter Body collides with a specific body or bodies.
                 * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                 * 
                 * This does not change the bodies collision category, group or filter. Those must be set in addition
                 * to the callback.
                 * @param body The body, or an array of bodies, to test for collisions with.
                 * @param callback The callback to invoke when this body collides with the given body or bodies.
                 * @returns This Game Object instance.
                 */
                setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): this;

                /**
                 * Sets new friction values for this Game Object's Matter Body.
                 * @param value The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied.
                 * @param air If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance.
                 * @param fstatic If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never "stick" when it is nearly stationary.
                 * @returns This Game Object instance.
                 */
                setFriction(value: number, air?: number, fstatic?: number): this;

                /**
                 * Sets a new air resistance for this Game Object's Matter Body.
                 * A value of 0 means the Body will never slow as it moves through space.
                 * The higher the value, the faster a Body slows when moving through space.
                 * @param value The new air resistance for the Body.
                 * @returns This Game Object instance.
                 */
                setFrictionAir(value: number): this;

                /**
                 * Sets a new static friction for this Game Object's Matter Body.
                 * A value of 0 means the Body will never "stick" when it is nearly stationary.
                 * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary.
                 * @param value The new static friction for the Body.
                 * @returns This Game Object instance.
                 */
                setFrictionStatic(value: number): this;

                /**
                 * Sets whether this Game Object's Matter.js body should ignore world gravity. When set to
                 * `true`, the body will not be influenced by the global gravity defined in the Matter.js
                 * world configuration, allowing it to float freely regardless of the world's gravity settings.
                 * This can be changed at any time during gameplay to dynamically enable or disable gravity on the body.
                 * @param value Set to true to ignore the effect of world gravity, or false to not ignore it.
                 * @returns This Game Object instance.
                 */
                setIgnoreGravity(value: boolean): this;

                /**
                 * Sets the mass of the Game Object's Matter Body.
                 * @param value The new mass of the body.
                 * @returns This Game Object instance.
                 */
                setMass(value: number): this;

                /**
                 * Sets the density of the body.
                 * @param value The new density of the body.
                 * @returns This Game Object instance.
                 */
                setDensity(value: number): this;

                /**
                 * The body's center of mass.
                 * 
                 * Calling this creates a new `Vector2` each time to avoid mutation.
                 * 
                 * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`.
                 */
                readonly centerOfMass: Phaser.Math.Vector2;

                /**
                 * Set the body belonging to this Game Object to be a sensor.
                 * Sensors trigger collision events, but don't physically react to or push colliding bodies.
                 * @param value `true` to set the body as a sensor, or `false` to disable it.
                 * @returns This Game Object instance.
                 */
                setSensor(value: boolean): this;

                /**
                 * Is the body belonging to this Game Object a sensor or not?undefined
                 * @returns `true` if the body is a sensor, otherwise `false`.
                 */
                isSensor(): boolean;

                /**
                 * Immediately puts this physics body to sleep, removing it from active simulation.
                 * A sleeping body will not move, generate collisions, or consume CPU until it is woken.
                 * It can be woken manually via `setAwake`, or automatically when struck by another body.undefined
                 * @returns This Game Object instance.
                 */
                setToSleep(): this;

                /**
                 * Wakes this physics body if it is currently asleep, returning it to active simulation.
                 * Once awake, the body will resume participating in collisions and physics updates.undefined
                 * @returns This Game Object instance.
                 */
                setAwake(): this;

                /**
                 * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine).
                 * @param value The number of consecutive updates with near-zero velocity required before the body is put to sleep. Default 60.
                 * @returns This Game Object instance.
                 */
                setSleepThreshold(value?: number): this;

                /**
                 * Enable sleep and wake events for this body.
                 * 
                 * By default when a body goes to sleep, or wakes up, it will not emit any events.
                 * 
                 * The events are emitted by the Matter World instance and can be listened to via
                 * the `SLEEP_START` and `SLEEP_END` events.
                 * @param start `true` if you want the sleep start event to be emitted for this body.
                 * @param end `true` if you want the sleep end event to be emitted for this body.
                 * @returns This Game Object instance.
                 */
                setSleepEvents(start: boolean, end: boolean): this;

                /**
                 * Enables or disables the Sleep Start event for this body.
                 * @param value `true` to enable the `SLEEP_START` event for this body, or `false` to disable it.
                 * @returns This Game Object instance.
                 */
                setSleepStartEvent(value: boolean): this;

                /**
                 * Enables or disables the Sleep End event for this body.
                 * @param value `true` to enable the `SLEEP_END` event for this body, or `false` to disable it.
                 * @returns This Game Object instance.
                 */
                setSleepEndEvent(value: boolean): this;

                /**
                 * Changes the physics body to be either static `true` or dynamic `false`.
                 * @param value `true` to set the body as being static, or `false` to make it dynamic.
                 * @returns This Game Object instance.
                 */
                setStatic(value: boolean): this;

                /**
                 * Returns `true` if the body is static, otherwise `false` for a dynamic body.undefined
                 * @returns `true` if the body is static, otherwise `false`.
                 */
                isStatic(): boolean;

            }

            /**
             * A namespace containing methods for parsing body and fixture data exported from PhysicsEditor
             * (https://www.codeandweb.com/physicseditor), a visual collision shape editor for game sprites.
             * 
             * Use `PhysicsEditorParser.parseBody()` to build a compound Matter.js body from a physics data file
             * created and exported by PhysicsEditor. The exported JSON describes the body's fixtures (child
             * bodies), each of which can be a circle or a set of convex polygon vertices. The parser assembles
             * all fixtures into a single compound Matter.js body positioned at the given world coordinates.
             */
            namespace PhysicsEditorParser {
                /**
                 * Parses a body configuration exported by PhysicsEditor and creates a compound Matter.js body
                 * from it. Each fixture definition in the configuration is parsed and converted into a child
                 * body (either a circle or a convex polygon), and all child bodies are combined into a single
                 * compound body positioned at the given world coordinates. Additional Matter.js body properties
                 * can be supplied via the `options` argument and will be merged into the body configuration.
                 * @param x The horizontal world location of the body.
                 * @param y The vertical world location of the body.
                 * @param config The body configuration and fixture (child body) definitions, as exported by PhysicsEditor.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns A compound Matter JS Body.
                 */
                function parseBody(x: number, y: number, config: object, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType;

                /**
                 * Parses a single fixture entry from the "fixtures" list exported by PhysicsEditor. A fixture
                 * can describe either a circle (defined by a centre position and radius) or a set of convex
                 * polygon vertex lists. The appropriate Matter.js body or bodies are created and returned as
                 * an array so they can be combined into a compound body by the caller.
                 * @param fixtureConfig The fixture object to parse.
                 * @returns - An array of Matter JS Bodies.
                 */
                function parseFixture(fixtureConfig: object): MatterJS.BodyType[];

                /**
                 * Parses one or more vertex sets exported by PhysicsEditor and creates a Matter.js body for
                 * each set. Before creating each body, the vertices are sorted into clockwise winding order
                 * and the body is positioned at the centroid of the vertex set. After all bodies are created,
                 * coincident edges between adjacent parts are flagged so that Matter.js can handle them
                 * correctly during collision detection.
                 * @param vertexSets The vertex lists to parse.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns - An array of Matter JS Bodies.
                 */
                function parseVertices(vertexSets: any[], options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType[];

            }

            /**
             * Creates a body using the supplied physics data, as provided by a JSON file.
             * 
             * The data file should be loaded as JSON:
             * 
             * ```javascript
             * preload ()
             * {
             *   this.load.json('ninjas', 'assets/ninjas.json');
             * }
             * 
             * create ()
             * {
             *   const ninjaShapes = this.cache.json.get('ninjas');
             * 
             *   this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi);
             * }
             * ```
             * 
             * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it.
             * 
             * If you pass in an `options` object, any settings in there will override those in the config object.
             * 
             * The structure of the JSON file is as follows:
             * 
             * ```text
             * {
             *   'generator_info': // The name of the application that created the JSON data
             *   'shapeName': {
             *     'type': // The type of body
             *     'label': // Optional body label
             *     'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs
             *   }
             * }
             * ```
             * 
             * At the time of writing, only the Phaser Physics Tracer App exports in this format.
             */
            namespace PhysicsJSONParser {
                /**
                 * Parses a body element from the given JSON data.
                 * @param x The horizontal world location of the body.
                 * @param y The vertical world location of the body.
                 * @param config The body configuration data.
                 * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                 * @returns A Matter JS Body.
                 */
                function parseBody(x: number, y: number, config: object, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): MatterJS.BodyType;

            }

            /**
             * A Pointer Constraint is a special type of constraint that allows you to click
             * and drag bodies in a Matter World. It monitors the active Pointers in a Scene,
             * and when one is pressed down it checks to see if that hit any part of any active
             * body in the world. If it did, and the body has input enabled, it will begin to
             * drag it until either released, or you stop it via the `stopDrag` method.
             * 
             * You can adjust the stiffness, length and other properties of the constraint via
             * the `options` object on creation.
             */
            class PointerConstraint {
                /**
                 * 
                 * @param scene A reference to the Scene to which this Pointer Constraint belongs.
                 * @param world A reference to the Matter World instance to which this Constraint belongs.
                 * @param options A Constraint configuration object.
                 */
                constructor(scene: Phaser.Scene, world: Phaser.Physics.Matter.World, options?: object);

                /**
                 * A reference to the Scene to which this Pointer Constraint belongs.
                 * This is the same Scene as the Matter World instance.
                 */
                scene: Phaser.Scene;

                /**
                 * A reference to the Matter World instance to which this Constraint belongs.
                 */
                world: Phaser.Physics.Matter.World;

                /**
                 * The Camera the Pointer was interacting with when the input
                 * down event was processed.
                 */
                camera: Phaser.Cameras.Scene2D.Camera;

                /**
                 * A reference to the Input Pointer that activated this Constraint.
                 * This is set in the `onDown` handler.
                 */
                pointer: Phaser.Input.Pointer;

                /**
                 * Is this Constraint active or not?
                 * 
                 * An active constraint will be processed each update. An inactive one will be skipped.
                 * Use this to toggle a Pointer Constraint on and off.
                 */
                active: boolean;

                /**
                 * The internal transformed position.
                 */
                position: Phaser.Math.Vector2;

                /**
                 * The body that is currently being dragged, if any.
                 */
                body: MatterJS.BodyType | null;

                /**
                 * The part of the body that was clicked on to start the drag.
                 */
                part: MatterJS.BodyType | null;

                /**
                 * The native Matter Constraint that is used to attach to bodies.
                 */
                constraint: MatterJS.ConstraintType;

                /**
                 * A Pointer has been pressed down onto the Scene.
                 * 
                 * If this Constraint doesn't have an active Pointer then a hit test is set to
                 * run against all active bodies in the world during the _next_ call to `update`.
                 * If a body is found, it is bound to this constraint and the drag begins.
                 * @param pointer A reference to the Pointer that was pressed.
                 */
                onDown(pointer: Phaser.Input.Pointer): void;

                /**
                 * A Pointer has been released from the Scene. If it was the one this constraint was using, it's cleared.
                 * @param pointer A reference to the Pointer that was released.
                 */
                onUp(pointer: Phaser.Input.Pointer): void;

                /**
                 * Scans all active bodies in the current Matter World to see if any of them
                 * are hit by the Pointer. The _first one_ found to hit is set as the active constraint
                 * body.
                 * @param pointer A reference to the Pointer that initiated the drag.
                 * @returns `true` if a body was found and set, otherwise `false`.
                 */
                getBody(pointer: Phaser.Input.Pointer): boolean;

                /**
                 * Scans the current body to determine if a part of it was clicked on.
                 * If a part is found the body is set as the `constraint.bodyB` property,
                 * as well as the `body` property of this class. The part is also set.
                 * @param body The Matter Body to check.
                 * @param position A translated hit test position.
                 * @returns `true` if a part of the body was hit, otherwise `false`.
                 */
                hitTestBody(body: MatterJS.BodyType, position: Phaser.Math.Vector2): boolean;

                /**
                 * Internal update handler. Called in the Matter BEFORE_UPDATE step.
                 */
                update(): void;

                /**
                 * Stops the Pointer Constraint from dragging the body any further.
                 * 
                 * This is called automatically if the Pointer is released while actively
                 * dragging a body. Or, you can call it manually to release a body from a
                 * constraint without having to first release the pointer.
                 */
                stopDrag(): void;

                /**
                 * Destroys this Pointer Constraint instance and all of its references.
                 */
                destroy(): void;

            }

            /**
             * The Matter World class is responsible for managing one single instance of a Matter Physics World for Phaser.
             * 
             * Access this via `this.matter.world` from within a Scene.
             * 
             * This class creates a Matter JS World Composite along with the Matter JS Engine during instantiation. It also
             * handles delta timing, bounds, body and constraint creation and debug drawing.
             * 
             * If you wish to access the Matter JS World object directly, see the `localWorld` property.
             * If you wish to access the Matter Engine directly, see the `engine` property.
             * 
             * This class is an Event Emitter and will proxy _all_ Matter JS events, as they are received.
             */
            class World extends Phaser.Events.EventEmitter {
                /**
                 * 
                 * @param scene The Scene to which this Matter World instance belongs.
                 * @param config The Matter World configuration object.
                 */
                constructor(scene: Phaser.Scene, config: Phaser.Types.Physics.Matter.MatterWorldConfig);

                /**
                 * The Scene to which this Matter World instance belongs.
                 */
                scene: Phaser.Scene;

                /**
                 * An instance of the MatterJS Engine.
                 */
                engine: MatterJS.Engine;

                /**
                 * A `World` composite object that will contain all simulated bodies and constraints.
                 */
                localWorld: MatterJS.World;

                /**
                 * An object containing the 4 wall bodies that bound the physics world.
                 */
                walls: Phaser.Types.Physics.Matter.MatterWalls;

                /**
                 * A flag that toggles if the world is enabled or not.
                 */
                enabled: boolean;

                /**
                 * This function is called every time the core game loop steps, which is bound to the
                 * Request Animation Frame frequency unless otherwise modified.
                 * 
                 * The function is passed two values: `time` and `delta`, both of which come from the game step values.
                 * 
                 * It must return a number. This number is used as the delta value passed to Matter.Engine.update.
                 * 
                 * You can override this function with your own to define your own timestep.
                 * 
                 * If you need to update the Engine multiple times in a single game step then call
                 * `World.update` as many times as required. Each call will trigger the `getDelta` function.
                 * If you wish to have full control over when the Engine updates then see the property `autoUpdate`.
                 * 
                 * You can also adjust the number of iterations that Engine.update performs.
                 * Use the Scene Matter Physics config object to set the following properties:
                 * 
                 * positionIterations (defaults to 6)
                 * velocityIterations (defaults to 4)
                 * constraintIterations (defaults to 2)
                 * 
                 * Adjusting these values can help performance in certain situations, depending on the physics requirements
                 * of your game.
                 */
                getDelta: Function;

                /**
                 * The Matter JS Runner Configuration object.
                 * 
                 * This object is populated via the Matter Configuration object's `runner` property and is
                 * updated constantly during the game step.
                 */
                runner: Phaser.Types.Physics.Matter.MatterRunnerConfig;

                /**
                 * Automatically call Engine.update every time the game steps.
                 * If you disable this then you are responsible for calling `World.step` directly from your game.
                 * If you call `set60Hz` or `set30Hz` then `autoUpdate` is reset to `true`.
                 */
                autoUpdate: boolean;

                /**
                 * A flag that controls if the debug graphics will be drawn to or not.
                 */
                drawDebug: boolean;

                /**
                 * An instance of the Graphics object the debug bodies are drawn to, if enabled.
                 */
                debugGraphic: Phaser.GameObjects.Graphics;

                /**
                 * The debug configuration object.
                 * 
                 * The values stored in this object are read from the Matter World Config `debug` property.
                 * 
                 * When a new Body or Constraint is _added to the World_, they are given the values stored in this object,
                 * unless they have their own `render` object set that will override them.
                 * 
                 * Note that while you can modify the values of properties in this object at run-time, it will not change
                 * any of the Matter objects _already added_. It will only impact objects newly added to the world, or one
                 * that is removed and then re-added at a later time.
                 */
                debugConfig: Phaser.Types.Physics.Matter.MatterDebugConfig;

                /**
                 * Sets the debug render style for the children of the given Matter Composite.
                 * 
                 * Composites themselves do not render, but they can contain bodies, constraints and other composites that may do.
                 * So the children of this composite are passed to the `setBodyRenderStyle`, `setCompositeRenderStyle` and
                 * `setConstraintRenderStyle` methods accordingly.
                 * @param composite The Matter Composite to set the render style on.
                 * @returns This Matter World instance for method chaining.
                 */
                setCompositeRenderStyle(composite: MatterJS.CompositeType): this;

                /**
                 * Sets the debug render style for the given Matter Body.
                 * 
                 * If you are using this on a Phaser Game Object, such as a Matter Sprite, then pass in the body property
                 * to this method, not the Game Object itself.
                 * 
                 * If you wish to skip a parameter, so it retains its current value, pass `false` for it.
                 * 
                 * If you wish to reset the Body render colors to the defaults found in the World Debug Config, then call
                 * this method with just the `body` parameter provided and no others.
                 * @param body The Matter Body to set the render style on.
                 * @param lineColor The line color. If `null` it will use the World Debug Config value.
                 * @param lineOpacity The line opacity, between 0 and 1. If `null` it will use the World Debug Config value.
                 * @param lineThickness The line thickness. If `null` it will use the World Debug Config value.
                 * @param fillColor The fill color. If `null` it will use the World Debug Config value.
                 * @param fillOpacity The fill opacity, between 0 and 1. If `null` it will use the World Debug Config value.
                 * @returns This Matter World instance for method chaining.
                 */
                setBodyRenderStyle(body: MatterJS.BodyType, lineColor?: number, lineOpacity?: number, lineThickness?: number, fillColor?: number, fillOpacity?: number): this;

                /**
                 * Sets the debug render style for the given Matter Constraint.
                 * 
                 * If you are using this on a Phaser Game Object, then pass in the constraint property
                 * to this method, not the Game Object itself.
                 * 
                 * If you wish to skip a parameter, so it retains its current value, pass `false` for it.
                 * 
                 * If you wish to reset the Constraint render colors to the defaults found in the World Debug Config, then call
                 * this method with just the `constraint` parameter provided and no others.
                 * @param constraint The Matter Constraint to set the render style on.
                 * @param lineColor The line color. If `null` it will use the World Debug Config value.
                 * @param lineOpacity The line opacity, between 0 and 1. If `null` it will use the World Debug Config value.
                 * @param lineThickness The line thickness. If `null` it will use the World Debug Config value.
                 * @param pinSize If this constraint is a pin, this sets the size of the pin circle. If `null` it will use the World Debug Config value.
                 * @param anchorColor The color used when rendering this constraints anchors.  If `null` it will use the World Debug Config value.
                 * @param anchorSize The size of the anchor circle, if this constraint has anchors. If `null` it will use the World Debug Config value.
                 * @returns This Matter World instance for method chaining.
                 */
                setConstraintRenderStyle(constraint: MatterJS.ConstraintType, lineColor?: number, lineOpacity?: number, lineThickness?: number, pinSize?: number, anchorColor?: number, anchorSize?: number): this;

                /**
                 * This internal method acts as a proxy between all of the Matter JS events and then re-emits them
                 * via this class.
                 */
                setEventsProxy(): void;

                /**
                 * Sets the bounds of the Physics world to match the given world pixel dimensions.
                 * 
                 * You can optionally set which 'walls' to create: left, right, top or bottom.
                 * If none of the walls are given it will default to use the walls settings it had previously.
                 * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size
                 * the newly created bounds will also not have the left and right walls.
                 * Explicitly state them in the parameters to override this.
                 * @param x The x coordinate of the top-left corner of the bounds. Default 0.
                 * @param y The y coordinate of the top-left corner of the bounds. Default 0.
                 * @param width The width of the bounds.
                 * @param height The height of the bounds.
                 * @param thickness The thickness of each wall, in pixels. Default 64.
                 * @param left If true will create the left bounds wall. Default true.
                 * @param right If true will create the right bounds wall. Default true.
                 * @param top If true will create the top bounds wall. Default true.
                 * @param bottom If true will create the bottom bounds wall. Default true.
                 * @returns This Matter World object.
                 */
                setBounds(x?: number, y?: number, width?: number, height?: number, thickness?: number, left?: boolean, right?: boolean, top?: boolean, bottom?: boolean): Phaser.Physics.Matter.World;

                /**
                 * Updates the 4 rectangle bodies that were created, if `setBounds` was set in the Matter config, to use
                 * the new positions and sizes. This method is usually only called internally via the `setBounds` method.
                 * @param add `true` if the walls are being added or updated, `false` to remove them from the world.
                 * @param position Either `left`, `right`, `top` or `bottom`. Only optional if `add` is `false`.
                 * @param x The horizontal position to place the walls at. Only optional if `add` is `false`.
                 * @param y The vertical position to place the walls at. Only optional if `add` is `false`.
                 * @param width The width of the walls, in pixels. Only optional if `add` is `false`.
                 * @param height The height of the walls, in pixels. Only optional if `add` is `false`.
                 */
                updateWall(add: boolean, position?: string, x?: number, y?: number, width?: number, height?: number): void;

                /**
                 * Creates a Phaser.GameObjects.Graphics object that is used to render all of the debug bodies and joints to.
                 * 
                 * This method is called automatically by the constructor, if debugging has been enabled.
                 * 
                 * The created Graphics object is automatically added to the Scene at 0x0 and given a depth of `Number.MAX_VALUE`,
                 * so it renders above all else in the Scene.
                 * 
                 * The Graphics object is assigned to the `debugGraphic` property of this class and `drawDebug` is enabled.undefined
                 * @returns The newly created Graphics object.
                 */
                createDebugGraphic(): Phaser.GameObjects.Graphics;

                /**
                 * Sets the world gravity and gravity scale to 0.undefined
                 * @returns This Matter World object.
                 */
                disableGravity(): this;

                /**
                 * Sets the world's gravity to the values given.
                 * 
                 * Gravity effects all bodies in the world, unless they have the `ignoreGravity` flag set.
                 * @param x The world gravity x component. Default 0.
                 * @param y The world gravity y component. Default 1.
                 * @param scale The gravity scale factor. Default 0.001.
                 * @returns This Matter World object.
                 */
                setGravity(x?: number, y?: number, scale?: number): this;

                /**
                 * Creates a rectangle Matter body and adds it to the world.
                 * @param x The horizontal position of the body in the world.
                 * @param y The vertical position of the body in the world.
                 * @param width The width of the body.
                 * @param height The height of the body.
                 * @param options Optional Matter configuration object.
                 * @returns The Matter.js body that was created.
                 */
                create(x: number, y: number, width: number, height: number, options: object): MatterJS.BodyType;

                /**
                 * Adds a Matter JS object, or array of objects, to the world.
                 * 
                 * The objects should be valid Matter JS entities, such as a Body, Composite or Constraint.
                 * 
                 * Triggers `beforeAdd` and `afterAdd` events.
                 * @param object Can be single object, or an array, and can be a body, composite or constraint.
                 * @returns This Matter World object.
                 */
                add(object: object | object[]): this;

                /**
                 * Removes a Matter JS object, or array of objects, from the world.
                 * 
                 * The objects should be valid Matter JS entities, such as a Body, Composite or Constraint.
                 * 
                 * Triggers `beforeRemove` and `afterRemove` events.
                 * @param object Can be single object, or an array, and can be a body, composite or constraint.
                 * @param deep Optionally search the objects children and recursively remove those as well. Default false.
                 * @returns This Matter World object.
                 */
                remove(object: object | object[], deep?: boolean): this;

                /**
                 * Removes a Matter JS constraint, or array of constraints, from the world.
                 * 
                 * Triggers `beforeRemove` and `afterRemove` events.
                 * @param constraint A Matter JS Constraint, or an array of constraints, to be removed.
                 * @param deep Optionally search the objects children and recursively remove those as well. Default false.
                 * @returns This Matter World object.
                 */
                removeConstraint(constraint: MatterJS.ConstraintType | MatterJS.ConstraintType[], deep?: boolean): this;

                /**
                 * Adds `MatterTileBody` instances for all the colliding tiles within the given tilemap layer.
                 * 
                 * Set the appropriate tiles in your layer to collide before calling this method!
                 * 
                 * If you modify the map after calling this method, i.e. via a function like `putTileAt` then
                 * you should call the `Phaser.Physics.Matter.World.convertTiles` function directly, passing
                 * it an array of the tiles you've added to your map.
                 * @param tilemapLayer The Tilemap Layer containing the tiles to convert.
                 * @param options Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody}
                 * @returns This Matter World object.
                 */
                convertTilemapLayer(tilemapLayer: Phaser.Tilemaps.TilemapLayer, options?: object): this;

                /**
                 * Creates `MatterTileBody` instances for all of the given tiles. This creates bodies regardless of whether the
                 * tiles are set to collide or not, or if they have a body already, or not.
                 * 
                 * If you wish to pass an array of tiles that may already have bodies, you should filter the array before hand.
                 * @param tiles An array of tiles.
                 * @param options Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody}
                 * @returns This Matter World object.
                 */
                convertTiles(tiles: Phaser.Tilemaps.Tile[], options?: object): this;

                /**
                 * Returns the next unique group index for which bodies will collide.
                 * If `isNonColliding` is `true`, returns the next unique group index for which bodies will not collide.
                 * @param isNonColliding If `true`, returns the next unique group index for which bodies will _not_ collide. Default false.
                 * @returns Unique category bitfield
                 */
                nextGroup(isNonColliding?: boolean): number;

                /**
                 * Returns the next unique category bitfield (starting after the initial default category 0x0001).
                 * There are 32 available.undefined
                 * @returns Unique category bitfield
                 */
                nextCategory(): number;

                /**
                 * Pauses this Matter World instance and sets `enabled` to `false`.
                 * 
                 * A paused world will not run any simulations for the duration it is paused.undefined
                 * @returns This Matter World object.
                 */
                pause(): this;

                /**
                 * Resumes this Matter World instance from a paused state and sets `enabled` to `true`.undefined
                 * @returns This Matter World object.
                 */
                resume(): this;

                /**
                 * The internal update method. This is called automatically by the parent Scene.
                 * 
                 * Moves the simulation forward in time by delta ms. Uses `World.correction` value as an optional number that
                 * specifies the time correction factor to apply to the update. This can help improve the accuracy of the
                 * simulation in cases where delta is changing between updates. The value of correction is defined as `delta / lastDelta`,
                 * i.e. the percentage change of delta over the last step. Therefore the value is always 1 (no correction) when
                 * delta is constant (or when no correction is desired, which is the default).
                 * See the paper on Time Corrected Verlet for more information.
                 * 
                 * Triggers `beforeUpdate` and `afterUpdate` events. Triggers `collisionStart`, `collisionActive` and `collisionEnd` events.
                 * 
                 * If the World is paused, `update` is still run, but exits early and does not update the Matter Engine.
                 * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
                 * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
                 */
                update(time: number, delta: number): void;

                /**
                 * Manually advances the physics simulation by one iteration.
                 * 
                 * You can optionally pass in the `delta` and `correction` values to be used by Engine.update.
                 * If undefined they use the Matter defaults of 60Hz and no correction.
                 * 
                 * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`.
                 * 
                 * It also ignores any custom `getDelta` functions, as you should be passing the delta
                 * value in to this call.
                 * 
                 * You can adjust the number of iterations that Engine.update performs internally.
                 * Use the Scene Matter Physics config object to set the following properties:
                 * 
                 * positionIterations (defaults to 6)
                 * velocityIterations (defaults to 4)
                 * constraintIterations (defaults to 2)
                 * 
                 * Adjusting these values can help performance in certain situations, depending on the physics requirements
                 * of your game.
                 * @param delta The delta value. Default 16.666.
                 */
                step(delta?: number): void;

                /**
                 * Runs the Matter Engine.update at a fixed timestep of 60Hz.undefined
                 * @returns The delta value to be passed to Engine.update.
                 */
                update60Hz(): number;

                /**
                 * Runs the Matter Engine.update at a fixed timestep of 30Hz.undefined
                 * @returns The delta value to be passed to Engine.update.
                 */
                update30Hz(): number;

                /**
                 * Returns `true` if the given body can be found within the World.
                 * @param body The Matter Body, or Game Object, to search for within the world.
                 * @returns `true` if the body was found in the world, otherwise `false`.
                 */
                has(body: MatterJS.Body | Phaser.GameObjects.GameObject): boolean;

                /**
                 * Returns all the bodies in the Matter World, including all bodies in children, recursively.undefined
                 * @returns An array of all the Matter JS Bodies in this World.
                 */
                getAllBodies(): MatterJS.BodyType[];

                /**
                 * Returns all the constraints in the Matter World, including all constraints in children, recursively.undefined
                 * @returns An array of all the Matter JS Constraints in this World.
                 */
                getAllConstraints(): MatterJS.ConstraintType[];

                /**
                 * Returns all the composites in the Matter World, including all composites in children, recursively.undefined
                 * @returns An array of all the Matter JS Composites in this World.
                 */
                getAllComposites(): MatterJS.CompositeType[];

                /**
                 * Renders the Engine Broadphase Controller Grid to the given Graphics instance.
                 * 
                 * The debug renderer calls this method if the `showBroadphase` config value is set.
                 * 
                 * This method is used internally by the Matter Debug Renderer, but is also exposed publically should
                 * you wish to render the Grid to your own Graphics instance.
                 * @param grid The Matter Grid to be rendered.
                 * @param graphics The Graphics object to render to.
                 * @param lineColor The line color.
                 * @param lineOpacity The line opacity, between 0 and 1.
                 * @returns This Matter World instance for method chaining.
                 */
                renderGrid(grid: MatterJS.Grid, graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number): this;

                /**
                 * Renders the list of Pair separations to the given Graphics instance.
                 * 
                 * The debug renderer calls this method if the `showSeparations` config value is set.
                 * 
                 * This method is used internally by the Matter Debug Renderer, but is also exposed publically should
                 * you wish to render pair separations to your own Graphics instance.
                 * @param pairs An array of Matter Pairs to be rendered.
                 * @param graphics The Graphics object to render to.
                 * @param lineColor The line color.
                 * @returns This Matter World instance for method chaining.
                 */
                renderSeparations(pairs: MatterJS.Pair[], graphics: Phaser.GameObjects.Graphics, lineColor: number): this;

                /**
                 * Renders the list of collision points and normals to the given Graphics instance.
                 * 
                 * The debug renderer calls this method if the `showCollisions` config value is set.
                 * 
                 * This method is used internally by the Matter Debug Renderer, but is also exposed publically should
                 * you wish to render collision points and normals to your own Graphics instance.
                 * @param pairs An array of Matter Pairs to be rendered.
                 * @param graphics The Graphics object to render to.
                 * @param lineColor The line color.
                 * @returns This Matter World instance for method chaining.
                 */
                renderCollisions(pairs: MatterJS.Pair[], graphics: Phaser.GameObjects.Graphics, lineColor: number): this;

                /**
                 * Renders the bounds of an array of Bodies to the given Graphics instance.
                 * 
                 * If the body is a compound body, it will render the bounds for the parent compound.
                 * 
                 * The debug renderer calls this method if the `showBounds` config value is set.
                 * 
                 * This method is used internally by the Matter Debug Renderer, but is also exposed publically should
                 * you wish to render bounds to your own Graphics instance.
                 * @param bodies An array of bodies from the localWorld.
                 * @param graphics The Graphics object to render to.
                 * @param lineColor The line color.
                 * @param lineOpacity The line opacity, between 0 and 1.
                 */
                renderBodyBounds(bodies: any[], graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number): void;

                /**
                 * Renders either all axes, or a single axis indicator, for an array of Bodies, to the given Graphics instance.
                 * 
                 * The debug renderer calls this method if the `showAxes` or `showAngleIndicator` config values are set.
                 * 
                 * This method is used internally by the Matter Debug Renderer, but is also exposed publically should
                 * you wish to render body axes to your own Graphics instance.
                 * @param bodies An array of bodies from the localWorld.
                 * @param graphics The Graphics object to render to.
                 * @param showAxes If `true` it will render all body axes. If `false` it will render a single axis indicator.
                 * @param lineColor The line color.
                 * @param lineOpacity The line opacity, between 0 and 1.
                 */
                renderBodyAxes(bodies: any[], graphics: Phaser.GameObjects.Graphics, showAxes: boolean, lineColor: number, lineOpacity: number): void;

                /**
                 * Renders a velocity indicator for an array of Bodies, to the given Graphics instance.
                 * 
                 * The debug renderer calls this method if the `showVelocity` config value is set.
                 * 
                 * This method is used internally by the Matter Debug Renderer, but is also exposed publically should
                 * you wish to render velocity indicators to your own Graphics instance.
                 * @param bodies An array of bodies from the localWorld.
                 * @param graphics The Graphics object to render to.
                 * @param lineColor The line color.
                 * @param lineOpacity The line opacity, between 0 and 1.
                 * @param lineThickness The line thickness.
                 */
                renderBodyVelocity(bodies: any[], graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number, lineThickness: number): void;

                /**
                 * Renders a single Matter Body to the given Phaser Graphics Game Object.
                 * 
                 * This method is used internally by the Matter Debug Renderer, but is also exposed publically should
                 * you wish to render a Body to your own Graphics instance.
                 * 
                 * If you don't wish to render a line around the body, set the `lineColor` parameter to `null`.
                 * Equally, if you don't wish to render a fill, set the `fillColor` parameter to `null`.
                 * @param body The Matter Body to be rendered.
                 * @param graphics The Graphics object to render to.
                 * @param showInternalEdges Render internal edges of the polygon?
                 * @param lineColor The line color.
                 * @param lineOpacity The line opacity, between 0 and 1.
                 * @param lineThickness The line thickness. Default 1.
                 * @param fillColor The fill color.
                 * @param fillOpacity The fill opacity, between 0 and 1.
                 * @returns This Matter World instance for method chaining.
                 */
                renderBody(body: MatterJS.BodyType, graphics: Phaser.GameObjects.Graphics, showInternalEdges: boolean, lineColor?: number, lineOpacity?: number, lineThickness?: number, fillColor?: number, fillOpacity?: number): this;

                /**
                 * Renders the Convex Hull for a single Matter Body to the given Phaser Graphics Game Object.
                 * 
                 * This method is used internally by the Matter Debug Renderer, but is also exposed publically should
                 * you wish to render a Body hull to your own Graphics instance.
                 * @param body The Matter Body to be rendered.
                 * @param graphics The Graphics object to render to.
                 * @param hullColor The color used to render the hull.
                 * @param lineThickness The hull line thickness. Default 1.
                 * @returns This Matter World instance for method chaining.
                 */
                renderConvexHull(body: MatterJS.BodyType, graphics: Phaser.GameObjects.Graphics, hullColor: number, lineThickness?: number): this;

                /**
                 * Renders a single Matter Constraint, such as a Pin or a Spring, to the given Phaser Graphics Game Object.
                 * 
                 * This method is used internally by the Matter Debug Renderer, but is also exposed publically should
                 * you wish to render a Constraint to your own Graphics instance.
                 * @param constraint The Matter Constraint to render.
                 * @param graphics The Graphics object to render to.
                 * @param lineColor The line color.
                 * @param lineOpacity The line opacity, between 0 and 1.
                 * @param lineThickness The line thickness.
                 * @param pinSize If this constraint is a pin, this sets the size of the pin circle.
                 * @param anchorColor The color used when rendering this constraints anchors. Set to `null` to not render anchors.
                 * @param anchorSize The size of the anchor circle, if this constraint has anchors and is rendering them.
                 * @returns This Matter World instance for method chaining.
                 */
                renderConstraint(constraint: MatterJS.ConstraintType, graphics: Phaser.GameObjects.Graphics, lineColor: number, lineOpacity: number, lineThickness: number, pinSize: number, anchorColor: number, anchorSize: number): this;

                /**
                 * Resets the internal collision IDs that Matter.JS uses for Body collision groups.
                 * 
                 * You should call this before destroying your game if you need to restart the game
                 * again on the same page, without first reloading the page. Or, if you wish to
                 * consistently destroy a Scene that contains Matter.js and then run it again
                 * later in the same game.
                 */
                resetCollisionIDs(): void;

                /**
                 * Will remove all Matter physics event listeners and clear the matter physics world,
                 * engine and any debug graphics, if any.
                 */
                shutdown(): void;

                /**
                 * Will remove all Matter physics event listeners and clear the matter physics world,
                 * engine and any debug graphics, if any.
                 * 
                 * After destroying the world it cannot be re-used again.
                 */
                destroy(): void;

            }

            namespace Components {
                /**
                 * The Bounce component is a mixin for Matter.js physics-enabled Game Objects that provides
                 * control over the restitution (elasticity) of a physics body. Restitution determines how
                 * much kinetic energy a body retains after a collision — a higher value results in a bouncier
                 * object, while a value of zero produces collisions with no bounce at all.
                 * 
                 * This component is automatically mixed into Game Objects that use Matter.js physics when
                 * the physics body is created.
                 */
                interface Bounce {
                    /**
                     * Sets the restitution (bounciness) of this Game Object's Matter.js physics body.
                     * This controls how much of the body's kinetic energy is preserved after a collision.
                     * @param value A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)`
                     * @returns This Game Object instance.
                     */
                    setBounce(value: number): this;
                }

                /**
                 * Contains methods for changing the collision filter of a Matter Body. Should be used as a mixin and not called directly.
                 */
                interface Collision {
                    /**
                     * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31.
                     * Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision
                     * categories are included in their collision masks (see {@link #setCollidesWith}).
                     * @param value Unique category bitfield.
                     * @returns This Game Object instance.
                     */
                    setCollisionCategory(value: number): this;
                    /**
                     * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values,
                     * they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollidesWith}).
                     * If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value,
                     * they will never collide.
                     * @param value Unique group index.
                     * @returns This Game Object instance.
                     */
                    setCollisionGroup(value: number): this;
                    /**
                     * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only
                     * collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0`
                     * and `(categoryB & maskA) !== 0` are both true.
                     * @param categories A unique category bitfield, or an array of them.
                     * @returns This Game Object instance.
                     */
                    setCollidesWith(categories: number | number[]): this;
                    /**
                     * Sets a callback to be invoked when this Game Object's Matter Body begins colliding with another body.
                     * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                     * 
                     * This does not change the bodies collision category, group or filter. Those must be set in addition
                     * to the callback.
                     * @param callback The callback to invoke when this body starts colliding with another.
                     * @returns This Game Object instance.
                     */
                    setOnCollide(callback: Function): this;
                    /**
                     * Sets a callback to be invoked when this Game Object's Matter Body stops colliding with another body.
                     * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                     * 
                     * This does not change the bodies collision category, group or filter. Those must be set in addition
                     * to the callback.
                     * @param callback The callback to invoke when this body stops colliding with another.
                     * @returns This Game Object instance.
                     */
                    setOnCollideEnd(callback: Function): this;
                    /**
                     * Sets a callback to be invoked each step while this Game Object's Matter Body is actively colliding with another body.
                     * The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                     * 
                     * This does not change the bodies collision category, group or filter. Those must be set in addition
                     * to the callback.
                     * @param callback The callback to invoke for the duration of this body colliding with another.
                     * @returns This Game Object instance.
                     */
                    setOnCollideActive(callback: Function): this;
                    /**
                     * Sets a callback to be invoked when this Game Object's Matter Body collides with a specific body or bodies.
                     * The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object.
                     * 
                     * This does not change the bodies collision category, group or filter. Those must be set in addition
                     * to the callback.
                     * @param body The body, or an array of bodies, to test for collisions with.
                     * @param callback The callback to invoke when this body collides with the given body or bodies.
                     * @returns This Game Object instance.
                     */
                    setOnCollideWith(body: MatterJS.Body | MatterJS.Body[], callback: Function): this;
                }

                /**
                 * The Force component provides methods for applying forces and directional thrust to a Matter.js physics body.
                 * It is mixed into Game Objects that use Matter.js physics, giving them the ability to simulate impulses
                 * and continuous forces. All thrust methods derive direction from the body's current rotation angle,
                 * making them well-suited for top-down vehicles, spaceships, or any entity that moves relative to the
                 * direction it is facing. Use very small force values to avoid unrealistic acceleration.
                 */
                interface Force {
                    /**
                     * Applies a force to a body at its current center of mass position.
                     * @param force A Vector that specifies the force to apply.
                     * @returns This Game Object instance.
                     */
                    applyForce(force: Phaser.Math.Vector2): this;
                    /**
                     * Applies a force to a body from a given position.
                     * @param position The position in which the force comes from.
                     * @param force A Vector that specifies the force to apply.
                     * @returns This Game Object instance.
                     */
                    applyForceFrom(position: Phaser.Math.Vector2, force: Phaser.Math.Vector2): this;
                    /**
                     * Apply thrust in the forward direction of the body.
                     * 
                     * Use very small values, such as 0.1, depending on the mass and required speed.
                     * @param speed A speed value to be applied to a directional force.
                     * @returns This Game Object instance.
                     */
                    thrust(speed: number): this;
                    /**
                     * Apply thrust in the left direction of the body.
                     * 
                     * Use very small values, such as 0.1, depending on the mass and required speed.
                     * @param speed A speed value to be applied to a directional force.
                     * @returns This Game Object instance.
                     */
                    thrustLeft(speed: number): this;
                    /**
                     * Apply thrust in the right direction of the body.
                     * 
                     * Use very small values, such as 0.1, depending on the mass and required speed.
                     * @param speed A speed value to be applied to a directional force.
                     * @returns This Game Object instance.
                     */
                    thrustRight(speed: number): this;
                    /**
                     * Apply thrust in the reverse direction of the body.
                     * 
                     * Use very small values, such as 0.1, depending on the mass and required speed.
                     * @param speed A speed value to be applied to a directional force.
                     * @returns This Game Object instance.
                     */
                    thrustBack(speed: number): this;
                }

                /**
                 * Contains methods for changing the friction of a Game Object's Matter Body. Should be used as a mixin, not called directly.
                 */
                interface Friction {
                    /**
                     * Sets new friction values for this Game Object's Matter Body.
                     * @param value The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied.
                     * @param air If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance.
                     * @param fstatic If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never "stick" when it is nearly stationary.
                     * @returns This Game Object instance.
                     */
                    setFriction(value: number, air?: number, fstatic?: number): this;
                    /**
                     * Sets a new air resistance for this Game Object's Matter Body.
                     * A value of 0 means the Body will never slow as it moves through space.
                     * The higher the value, the faster a Body slows when moving through space.
                     * @param value The new air resistance for the Body.
                     * @returns This Game Object instance.
                     */
                    setFrictionAir(value: number): this;
                    /**
                     * Sets a new static friction for this Game Object's Matter Body.
                     * A value of 0 means the Body will never "stick" when it is nearly stationary.
                     * The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary.
                     * @param value The new static friction for the Body.
                     * @returns This Game Object instance.
                     */
                    setFrictionStatic(value: number): this;
                }

                /**
                 * The Gravity component provides the ability to control whether a Matter.js physics body
                 * is affected by the world's gravity. This component is mixed into Matter-enabled Game Objects
                 * and allows individual bodies to opt out of global gravity on a per-object basis, useful for
                 * objects like floating platforms or kinematic bodies that should not fall.
                 */
                interface Gravity {
                    /**
                     * Sets whether this Game Object's Matter.js body should ignore world gravity. When set to
                     * `true`, the body will not be influenced by the global gravity defined in the Matter.js
                     * world configuration, allowing it to float freely regardless of the world's gravity settings.
                     * This can be changed at any time during gameplay to dynamically enable or disable gravity on the body.
                     * @param value Set to true to ignore the effect of world gravity, or false to not ignore it.
                     * @returns This Game Object instance.
                     */
                    setIgnoreGravity(value: boolean): this;
                }

                /**
                 * Allows accessing the mass, density, and center of mass of a Matter-enabled Game Object. Should be used as a mixin and not directly.
                 */
                interface Mass {
                    /**
                     * Sets the mass of the Game Object's Matter Body.
                     * @param value The new mass of the body.
                     * @returns This Game Object instance.
                     */
                    setMass(value: number): this;
                    /**
                     * Sets the density of the body.
                     * @param value The new density of the body.
                     * @returns This Game Object instance.
                     */
                    setDensity(value: number): this;
                    /**
                     * The body's center of mass.
                     * 
                     * Calling this creates a new `Vector2` each time to avoid mutation.
                     * 
                     * If you only need to read the value and won't change it, you can get it from `GameObject.body.centerOfMass`.
                     */
                    readonly centerOfMass: Phaser.Math.Vector2;
                }

                /**
                 * Provides methods for toggling the sensor state of a Matter.js physics body on a Game Object.
                 * A sensor body participates in collision detection and fires collision events, but does not
                 * physically react to or push other bodies. This makes sensors ideal for trigger zones, pickup
                 * areas, or any situation where you need to detect overlap without causing a physical response.
                 * This component is intended to be used as a mixin and not instantiated directly.
                 */
                interface Sensor {
                    /**
                     * Set the body belonging to this Game Object to be a sensor.
                     * Sensors trigger collision events, but don't physically react to or push colliding bodies.
                     * @param value `true` to set the body as a sensor, or `false` to disable it.
                     * @returns This Game Object instance.
                     */
                    setSensor(value: boolean): this;
                    /**
                     * Is the body belonging to this Game Object a sensor or not?undefined
                     * @returns `true` if the body is a sensor, otherwise `false`.
                     */
                    isSensor(): boolean;
                }

                /**
                 * Enables a Matter-enabled Game Object to set its Body. Should be used as a mixin and not directly.
                 */
                interface SetBody {
                    /**
                     * Set this Game Object's Matter physics body to be a rectangle shape.
                     * 
                     * Calling this method resets all previous properties you may have set on the body, including
                     * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                     * @param width Width of the rectangle.
                     * @param height Height of the rectangle.
                     * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                     * @returns This Game Object instance.
                     */
                    setRectangle(width: number, height: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;
                    /**
                     * Set this Game Object's Matter physics body to be a circle shape.
                     * 
                     * Calling this method resets all previous properties you may have set on the body, including
                     * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                     * @param radius The radius of the circle.
                     * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                     * @returns This Game Object instance.
                     */
                    setCircle(radius: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;
                    /**
                     * Set this Game Object's Matter physics body to be a polygon shape.
                     * 
                     * Calling this method resets all previous properties you may have set on the body, including
                     * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                     * @param radius The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle.
                     * @param sides The number of sides the polygon will have.
                     * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                     * @returns This Game Object instance.
                     */
                    setPolygon(radius: number, sides: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;
                    /**
                     * Set this Game Object's Matter physics body to be a trapezoid shape.
                     * 
                     * Calling this method resets all previous properties you may have set on the body, including
                     * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                     * @param width The width of the trapezoid Body.
                     * @param height The height of the trapezoid Body.
                     * @param slope The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.
                     * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                     * @returns This Game Object instance.
                     */
                    setTrapezoid(width: number, height: number, slope: number, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;
                    /**
                     * Set this Game Object to use the given existing Matter Body.
                     * 
                     * The body is first removed from the world before being added to this Game Object.
                     * @param body The Body this Game Object should use.
                     * @param addToWorld Should the body be immediately added to the World? Default true.
                     * @returns This Game Object instance.
                     */
                    setExistingBody(body: MatterJS.BodyType, addToWorld?: boolean): this;
                    /**
                     * Set this Game Object to create and use a new Body based on the configuration object given.
                     * 
                     * Calling this method resets all previous properties you may have set on the body, including
                     * plugins, mass, friction, collision categories, etc. So be sure to re-apply these as needed.
                     * @param config Either a string, such as `circle`, or a Matter Set Body Configuration object.
                     * @param options An optional Body configuration object that is used to set initial Body properties on creation.
                     * @returns This Game Object instance.
                     */
                    setBody(config: string | Phaser.Types.Physics.Matter.MatterSetBodyConfig, options?: Phaser.Types.Physics.Matter.MatterBodyConfig): this;
                }

                /**
                 * Provides methods for controlling the sleep state of a Matter.js physics body. Sleep is a performance
                 * optimization in Matter.js: when a body has had near-zero velocity for a set number of updates, the
                 * engine can put it to sleep, temporarily removing it from active simulation. Sleeping bodies do not
                 * participate in collision detection or physics updates, which can significantly reduce CPU overhead
                 * in scenes with many idle bodies. When a sleeping body is disturbed by a collision or a manual wake
                 * call, it is reactivated automatically. This component should be used as a mixin and not directly.
                 */
                interface Sleep {
                    /**
                     * Immediately puts this physics body to sleep, removing it from active simulation.
                     * A sleeping body will not move, generate collisions, or consume CPU until it is woken.
                     * It can be woken manually via `setAwake`, or automatically when struck by another body.undefined
                     * @returns This Game Object instance.
                     */
                    setToSleep(): this;
                    /**
                     * Wakes this physics body if it is currently asleep, returning it to active simulation.
                     * Once awake, the body will resume participating in collisions and physics updates.undefined
                     * @returns This Game Object instance.
                     */
                    setAwake(): this;
                    /**
                     * Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine).
                     * @param value The number of consecutive updates with near-zero velocity required before the body is put to sleep. Default 60.
                     * @returns This Game Object instance.
                     */
                    setSleepThreshold(value?: number): this;
                    /**
                     * Enable sleep and wake events for this body.
                     * 
                     * By default when a body goes to sleep, or wakes up, it will not emit any events.
                     * 
                     * The events are emitted by the Matter World instance and can be listened to via
                     * the `SLEEP_START` and `SLEEP_END` events.
                     * @param start `true` if you want the sleep start event to be emitted for this body.
                     * @param end `true` if you want the sleep end event to be emitted for this body.
                     * @returns This Game Object instance.
                     */
                    setSleepEvents(start: boolean, end: boolean): this;
                    /**
                     * Enables or disables the Sleep Start event for this body.
                     * @param value `true` to enable the `SLEEP_START` event for this body, or `false` to disable it.
                     * @returns This Game Object instance.
                     */
                    setSleepStartEvent(value: boolean): this;
                    /**
                     * Enables or disables the Sleep End event for this body.
                     * @param value `true` to enable the `SLEEP_END` event for this body, or `false` to disable it.
                     * @returns This Game Object instance.
                     */
                    setSleepEndEvent(value: boolean): this;
                }

                /**
                 * Provides methods used for getting and setting the static state of a physics body.
                 */
                interface Static {
                    /**
                     * Changes the physics body to be either static `true` or dynamic `false`.
                     * @param value `true` to set the body as being static, or `false` to make it dynamic.
                     * @returns This Game Object instance.
                     */
                    setStatic(value: boolean): this;
                    /**
                     * Returns `true` if the body is static, otherwise `false` for a dynamic body.undefined
                     * @returns `true` if the body is static, otherwise `false`.
                     */
                    isStatic(): boolean;
                }

                /**
                 * Provides methods used for getting and setting the position, scale, and rotation of a Matter.js
                 * physics-enabled Game Object. This component acts as a bridge between the Game Object's visual
                 * transform and its underlying Matter.js physics body, keeping them synchronized. It is mixed into
                 * Game Objects that use the Matter.js physics system and should not be used directly.
                 */
                interface Transform {
                    /**
                     * The x position of this Game Object.
                     */
                    x: number;
                    /**
                     * The y position of this Game Object.
                     */
                    y: number;
                    /**
                     * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
                     * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
                     * 
                     * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
                     * isn't the case, use the `scaleX` or `scaleY` properties instead.
                     */
                    scale: number;
                    /**
                     * The horizontal scale of this Game Object.
                     */
                    scaleX: number;
                    /**
                     * The vertical scale of this Game Object.
                     */
                    scaleY: number;
                    /**
                     * Use `angle` to set or get the rotation of the physics body associated with this Game Object.
                     * Unlike `rotation`, when setting this value it is specified in degrees, which are converted to radians internally.
                     */
                    angle: number;
                    /**
                     * Use `rotation` to set or get the rotation of the physics body associated with this GameObject.
                     * The value when set must be in radians.
                     */
                    rotation: number;
                    /**
                     * Sets the position of the physics body along the x and y axes.
                     * Both parameters are optional and default to 0 if not provided.
                     * Velocity, angle, force etc. are unchanged.
                     * @param x The horizontal position of the body. Default 0.
                     * @param y The vertical position of the body. Default x.
                     * @returns This Game Object instance.
                     */
                    setPosition(x?: number, y?: number): this;
                    /**
                     * Immediately sets the angle of the Body.
                     * Angular velocity, position, force etc. are unchanged.
                     * @param radians The angle of the body, in radians. Default 0.
                     * @returns This Game Object instance.
                     */
                    setRotation(radians?: number): this;
                    /**
                     * Setting fixed rotation sets the Body inertia to Infinity, which stops it
                     * from being able to rotate when forces are applied to it.undefined
                     * @returns This Game Object instance.
                     */
                    setFixedRotation(): this;
                    /**
                     * Immediately sets the angle of the Body.
                     * Angular velocity, position, force etc. are unchanged.
                     * @param degrees The angle to set, in degrees. Default 0.
                     * @returns This Game Object instance.
                     */
                    setAngle(degrees?: number): this;
                    /**
                     * Sets the scale of this Game Object and its underlying Matter.js physics body.
                     * The optional `point` parameter specifies the origin from which scaling will occur.
                     * If omitted, scaling is applied from the body's current position.
                     * @param x The horizontal scale of this Game Object. Default 1.
                     * @param y The vertical scale of this Game Object. If not set it will use the x value. Default x.
                     * @param point The point (Vector2) from which scaling will occur.
                     * @returns This Game Object instance.
                     */
                    setScale(x?: number, y?: number, point?: Phaser.Math.Vector2): this;
                }

                /**
                 * Contains methods for changing the velocity of a Matter Body. Should be used as a mixin and not called directly.
                 */
                interface Velocity {
                    /**
                     * Sets the horizontal velocity of the physics body.
                     * @param x The horizontal velocity value, in pixels per second.
                     * @returns This Game Object instance.
                     */
                    setVelocityX(x: number): this;
                    /**
                     * Sets the vertical velocity of the physics body.
                     * @param y The vertical velocity value, in pixels per second.
                     * @returns This Game Object instance.
                     */
                    setVelocityY(y: number): this;
                    /**
                     * Sets both the horizontal and vertical velocity of the physics body.
                     * @param x The horizontal velocity value.
                     * @param y The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value. Default x.
                     * @returns This Game Object instance.
                     */
                    setVelocity(x: number, y?: number): this;
                    /**
                     * Gets the current linear velocity of the physics body.undefined
                     * @returns The current linear velocity of the body.
                     */
                    getVelocity(): Phaser.Types.Math.Vector2Like;
                    /**
                     * Sets the angular velocity of the body instantly.
                     * Position, angle, force etc. are unchanged.
                     * @param velocity The angular velocity.
                     * @returns This Game Object instance.
                     */
                    setAngularVelocity(velocity: number): this;
                    /**
                     * Gets the current rotational velocity of the body.undefined
                     * @returns The current angular velocity of the body.
                     */
                    getAngularVelocity(): number;
                    /**
                     * Sets the current rotational speed of the body.
                     * Direction is maintained. Affects body angular velocity.
                     * @param speed The angular speed.
                     * @returns This Game Object instance.
                     */
                    setAngularSpeed(speed: number): this;
                    /**
                     * Gets the current rotational speed of the body.
                     * Equivalent to the magnitude of its angular velocity.undefined
                     * @returns The current angular speed of the body.
                     */
                    getAngularSpeed(): number;
                }

            }

            namespace Events {
                type AfterAddEvent = {
                    /**
                     * An array of the object(s) that have been added. May be a single body, constraint, composite or a mixture of these.
                     */
                    object: any[];
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics After Add Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance at the end of the process when a new Body
                 * or Constraint has just been added to the world.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('afteradd', listener)`.
                 */
                const AFTER_ADD: string;

                type AfterRemoveEvent = {
                    /**
                     * An array of the object(s) that were removed. May be a single body, constraint, composite or a mixture of these.
                     */
                    object: any[];
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics After Remove Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance at the end of the process when a
                 * Body or Constraint was removed from the world.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('afterremove', listener)`.
                 */
                const AFTER_REMOVE: string;

                type AfterUpdateEvent = {
                    /**
                     * The Matter Engine `timing.timestamp` value for the event.
                     */
                    timestamp: number;
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics After Update Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance after the engine has updated and all collision events have resolved.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('afterupdate', listener)`.
                 */
                const AFTER_UPDATE: string;

                type BeforeAddEvent = {
                    /**
                     * An array of the object(s) to be added. May be a single body, constraint, composite or a mixture of these.
                     */
                    object: any[];
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics Before Add Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance at the start of the process when a new Body
                 * or Constraint is being added to the world.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('beforeadd', listener)`.
                 */
                const BEFORE_ADD: string;

                type BeforeRemoveEvent = {
                    /**
                     * An array of the object(s) to be removed. May be a single body, constraint, composite or a mixture of these.
                     */
                    object: any[];
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics Before Remove Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance at the start of the process when a
                 * Body or Constraint is being removed from the world.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('beforeremove', listener)`.
                 */
                const BEFORE_REMOVE: string;

                type BeforeUpdateEvent = {
                    /**
                     * The Matter Engine `timing.timestamp` value for the event.
                     */
                    timestamp: number;
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics Before Update Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance right before all the collision processing takes place.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('beforeupdate', listener)`.
                 */
                const BEFORE_UPDATE: string;

                type CollisionActiveEvent = {
                    /**
                     * A list of all affected pairs in the collision.
                     */
                    pairs: Phaser.Types.Physics.Matter.MatterCollisionPair[];
                    /**
                     * The Matter Engine `timing.timestamp` value for the event.
                     */
                    timestamp: number;
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics Collision Active Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance after the engine has updated.
                 * It provides a list of all pairs that are colliding in the current tick (if any).
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('collisionactive', listener)`.
                 */
                const COLLISION_ACTIVE: string;

                type CollisionEndEvent = {
                    /**
                     * A list of all affected pairs in the collision.
                     */
                    pairs: Phaser.Types.Physics.Matter.MatterCollisionPair[];
                    /**
                     * The Matter Engine `timing.timestamp` value for the event.
                     */
                    timestamp: number;
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics Collision End Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance after the engine has updated.
                 * It provides a list of all pairs that have finished colliding in the current tick (if any).
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('collisionend', listener)`.
                 */
                const COLLISION_END: string;

                type CollisionStartEvent = {
                    /**
                     * A list of all affected pairs in the collision.
                     */
                    pairs: Phaser.Types.Physics.Matter.MatterCollisionPair[];
                    /**
                     * The Matter Engine `timing.timestamp` value for the event.
                     */
                    timestamp: number;
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics Collision Start Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance after the engine has updated.
                 * It provides a list of all pairs that have started to collide in the current tick (if any).
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('collisionstart', listener)`.
                 */
                const COLLISION_START: string;

                /**
                 * The Matter Physics Drag End Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance when a Pointer Constraint
                 * stops dragging a body.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('dragend', listener)`.
                 */
                const DRAG_END: string;

                /**
                 * The Matter Physics Drag Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance when a Pointer Constraint
                 * is actively dragging a body. It is emitted each time the pointer moves.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('drag', listener)`.
                 */
                const DRAG: string;

                /**
                 * The Matter Physics Drag Start Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance when a Pointer Constraint
                 * starts dragging a body.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('dragstart', listener)`.
                 */
                const DRAG_START: string;

                /**
                 * The Matter Physics World Pause Event.
                 * 
                 * This event is dispatched by an Matter Physics World instance when it is paused.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('pause', listener)`.
                 */
                const PAUSE: string;

                /**
                 * The Matter Physics World Resume Event.
                 * 
                 * This event is dispatched by an Matter Physics World instance when it resumes from a paused state.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('resume', listener)`.
                 */
                const RESUME: string;

                type SleepEndEvent = {
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics Sleep End Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance when a Body stop sleeping.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('sleepend', listener)`.
                 */
                const SLEEP_END: string;

                type SleepStartEvent = {
                    /**
                     * The source object of the event.
                     */
                    source: any;
                    /**
                     * The name of the event.
                     */
                    name: string;
                };

                /**
                 * The Matter Physics Sleep Start Event.
                 * 
                 * This event is dispatched by a Matter Physics World instance when a Body goes to sleep.
                 * 
                 * Listen to it from a Scene using: `this.matter.world.on('sleepstart', listener)`.
                 */
                const SLEEP_START: string;

            }

        }

    }

    namespace Plugins {
        /**
         * A Global Plugin is installed just once into the Game owned Plugin Manager.
         * It can listen for Game events and respond to them.
         * 
         * Custom global plugins should extend this class and implement any needed lifecycle
         * methods: `init` (called when the plugin is first created), `start` (called when the
         * plugin is started), `stop` (called when the plugin is stopped), and `destroy` (called
         * when the Game shuts down).
         */
        class BasePlugin {
            /**
             * 
             * @param pluginManager A reference to the Plugin Manager.
             */
            constructor(pluginManager: Phaser.Plugins.PluginManager);

            /**
             * A handy reference to the Plugin Manager that is responsible for this plugin.
             * Can be used as a route to gain access to game systems and events.
             */
            protected pluginManager: Phaser.Plugins.PluginManager;

            /**
             * A reference to the Game instance this plugin is running under.
             */
            protected game: Phaser.Game;

            /**
             * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.
             * It will never be called again on this instance.
             * In here you can set-up whatever you need for this plugin to run.
             * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.
             * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.
             * @param data A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).
             */
            init(data?: any | undefined): void;

            /**
             * The PluginManager calls this method on a Global Plugin when the plugin is started.
             * If a plugin is stopped, and then started again, this will get called again.
             * Typically called immediately after `BasePlugin.init`.
             * On a Scene Plugin, this method is never called.
             */
            start(): void;

            /**
             * The PluginManager calls this method on a Global Plugin when the plugin is stopped.
             * The game code has requested that your plugin stop doing whatever it does.
             * It is now considered as 'inactive' by the PluginManager.
             * Handle that process here (i.e. stop listening for events, etc)
             * If the plugin is started again then `BasePlugin.start` will be called again.
             * On a Scene Plugin, this method is never called.
             */
            stop(): void;

            /**
             * Called by the PluginManager when this plugin is being destroyed. This happens either
             * when the Game shuts down or when the plugin is explicitly removed from the PluginManager.
             * It nulls out all internal references to the game, scene, and plugin manager to prevent
             * memory leaks. Override this method in your own plugin to release any resources it holds.
             */
            destroy(): void;

        }

        /**
         * Defines the three lists of plugins that Phaser loads automatically when a game starts.
         * 
         * `Global` plugins are instantiated once by the `Phaser.Game` instance and are shared across
         * all Scenes (e.g. the Animation Manager, Cache, Texture Manager, and Renderer).
         * 
         * `CoreScene` plugins are installed into every `Scene.Systems` instance unconditionally and
         * provide essential per-Scene functionality such as the Camera Manager, Game Object Factory,
         * Display List, and Update List.
         * 
         * `DefaultScene` plugins are also installed into every Scene but can be omitted by providing
         * a custom `plugins` configuration in the Game Config or Scene Config. They include optional
         * but commonly used systems such as the Input Plugin, Tween Manager, and Loader.
         * 
         * You can customise which default plugins are loaded by modifying these arrays or by supplying
         * a `DefaultPlugins` object in your Game Config before the game starts.
         */
        namespace DefaultPlugins {
            /**
             * These are the Global Managers that are created by the Phaser.Game instance.
             * They are referenced from Scene.Systems so that plugins can use them.
             */
            var Global: any[];

            /**
             * These are the core plugins that are installed into every Scene.Systems instance, no matter what.
             * They are optionally exposed in the Scene as well (see the InjectionMap for details)
             * 
             * They are created in the order in which they appear in this array and EventEmitter is always first.
             */
            var CoreScene: any[];

            /**
             * These plugins are created in Scene.Systems in addition to the CoreScenePlugins.
             * 
             * You can elect not to have these plugins by either creating a DefaultPlugins object as part
             * of the Game Config, by creating a Plugins object as part of a Scene Config, or by modifying this array
             * and building your own bundle.
             * 
             * They are optionally exposed in the Scene as well (see the InjectionMap for details)
             * 
             * They are always created in the order in which they appear in the array.
             */
            var DefaultScene: any[];

        }

        namespace PluginCache {
            /**
             * Registers a core plugin with the PluginCache. This is called directly by Phaser's internal
             * core plugins during setup. The plugin is stored as the source constructor and is not
             * instantiated at this stage.
             * @param key A reference used to get this plugin from the plugin cache.
             * @param plugin The plugin to be stored. Should be the core object, not instantiated.
             * @param mapping If this plugin is to be injected into the Scene Systems, this is the property key map used.
             * @param custom Core Scene plugin or a Custom Scene plugin? Default false.
             */
            function register(key: string, plugin: Function, mapping: string, custom?: boolean): void;

            /**
             * Stores a custom plugin in the global plugin cache.
             * The key must be unique, within the scope of the cache.
             * @param key A reference used to get this plugin from the plugin cache.
             * @param plugin The plugin to be stored. Should be the core object, not instantiated.
             * @param mapping If this plugin is to be injected into the Scene Systems, this is the property key map used.
             * @param data A value to be passed to the plugin's `init` method.
             */
            function registerCustom(key: string, plugin: Function, mapping: string, data: any | undefined): void;

            /**
             * Checks if the given key is already being used in the core plugin cache.
             * @param key The key to check for.
             * @returns `true` if the key is already in use in the core cache, otherwise `false`.
             */
            function hasCore(key: string): boolean;

            /**
             * Checks if the given key is already being used in the custom plugin cache.
             * @param key The key to check for.
             * @returns `true` if the key is already in use in the custom cache, otherwise `false`.
             */
            function hasCustom(key: string): boolean;

            /**
             * Returns the core plugin object from the cache based on the given key.
             * @param key The key of the core plugin to get.
             * @returns The core plugin object.
             */
            function getCore(key: string): Phaser.Types.Plugins.CorePluginContainer;

            /**
             * Returns the custom plugin object from the cache based on the given key.
             * @param key The key of the custom plugin to get.
             * @returns The custom plugin object.
             */
            function getCustom(key: string): Phaser.Types.Plugins.CustomPluginContainer;

            /**
             * Returns the plugin constructor function from the custom plugin cache based on the given key,
             * or `null` if no entry for that key exists.
             * @param key The key of the custom plugin to get.
             * @returns The custom plugin object.
             */
            function getCustomClass(key: string): Function;

            /**
             * Removes a core plugin based on the given key.
             * @param key The key of the core plugin to remove.
             */
            function remove(key: string): void;

            /**
             * Removes a custom plugin based on the given key.
             * @param key The key of the custom plugin to remove.
             */
            function removeCustom(key: string): void;

            /**
             * Removes all Core Plugins.
             * 
             * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.
             * So be sure you only call this if you do not wish to run Phaser again.
             */
            function destroyCorePlugins(): void;

            /**
             * Removes all Custom Plugins.
             * 
             * This removes any plugins that were registered by the developer via the Plugin Manager,
             * but does not affect the core internal plugins that Phaser requires to run.
             */
            function destroyCustomPlugins(): void;

        }

        /**
         * The PluginManager is responsible for installing and adding plugins to Phaser.
         * 
         * It is a global system and therefore belongs to the Game instance, not a specific Scene.
         * 
         * It works in conjunction with the PluginCache. Core internal plugins automatically register themselves
         * with the Cache, but it's the Plugin Manager that is responsible for injecting them into the Scenes.
         * 
         * There are two types of plugin:
         * 
         * 1. A Global Plugin
         * 2. A Scene Plugin
         * 
         * A Global Plugin is a plugin that lives within the Plugin Manager rather than a Scene. You can get
         * access to it by calling `PluginManager.get` and providing a key. Any Scene that requests a plugin in
         * this way will get access to the same plugin instance, allowing you to use a single plugin across
         * multiple Scenes.
         * 
         * A Scene Plugin is a plugin dedicated to running within a Scene. These are different to Global Plugins
         * in that their instances do not live within the Plugin Manager, but within the Scene Systems class instead.
         * Also, every Scene created is given its own unique instance of a Scene Plugin. Examples of core Scene
         * Plugins include the Input Plugin, the Tween Plugin and the physics Plugins.
         * 
         * You can add a plugin to Phaser in three different ways:
         * 
         * 1. Preload it
         * 2. Include it in your source code and install it via the Game Config
         * 3. Include it in your source code and install it within a Scene
         * 
         * For examples of all of these approaches please see the Phaser 3 Examples Repo `plugins` folder.
         * 
         * For information on creating your own plugin please see the Phaser 3 Plugin Template.
         */
        class PluginManager {
            /**
             * 
             * @param game The game instance that owns this Plugin Manager.
             */
            constructor(game: Phaser.Game);

            /**
             * The game instance that owns this Plugin Manager.
             */
            game: Phaser.Game;

            /**
             * The global plugins currently running and managed by this Plugin Manager.
             * A plugin must have been started at least once in order to appear in this list.
             */
            plugins: Phaser.Types.Plugins.GlobalPlugin[];

            /**
             * A list of plugin keys that should be installed into Scenes as well as the Core Plugins.
             */
            scenePlugins: string[];

            /**
             * Runs once the game has booted and installs all of the plugins configured in the Game Config.
             */
            protected boot(): void;

            /**
             * Called by the Scene Systems class. Tells the plugin manager to install all Scene plugins into it.
             * 
             * First it will install global references, i.e. references from the Game systems into the Scene Systems (and Scene if mapped.)
             * Then it will install Core Scene Plugins followed by Scene Plugins registered with the PluginManager.
             * Finally it will install any references to Global Plugins that have a Scene mapping property into the Scene itself.
             * @param sys The Scene Systems class to install all the plugins in to.
             * @param globalPlugins An array of global plugins to install.
             * @param scenePlugins An array of scene plugins to install.
             */
            protected addToScene(sys: Phaser.Scenes.Systems, globalPlugins: any[], scenePlugins: any[]): void;

            /**
             * Called by the Scene Systems class. Returns a list of plugins to be installed.undefined
             * @returns A list of keys of all the Scene Plugins to install.
             */
            protected getDefaultScenePlugins(): string[];

            /**
             * Installs a new Scene Plugin into the Plugin Manager and optionally adds it
             * to the given Scene as well. A Scene Plugin added to the manager in this way
             * will be automatically installed into all new Scenes using the key and mapping given.
             * 
             * The `key` property is what the plugin is injected into Scene.Systems as.
             * The `mapping` property is optional, and if specified is what the plugin is installed into
             * the Scene as. For example:
             * 
             * ```javascript
             * this.plugins.installScenePlugin('powerupsPlugin', pluginCode, 'powerups');
             * 
             * // and from within the scene:
             * this.sys.powerupsPlugin; // key value
             * this.powerups; // mapping value
             * ```
             * 
             * This method is called automatically by Phaser if you install your plugins using either the
             * Game Configuration object, or by preloading them via the Loader.
             * @param key The property key that will be used to add this plugin to Scene.Systems.
             * @param plugin The plugin code. This should be the non-instantiated version.
             * @param mapping If this plugin is injected into the Phaser.Scene class, this is the property key to use.
             * @param addToScene Optionally automatically add this plugin to the given Scene.
             * @param fromLoader Is this being called by the Loader? Default false.
             */
            installScenePlugin(key: string, plugin: Function, mapping?: string, addToScene?: Phaser.Scene, fromLoader?: boolean): void;

            /**
             * Installs a new Global Plugin into the Plugin Manager and optionally starts it running.
             * A global plugin belongs to the Plugin Manager, rather than a specific Scene, and can be accessed
             * and used by all Scenes in your game.
             * 
             * The `key` property is what you use to access this plugin from the Plugin Manager.
             * 
             * ```javascript
             * this.plugins.install('powerupsPlugin', pluginCode);
             * 
             * // and from within the scene:
             * this.plugins.get('powerupsPlugin');
             * ```
             * 
             * This method is called automatically by Phaser if you install your plugins using either the
             * Game Configuration object, or by preloading them via the Loader.
             * 
             * The same plugin can be installed multiple times into the Plugin Manager by simply giving each
             * instance its own unique key.
             * @param key The unique handle given to this plugin within the Plugin Manager.
             * @param plugin The plugin code. This should be the non-instantiated version.
             * @param start Automatically start the plugin running? This is always `true` if you provide a mapping value. Default false.
             * @param mapping If this plugin is injected into the Phaser.Scene class, this is the property key to use.
             * @param data A value passed to the plugin's `init` method.
             * @returns The plugin that was started, or `null` if `start` was false, or game isn't yet booted.
             */
            install(key: string, plugin: Function, start?: boolean, mapping?: string, data?: any): Phaser.Plugins.BasePlugin | null;

            /**
             * Gets an index of a global plugin based on the given key.
             * @param key The unique plugin key.
             * @returns The index of the plugin within the plugins array.
             */
            protected getIndex(key: string): number;

            /**
             * Gets a global plugin based on the given key.
             * @param key The unique plugin key.
             * @returns The plugin entry.
             */
            protected getEntry(key: string): Phaser.Types.Plugins.GlobalPlugin;

            /**
             * Checks if the given global plugin, based on its key, is active or not.
             * @param key The unique plugin key.
             * @returns `true` if the plugin is active, otherwise `false`.
             */
            isActive(key: string): boolean;

            /**
             * Starts a global plugin running.
             * 
             * If the plugin was previously active then calling `start` will reset it to an active state and then
             * call its `start` method.
             * 
             * If the plugin has never been run before a new instance of it will be created within the Plugin Manager,
             * its active state set and then both of its `init` and `start` methods called, in that order.
             * 
             * If the plugin is already running under the given key then nothing happens.
             * @param key The key of the plugin to start.
             * @param runAs Run the plugin under a new key. This allows you to run one plugin multiple times.
             * @returns The plugin that was started, or `null` if invalid key given or plugin is already stopped.
             */
            start(key: string, runAs?: string): Phaser.Plugins.BasePlugin | null;

            /**
             * Stops a global plugin from running.
             * 
             * If the plugin is active then its active state will be set to false and the plugins `stop` method
             * will be called.
             * 
             * If the plugin is not already running, nothing will happen.
             * @param key The key of the plugin to stop.
             * @returns The Plugin Manager.
             */
            stop(key: string): this;

            /**
             * Gets a global plugin from the Plugin Manager based on the given key and returns it.
             * 
             * If it cannot find an active plugin based on the key, but there is one in the Plugin Cache with the same key,
             * then it will create a new instance of the cached plugin and return that.
             * @param key The key of the plugin to get.
             * @param autoStart Automatically start a new instance of the plugin if found in the cache, but not actively running. Default true.
             * @returns The plugin, or `null` if no plugin was found matching the key.
             */
            get(key: string, autoStart?: boolean): Phaser.Plugins.BasePlugin | Function | null;

            /**
             * Returns the plugin class from the cache.
             * Used internally by the Plugin Manager.
             * @param key The key of the plugin to get.
             * @returns A Plugin object
             */
            getClass(key: string): Phaser.Plugins.BasePlugin;

            /**
             * Removes a global plugin from the Plugin Manager and Plugin Cache.
             * 
             * It is up to you to remove all references to this plugin that you may hold within your game code.
             * @param key The key of the plugin to remove.
             */
            removeGlobalPlugin(key: string): void;

            /**
             * Removes a scene plugin from the Plugin Manager and Plugin Cache.
             * 
             * This will not remove the plugin from any active Scenes that are already using it.
             * 
             * It is up to you to remove all references to this plugin that you may hold within your game code.
             * @param key The key of the plugin to remove.
             */
            removeScenePlugin(key: string): void;

            /**
             * Registers a new type of Game Object with the global Game Object Factory and / or Creator.
             * This is usually called from within your Plugin code and is a helpful short-cut for creating
             * new Game Objects.
             * 
             * The key is the property that will be injected into the factories and used to create the
             * Game Object. For example:
             * 
             * ```javascript
             * this.plugins.registerGameObject('clown', clownFactoryCallback, clownCreatorCallback);
             * // later in your game code:
             * this.add.clown();
             * this.make.clown();
             * ```
             * 
             * The callbacks are what are called when the factories try to create a Game Object
             * matching the given key. It's important to understand that the callbacks are invoked within
             * the context of the GameObjectFactory. In this context there are several properties available
             * to use:
             * 
             * this.scene - A reference to the Scene that owns the GameObjectFactory.
             * this.displayList - A reference to the Display List the Scene owns.
             * this.updateList - A reference to the Update List the Scene owns.
             * 
             * See the GameObjectFactory and GameObjectCreator classes for more details.
             * Any public property or method listed is available from your callbacks under `this`.
             * @param key The key of the Game Object that the given callbacks will create, i.e. `image`, `sprite`.
             * @param factoryCallback The callback to invoke when the Game Object Factory is called.
             * @param creatorCallback The callback to invoke when the Game Object Creator is called.
             */
            registerGameObject(key: string, factoryCallback?: Function, creatorCallback?: Function): void;

            /**
             * Removes a previously registered Game Object from the global Game Object Factory and / or Creator.
             * This is usually called from within your Plugin destruction code to help clean-up after your plugin has been removed.
             * @param key The key of the Game Object to be removed from the factories.
             * @param removeFromFactory Should the Game Object be removed from the Game Object Factory? Default true.
             * @param removeFromCreator Should the Game Object be removed from the Game Object Creator? Default true.
             */
            removeGameObject(key: string, removeFromFactory?: boolean, removeFromCreator?: boolean): void;

            /**
             * Registers a new file type with the global File Types Manager, making it available to all Loader
             * Plugins created after this.
             * 
             * This is usually called from within your Plugin code and is a helpful short-cut for creating
             * new loader file types.
             * 
             * The key is the property that will be injected into the Loader Plugin and used to load the
             * files. For example:
             * 
             * ```javascript
             * this.plugins.registerFileType('wad', doomWadLoaderCallback);
             * // later in your preload code:
             * this.load.wad();
             * ```
             * 
             * The callback is what is called when the loader tries to load a file matching the given key.
             * It's important to understand that the callback is invoked within
             * the context of the LoaderPlugin. In this context there are several properties / methods available
             * to use:
             * 
             * this.addFile - A method to add the new file to the load queue.
             * this.scene - The Scene that owns the Loader Plugin instance.
             * 
             * See the LoaderPlugin class for more details. Any public property or method listed is available from
             * your callback under `this`.
             * @param key The key of the file type to register with the Loader Plugin, i.e. `wad`, `atlas`.
             * @param callback The callback to invoke when the Loader Plugin tries to load a file of this type.
             * @param addToScene Optionally add this file type into the Loader Plugin owned by the given Scene.
             */
            registerFileType(key: string, callback: Function, addToScene?: Phaser.Scene): void;

            /**
             * Destroys this Plugin Manager and all associated plugins.
             * It will iterate all plugins found and call their `destroy` methods.
             * 
             * The PluginCache will remove all custom plugins.
             */
            destroy(): void;

        }

        /**
         * A Scene Level Plugin is a plugin that is installed into every Scene and belongs to that Scene for its lifetime.
         * Unlike a Global Plugin, which exists once for the entire game, a Scene Plugin is instantiated separately for
         * each Scene and is destroyed when its Scene is destroyed.
         * 
         * You would extend this class when creating your own custom plugins that need per-Scene state or need to
         * respond to Scene lifecycle events such as `start`, `pause`, `sleep`, `wake`, `shutdown`, and `destroy`.
         * 
         * The plugin can map itself to a property on the Scene (e.g. `this.myPlugin`) and/or into the Scene Systems,
         * making it accessible from anywhere within that Scene. Override the `boot` method to set up event listeners
         * and initialize any per-Scene resources your plugin requires.
         */
        class ScenePlugin extends Phaser.Plugins.BasePlugin {
            /**
             * 
             * @param scene A reference to the Scene that has installed this plugin.
             * @param pluginManager A reference to the Plugin Manager.
             * @param pluginKey The key under which this plugin has been installed into the Scene Systems.
             */
            constructor(scene: Phaser.Scene, pluginManager: Phaser.Plugins.PluginManager, pluginKey: string);

            /**
             * A reference to the Scene that has installed this plugin.
             * Only set if it's a Scene Plugin, otherwise `null`.
             * This property is only set when the plugin is instantiated and added to the Scene, not before.
             * You can use it during the `boot` method.
             */
            protected scene: Phaser.Scene | null;

            /**
             * A reference to the Scene Systems of the Scene that has installed this plugin.
             * Only set if it's a Scene Plugin, otherwise `null`.
             * This property is only set when the plugin is instantiated and added to the Scene, not before.
             * You can use it during the `boot` method.
             */
            protected systems: Phaser.Scenes.Systems | null;

            /**
             * The key under which this plugin was installed into the Scene Systems.
             * 
             * This property is only set when the plugin is instantiated and added to the Scene, not before.
             * You can use it during the `boot` method.
             */
            readonly pluginKey: string;

            /**
             * This method is called when the Scene boots. It is only ever called once.
             * 
             * By this point the plugin properties `scene` and `systems` will have already been set.
             * 
             * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.
             * Here are the Scene events you can listen to:
             * 
             * - start
             * - ready
             * - preupdate
             * - update
             * - postupdate
             * - resize
             * - pause
             * - resume
             * - sleep
             * - wake
             * - transitioninit
             * - transitionstart
             * - transitioncomplete
             * - transitionout
             * - shutdown
             * - destroy
             * 
             * At the very least you should offer a destroy handler for when the Scene closes down, i.e:
             * 
             * ```javascript
             * var eventEmitter = this.systems.events;
             * eventEmitter.once('destroy', this.sceneDestroy, this);
             * ```
             */
            boot(): void;

            /**
             * Destroys this plugin and releases all references it holds, including the Scene, Scene Systems,
             * and Plugin Manager. This method is called automatically when the Scene is destroyed.
             * 
             * If you extend this class you should override this method, clean up any resources your plugin
             * has created, and then call `BasePlugin.destroy` via `super.destroy()` or the prototype chain.
             */
            destroy(): void;

        }

    }

    /**
     * Phaser Blend Modes.
     */
    enum BlendModes {
        /**
         * Skips the Blend Mode check in the renderer.
         */
        SKIP_CHECK,
        /**
         * Normal blend mode. For Canvas and WebGL.
         * This is the default setting and draws new shapes on top of the existing canvas content.
         */
        NORMAL,
        /**
         * Add blend mode. For Canvas and WebGL.
         * Where both shapes overlap the color is determined by adding color values.
         */
        ADD,
        /**
         * Multiply blend mode. For Canvas and WebGL.
         * The pixels of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.
         */
        MULTIPLY,
        /**
         * Screen blend mode. For Canvas and WebGL.
         * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)
         */
        SCREEN,
        /**
         * Overlay blend mode. For Canvas only.
         * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.
         */
        OVERLAY,
        /**
         * Darken blend mode. For Canvas only.
         * Retains the darkest pixels of both layers.
         */
        DARKEN,
        /**
         * Lighten blend mode. For Canvas only.
         * Retains the lightest pixels of both layers.
         */
        LIGHTEN,
        /**
         * Color Dodge blend mode. For Canvas only.
         * Divides the bottom layer by the inverted top layer.
         */
        COLOR_DODGE,
        /**
         * Color Burn blend mode. For Canvas only.
         * Divides the inverted bottom layer by the top layer, and then inverts the result.
         */
        COLOR_BURN,
        /**
         * Hard Light blend mode. For Canvas only.
         * A combination of multiply and screen like overlay, but with top and bottom layer swapped.
         */
        HARD_LIGHT,
        /**
         * Soft Light blend mode. For Canvas only.
         * A softer version of hard-light. Pure black or white does not result in pure black or white.
         */
        SOFT_LIGHT,
        /**
         * Difference blend mode. For Canvas only.
         * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.
         */
        DIFFERENCE,
        /**
         * Exclusion blend mode. For Canvas only.
         * Like difference, but with lower contrast.
         */
        EXCLUSION,
        /**
         * Hue blend mode. For Canvas only.
         * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.
         */
        HUE,
        /**
         * Saturation blend mode. For Canvas only.
         * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.
         */
        SATURATION,
        /**
         * Color blend mode. For Canvas only.
         * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.
         */
        COLOR,
        /**
         * Luminosity blend mode. For Canvas only.
         * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.
         */
        LUMINOSITY,
        /**
         * Alpha erase blend mode. For Canvas and WebGL.
         */
        ERASE,
        /**
         * Source-in blend mode. For Canvas only.
         * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.
         */
        SOURCE_IN,
        /**
         * Source-out blend mode. For Canvas only.
         * The new shape is drawn where it doesn't overlap the existing canvas content.
         */
        SOURCE_OUT,
        /**
         * Source-atop blend mode. For Canvas only.
         * The new shape is only drawn where it overlaps the existing canvas content.
         */
        SOURCE_ATOP,
        /**
         * Destination-over blend mode. For Canvas only.
         * New shapes are drawn behind the existing canvas content.
         */
        DESTINATION_OVER,
        /**
         * Destination-in blend mode. For Canvas only.
         * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.
         */
        DESTINATION_IN,
        /**
         * Destination-out blend mode. For Canvas only.
         * The existing content is kept where it doesn't overlap the new shape.
         */
        DESTINATION_OUT,
        /**
         * Destination-atop blend mode. For Canvas only.
         * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.
         */
        DESTINATION_ATOP,
        /**
         * Lighter blend mode. For Canvas only.
         * Where both shapes overlap the color is determined by adding color values.
         */
        LIGHTER,
        /**
         * Copy blend mode. For Canvas only.
         * Only the new shape is shown.
         */
        COPY,
        /**
         * Xor blend mode. For Canvas only.
         * Shapes are made transparent where both overlap and drawn normal everywhere else.
         */
        XOR,
    }

    /**
     * Phaser Scale Modes.
     */
    enum ScaleModes {
        /**
         * Default Scale Mode (Linear).
         */
        DEFAULT,
        /**
         * Linear Scale Mode. Uses bilinear interpolation when scaling textures, producing smooth results. Best for non-pixel-art graphics where smooth scaling is desired.
         */
        LINEAR,
        /**
         * Nearest Scale Mode. Uses nearest-neighbor sampling when scaling textures, preserving hard pixel edges without interpolation. Best for pixel art and retro-style graphics.
         */
        NEAREST,
    }

    /**
     * Phaser Tint Modes.
     * 
     * Tint modes are used by the Tint component to determine how the tint color
     * is applied to the texture. The default mode is `MULTIPLY`.
     * They are only used in WebGL.
     */
    enum TintModes {
        /**
         * Multiply tint mode (default). The tint color is multiplied with the texture color.
         */
        MULTIPLY,
        /**
         * Fill tint mode. The tint color replaces the texture color,
         * but respects the texture alpha.
         * 
         * You can use this mode to make a Game Object flash 'white' if hit by something.
         */
        FILL,
        /**
         * Additive tint mode. The tint color is added to the texture color,
         * but respects the texture alpha.
         */
        ADD,
        /**
         * Screen tint mode. The tint color brightens dark areas of the texture.
         */
        SCREEN,
        /**
         * Overlay tint mode. The tint color brightens light areas and darkens dark areas.
         */
        OVERLAY,
        /**
         * Hard light tint mode. The tint color brightens light areas and darkens dark areas.
         * This is like overlay, but with the tint color and texture color swapped.
         */
        HARD_LIGHT,
    }

    namespace Renderer {
        namespace Canvas {
            /**
             * The Canvas Renderer is responsible for managing 2D canvas rendering contexts,
             * including the one used by the Game's canvas. It tracks the internal state of a
             * given context and can render textured Game Objects to it, taking into
             * account alpha, blending, and scaling.
             */
            class CanvasRenderer extends Phaser.Events.EventEmitter {
                /**
                 * 
                 * @param game The Phaser Game instance that owns this renderer.
                 */
                constructor(game: Phaser.Game);

                /**
                 * The local configuration settings of the CanvasRenderer.
                 */
                config: object;

                /**
                 * The Phaser Game instance that owns this renderer.
                 */
                game: Phaser.Game;

                /**
                 * A constant which allows the renderer to be easily identified as a Canvas Renderer.
                 */
                type: number;

                /**
                 * The total number of Game Objects which were rendered in a frame.
                 */
                drawCount: number;

                /**
                 * The width of the canvas being rendered to.
                 */
                width: number;

                /**
                 * The height of the canvas being rendered to.
                 */
                height: number;

                /**
                 * The canvas element which the Game uses.
                 */
                gameCanvas: HTMLCanvasElement;

                /**
                 * The canvas context used to render all Cameras in all Scenes during the game loop.
                 */
                gameContext: CanvasRenderingContext2D;

                /**
                 * The canvas context currently used by the CanvasRenderer for all rendering operations.
                 */
                currentContext: CanvasRenderingContext2D;

                /**
                 * Should the Canvas use Image Smoothing or not when drawing Sprites?
                 */
                antialias: boolean;

                /**
                 * The blend modes supported by the Canvas Renderer.
                 * 
                 * This object maps the {@link Phaser.BlendModes} to canvas compositing operations.
                 */
                blendModes: any[];

                /**
                 * Details about the currently scheduled snapshot.
                 * 
                 * If a non-null `callback` is set in this object, a snapshot of the canvas will be taken after the current frame is fully rendered.
                 */
                snapshotState: Phaser.Types.Renderer.Snapshot.SnapshotState;

                /**
                 * Has this renderer fully booted yet?
                 */
                isBooted: boolean;

                /**
                 * Sets up the event listeners required by the renderer. Specifically, it
                 * listens for the Game BOOT event to fill the background color on the canvas,
                 * and waits for the Texture Manager's READY event before completing the boot
                 * sequence and registering the Scale Manager resize handler.
                 */
                init(): void;

                /**
                 * The event handler that manages the `resize` event dispatched by the Scale Manager.
                 * @param gameSize The default Game Size object. This is the un-modified game dimensions.
                 * @param baseSize The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.
                 */
                onResize(gameSize: Phaser.Structs.Size, baseSize: Phaser.Structs.Size): void;

                /**
                 * Updates the internal width and height values of the renderer to the given
                 * dimensions and emits the RESIZE event. This is called automatically when the
                 * Scale Manager detects a canvas size change.
                 * @param width The new width of the renderer.
                 * @param height The new height of the renderer.
                 */
                resize(width?: number, height?: number): void;

                /**
                 * Resets the transformation matrix of the current context to the identity matrix, thus resetting any transformation.
                 */
                resetTransform(): void;

                /**
                 * Sets the blend mode (compositing operation) of the current context.
                 * @param blendMode The new blend mode which should be used.
                 * @returns This CanvasRenderer object.
                 */
                setBlendMode(blendMode: string): this;

                /**
                 * Changes the Canvas Rendering Context that all draw operations are performed against.
                 * @param ctx The new Canvas Rendering Context to draw everything to. Leave empty to reset to the Game Canvas.
                 * @returns The Canvas Renderer instance.
                 */
                setContext(ctx?: CanvasRenderingContext2D | undefined): this;

                /**
                 * Sets the global alpha of the current context.
                 * @param alpha The new alpha to use, where 0 is fully transparent and 1 is fully opaque.
                 * @returns This CanvasRenderer object.
                 */
                setAlpha(alpha: number): this;

                /**
                 * Called at the start of each render loop. Resets the game context's global
                 * alpha, composite operation, and transform to their defaults. If the renderer
                 * is configured to clear the canvas before each render, it clears the viewport
                 * and, if the background is not transparent, fills it with the configured
                 * background color. Saves the context state and resets the draw count before
                 * emitting the PRE_RENDER_CLEAR and PRE_RENDER events.
                 */
                preRender(): void;

                /**
                 * The core render step for a Scene Camera.
                 * 
                 * Iterates through the given array of Game Objects and renders them with the given Camera.
                 * 
                 * This is called by the `CameraManager.render` method. The Camera Manager instance belongs to a Scene, and is invoked
                 * by the Scene Systems.render method.
                 * 
                 * This method is not called if `Camera.visible` is `false`, or `Camera.alpha` is zero.
                 * @param scene The Scene to render.
                 * @param children An array of filtered Game Objects that can be rendered by the given Camera.
                 * @param camera The Scene Camera to render with.
                 */
                render(scene: Phaser.Scene, children: Phaser.GameObjects.GameObject[], camera: Phaser.Cameras.Scene2D.Camera): void;

                /**
                 * Restores the game context's global settings and takes a snapshot if one is scheduled.
                 * 
                 * The post-render step happens after all Cameras in all Scenes have been rendered.
                 */
                postRender(): void;

                /**
                 * Takes a snapshot of the given area of the given canvas.
                 * 
                 * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.
                 * 
                 * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets
                 * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
                 * @param canvas The canvas to grab from.
                 * @param callback The Function to invoke after the snapshot image is created.
                 * @param getPixel Grab a single pixel as a Color object, or an area as an Image object? Default false.
                 * @param x The x coordinate to grab from. Default 0.
                 * @param y The y coordinate to grab from. Default 0.
                 * @param width The width of the area to grab. Default canvas.width.
                 * @param height The height of the area to grab. Default canvas.height.
                 * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
                 * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
                 * @returns This Canvas Renderer.
                 */
                snapshotCanvas(canvas: HTMLCanvasElement, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, getPixel?: boolean, x?: number, y?: number, width?: number, height?: number, type?: string, encoderOptions?: number): this;

                /**
                 * Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.
                 * 
                 * To capture a specific area see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.
                 * 
                 * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then
                 * calling this method will override it.
                 * 
                 * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets
                 * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
                 * @param callback The Function to invoke after the snapshot image is created.
                 * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
                 * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
                 * @returns This Canvas Renderer.
                 */
                snapshot(callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, type?: string, encoderOptions?: number): this;

                /**
                 * Schedules a snapshot of the given area of the game viewport to be taken after the current frame is rendered.
                 * 
                 * To capture the whole game viewport see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.
                 * 
                 * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then
                 * calling this method will override it.
                 * 
                 * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets
                 * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
                 * @param x The x coordinate to grab from.
                 * @param y The y coordinate to grab from.
                 * @param width The width of the area to grab.
                 * @param height The height of the area to grab.
                 * @param callback The Function to invoke after the snapshot image is created.
                 * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
                 * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
                 * @returns This Canvas Renderer.
                 */
                snapshotArea(x: number, y: number, width: number, height: number, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, type?: string, encoderOptions?: number): this;

                /**
                 * Schedules a snapshot of the given pixel from the game viewport to be taken after the current frame is rendered.
                 * 
                 * To capture the whole game viewport see the `snapshot` method. To capture a specific area, see `snapshotArea`.
                 * 
                 * Only one snapshot can be active _per frame_. If you have already called `snapshotArea`, for example, then
                 * calling this method will override it.
                 * 
                 * Unlike the other two snapshot methods, this one will return a `Color` object containing the color data for
                 * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,
                 * using less memory.
                 * @param x The x coordinate of the pixel to get.
                 * @param y The y coordinate of the pixel to get.
                 * @param callback The Function to invoke after the snapshot pixel data is extracted.
                 * @returns This Canvas Renderer.
                 */
                snapshotPixel(x: number, y: number, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback): this;

                /**
                 * Takes a Sprite Game Object, or any object that extends it, and draws it to the current context.
                 * @param sprite The texture based Game Object to draw.
                 * @param frame The frame to draw, doesn't have to be that owned by the Game Object.
                 * @param camera The Camera to use for the rendering transform.
                 * @param parentTransformMatrix The transform matrix of the parent container, if set.
                 */
                batchSprite(sprite: Phaser.GameObjects.GameObject, frame: Phaser.Textures.Frame, camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix): void;

                /**
                 * Removes all event listeners and nullifies all object references in the
                 * Canvas Renderer, allowing it to be garbage collected.
                 */
                destroy(): void;

            }

            /**
             * Returns an array which maps the default blend modes to supported Canvas blend modes.
             * 
             * If the browser doesn't support a blend mode, it will default to the normal `source-over` blend mode.undefined
             * @returns Which Canvas blend mode corresponds to which default Phaser blend mode.
             */
            function GetBlendModes(): any[];

            /**
             * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix
             * and then performs the following steps:
             * 
             * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts.
             * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given.
             * 3. Sets the blend mode of the context to be that used by the Game Object.
             * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera.
             * 5. Saves the context state.
             * 6. Sets the final matrix values into the context via setTransform.
             * 7. If the Game Object has a texture frame, imageSmoothingEnabled is set based on frame.source.scaleMode.
             * 8. If the Game Object does not have a texture frame, imageSmoothingEnabled is set based on Renderer.antialias.
             * 
             * This function is only meant to be used internally. Most of the Canvas Renderer classes use it.
             * @param renderer A reference to the current active Canvas renderer.
             * @param ctx The canvas context to set the transform on.
             * @param src The Game Object being rendered. Can be any type that extends the base class.
             * @param camera The Camera that is rendering the Game Object.
             * @param parentMatrix A parent transform matrix to apply to the Game Object before rendering.
             * @returns `true` if the Game Object context was set, otherwise `false`.
             */
            function SetTransform(renderer: Phaser.Renderer.Canvas.CanvasRenderer, ctx: CanvasRenderingContext2D, src: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): boolean;

        }

        namespace Events {
            /**
             * The Lose WebGL Event.
             * 
             * This event is dispatched by the WebGLRenderer when the WebGL context
             * is lost.
             * 
             * Context can be lost for a variety of reasons, like leaving the browser tab.
             * The game canvas DOM object will dispatch `webglcontextlost`.
             * All WebGL resources get wiped, and the context is reset.
             * 
             * While WebGL is lost, the game will continue to run, but all WebGL resources
             * are lost, and new ones cannot be created.
             * 
             * Once the context is restored and the renderer has automatically restored
             * the state, the renderer will emit a `RESTORE_WEBGL` event. At that point,
             * it is safe to continue.
             */
            const LOSE_WEBGL: string;

            /**
             * The Post-Render Event.
             * 
             * This event is dispatched by the Renderer when all rendering, for all cameras in all Scenes,
             * has completed, but before any pending snapshots have been taken.
             */
            const POST_RENDER: string;

            /**
             * The Pre-Render Clear Event.
             * 
             * This event is dispatched by the Phaser Renderer. It happens at the start of the render step, before
             * the WebGL gl.clear function has been called. This allows you to toggle the `config.clearBeforeRender` property
             * as required, to have fine-grained control over when the canvas is cleared during rendering.
             * 
             * Listen to it from within a Scene using: `this.renderer.events.on('prerenderclear', listener)`.
             * 
             * It's very important to understand that this event is called _before_ the scissor and mask stacks are cleared.
             * This means you should not use this event to modify the scissor or mask. Instead, use the `prerender` event for that.
             * 
             * If using the Canvas Renderer, this event is dispatched before the canvas is cleared, but after the context globalAlpha
             * and transform have been reset.
             */
            const PRE_RENDER_CLEAR: string;

            /**
             * The Pre-Render Event.
             * 
             * This event is dispatched by the Phaser Renderer. This happens right at the start of the render
             * process, after the context has been cleared, the scissors enabled (WebGL only) and everything has been
             * reset ready for the render.
             */
            const PRE_RENDER: string;

            /**
             * The Render Event.
             * 
             * This event is dispatched by the Phaser Renderer for every camera in every Scene.
             * 
             * It is dispatched before any of the children in the Scene have been rendered.
             */
            const RENDER: string;

            /**
             * The Renderer Resize Event.
             * 
             * This event is dispatched by the Phaser Renderer when it is resized, usually as a result
             * of the Scale Manager resizing.
             */
            const RESIZE: string;

            /**
             * The Restore WebGL Event.
             * 
             * This event is dispatched by the WebGLRenderer when the WebGL context
             * is restored.
             * 
             * It is dispatched after all WebGL resources have been recreated.
             * Most resources should come back automatically, but you will need to redraw
             * dynamic textures that were GPU bound.
             * Listen to this event to know when you can safely do that.
             * 
             * Context can be lost for a variety of reasons, like leaving the browser tab.
             * The game canvas DOM object will dispatch `webglcontextlost`.
             * All WebGL resources get wiped, and the context is reset.
             * 
             * Once the context is restored, the canvas will dispatch
             * `webglcontextrestored`. Phaser uses this to re-create necessary resources.
             * Please wait for Phaser to dispatch the `RESTORE_WEBGL` event before
             * re-creating any resources of your own.
             */
            const RESTORE_WEBGL: string;

            /**
             * The Set Parallel Texture Units Event.
             * 
             * This event is dispatched by the RenderNodeManager when
             * `maxParallelTextureUnits` is set after boot.
             * This advises the listener of the number of texture units
             * that should be used in parallel, for performance reasons.
             * 
             * In general, the number of units is either
             * the number of texture units available on the device,
             * or 1 if the device is expected to perform badly with
             * multiple texture units in parallel.
             * 
             * The primary consumer of this event is batch render nodes.
             */
            const SET_PARALLEL_TEXTURE_UNITS: string;

        }

        namespace Snapshot {
            /**
             * Takes a snapshot of the current frame displayed by a canvas. Depending on the
             * configuration, this can operate in one of three modes: single-pixel color sampling,
             * partial area capture, or full canvas capture.
             * 
             * In pixel mode, the color at the given (x, y) coordinate is read and the callback
             * is invoked immediately with a `Phaser.Display.Color` object.
             * 
             * In area or full capture mode, the relevant region is encoded as a data URL and
             * assigned to a new Image object. Once the image has loaded, the callback provided
             * in the Snapshot Configuration object is invoked with the Image as its argument.
             * If the image fails to load, the callback is still invoked but with no argument.
             * @param canvas The canvas to take a snapshot of.
             * @param config The snapshot configuration object.
             */
            function Canvas(canvas: HTMLCanvasElement, config: Phaser.Types.Renderer.Snapshot.SnapshotState): void;

            /**
             * Takes a snapshot of an area from the current frame displayed by a WebGL canvas,
             * or reads the color value of a single pixel, depending on the `getPixel` property
             * of the snapshot configuration object.
             * 
             * When capturing an area, the raw pixel data is read from the WebGL context and
             * composited into a temporary canvas, accounting for WebGL's inverted Y-axis and
             * optionally reversing pre-multiplied alpha. The canvas is then serialized to a
             * data URL and loaded into an Image object, which is passed to the callback defined
             * in the Snapshot Configuration object once loading completes.
             * 
             * When reading a single pixel, the RGBA values at the given coordinates are read
             * directly via `gl.readPixels` and returned as a `Phaser.Display.Color` object
             * via the callback.
             * @param sourceContext The WebGL context to take a snapshot of.
             * @param config The snapshot configuration object.
             */
            function WebGL(sourceContext: WebGLRenderingContext, config: Phaser.Types.Renderer.Snapshot.SnapshotState): void;

        }

        namespace WebGL {
            /**
             * DrawingContext
             */
            class DrawingContext {
                /**
                 * 
                 * @param renderer The renderer that owns this context.
                 * @param options The options for this context.
                 */
                constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer, options?: Phaser.Types.Renderer.WebGL.RenderNodes.DrawingContextOptions);

                /**
                 * The renderer that owns this context.
                 */
                renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                /**
                 * The camera used by this context. Set this using `setCamera` to ensure
                 * the view matrix is updated. Ensure that this is not `null` before
                 * rendering.
                 */
                readonly camera: Phaser.Cameras.Scene2D.Camera | null;

                /**
                 * Relevant WebGL state for the DrawingContext.
                 * Contains the framebuffer, scissor box, and viewport.
                 */
                state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters;

                /**
                 * The blend mode to use when rendering.
                 * This is an index into the renderer's blendModes array.
                 * It is faster to check than the state object.
                 */
                blendMode: number;

                /**
                 * Which renderbuffers in the framebuffer to clear when the DrawingContext comes into use.
                 * This is the mask of buffers to clear:
                 * gl.COLOR_BUFFER_BIT, gl.DEPTH_BUFFER_BIT, gl.STENCIL_BUFFER_BIT.
                 */
                autoClear: number;

                /**
                 * Whether to use the canvas as the framebuffer.
                 */
                useCanvas: boolean;

                /**
                 * The WebGLFramebufferWrapper which will hold the framebuffer output.
                 * This may contain the canvas.
                 */
                framebuffer: Phaser.Renderer.WebGL.Wrappers.WebGLFramebufferWrapper;

                /**
                 * The WebGLTextureWrapper which will hold the framebuffer output.
                 * This is only used if `useCanvas` is `false`.
                 */
                texture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | null;

                /**
                 * Whether to enable mipmaps on the framebuffer texture, if it exists.
                 * The game must still be set to use mipmaps for this to work.
                 */
                enableMipmap: boolean;

                /**
                 * The pool to return to when this context is no longer needed.
                 * Used only for temporary contexts.
                 */
                pool: Phaser.Renderer.WebGL.DrawingContextPool;

                /**
                 * The last time the DrawingContext was used.
                 * This is used to determine whether the context is a candidate
                 * for reuse in a pool.
                 */
                lastUsed: number;

                /**
                 * The width of the framebuffer.
                 */
                width: number;

                /**
                 * The height of the framebuffer.
                 */
                height: number;

                /**
                 * Resize the DrawingContext.
                 * 
                 * If no framebuffer exists yet, a new texture and framebuffer are created at the given dimensions. If a framebuffer already exists, it is resized in place. The scissor box and viewport are reset to match the new size.
                 * @param width The new width of the framebuffer.
                 * @param height The new height of the framebuffer.
                 */
                resize(width: number, height: number): void;

                /**
                 * Copy the state of another DrawingContext.
                 * @param source The DrawingContext to copy from.
                 */
                copy(source: Phaser.Renderer.WebGL.DrawingContext): void;

                /**
                 * Create a clone of the DrawingContext. This is intended to be mutated
                 * for temporary use, and then thrown away.
                 * 
                 * The autoClear setting is set to false unless specified.
                 * This is because most clones reference an existing framebuffer,
                 * which is intended to accumulate drawing operations.
                 * @param preserveAutoClear Whether to preserve the autoClear setting. Default false.
                 * @returns The cloned DrawingContext.
                 */
                getClone(preserveAutoClear?: boolean): Phaser.Renderer.WebGL.DrawingContext;

                /**
                 * Set the buffers to clear when the DrawingContext comes into use.
                 * @param color Whether to clear the color buffer.
                 * @param depth Whether to clear the depth buffer.
                 * @param stencil Whether to clear the stencil buffer.
                 */
                setAutoClear(color: boolean, depth: boolean, stencil: boolean): void;

                /**
                 * Set the blend mode for the DrawingContext.
                 * @param blendMode The blend mode to set.
                 * @param blendColor The blend color to set. This is an array of 4 values: red, green, blue, alpha.
                 */
                setBlendMode(blendMode: number, blendColor?: number[]): void;

                /**
                 * Set the camera for the DrawingContext.
                 * @param camera The camera to set.
                 */
                setCamera(camera: Phaser.Cameras.Scene2D.Camera): void;

                /**
                 * Set the clear color for the DrawingContext.
                 * No changes will be made if the color is the same as the current clear color.
                 * @param r The red component of the color to clear with.
                 * @param g The green component of the color to clear with.
                 * @param b The blue component of the color to clear with.
                 * @param a The alpha component of the color to clear with.
                 */
                setClearColor(r: number, g: number, b: number, a: number): void;

                /**
                 * Set the scissor box for the DrawingContext.
                 * @param x The x coordinate of the scissor box.
                 * @param y The y coordinate of the scissor box.
                 * @param width The width of the scissor box.
                 * @param height The height of the scissor box.
                 */
                setScissorBox(x: number, y: number, width: number, height: number): void;

                /**
                 * Enable or disable the scissor box for the DrawingContext.
                 * @param enable Whether to enable the scissor box.
                 */
                setScissorEnable(enable: boolean): void;

                /**
                 * Begin using the DrawingContext.
                 * This will finish any outstanding batches and run any autoClear.
                 */
                use(): void;

                /**
                 * End using the DrawingContext. This marks the context as not in use,
                 * so its framebuffer and texture are not needed any more
                 * and may be cleared at any time. This will finish any outstanding batches.
                 * 
                 * If there are no locks on the DrawingContext, and it comes from a pool,
                 * it will be returned to its pool.
                 */
                release(): void;

                /**
                 * Lock the DrawingContext to be in use.
                 * This prevents `release` from returning it to its pool
                 * until `unlock` is called with the appropriate key.
                 * This is used for temporary DrawingContexts,
                 * which may be returned to a pool.
                 * @param key The key to lock the DrawingContext with.
                 */
                lock(key: any): void;

                /**
                 * Unlock the DrawingContext.
                 * This allows `release` to return it to its pool.
                 * @param key The key to unlock the DrawingContext with. This must be the same key used to lock it.
                 * @param release Whether to release the DrawingContext immediately. This will only happen if there are no other locks on it.
                 */
                unlock(key: any, release?: boolean): void;

                /**
                 * Check whether the DrawingContext is locked.undefined
                 * @returns Whether the DrawingContext is locked.
                 */
                isLocked(): boolean;

                /**
                 * Begin drawing with the DrawingContext.
                 * 
                 * This should be called before rendering to set up the framebuffer
                 * and other WebGL state.
                 */
                beginDraw(): void;

                /**
                 * Clear the framebuffer. This will bind the framebuffer.
                 * @param bits A bitmask of WebGL buffer bits to clear (e.g. `gl.COLOR_BUFFER_BIT`, `gl.DEPTH_BUFFER_BIT`, `gl.STENCIL_BUFFER_BIT`). Defaults to the `autoClear` value of this context.
                 */
                clear(bits?: number): void;

                /**
                 * Destroys the DrawingContext and its resources.
                 */
                destroy(): void;

            }

            /**
             * A pool of DrawingContexts.
             * 
             * This class is used internally by the WebGLRenderer to manage DrawingContexts.
             * It attempts to reuse DrawingContexts efficiently. When `get` is called,
             * it will return a DrawingContext of the given dimensions,
             * using the following priority:
             * 
             * 1. A spare DrawingContext that has the same dimensions.
             * 2. A spare DrawingContext that has not been used recently, resized.
             * 3. A new DrawingContext, within the maximum pool size.
             * 4. The oldest spare DrawingContext, resized.
             * 5. A new DrawingContext, exceeding the maximum pool size.
             * 
             * We assume that DrawingContexts of a given size are likely to be reused
             * from frame to frame, so we try to preserve them for greater efficiency.
             */
            class DrawingContextPool {
                /**
                 * 
                 * @param renderer The renderer that owns this DrawingContextPool.
                 * @param maxAge The maximum age of a pooled DrawingContext in milliseconds, after which it becomes eligible for resizing and reuse.
                 * @param maxPoolSize The soft maximum number of DrawingContexts to keep in the pool. The pool may exceed this limit temporarily if demand requires it.
                 */
                constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer, maxAge: number, maxPoolSize: number);

                /**
                 * The renderer that owns this DrawingContextPool.
                 */
                renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                /**
                 * The maximum age of a DrawingContext in milliseconds.
                 * After this time, the DrawingContext will be available for resizing.
                 */
                maxAge: number;

                /**
                 * The maximum number of DrawingContexts to store.
                 * This is not a hard limit, but the pool will attempt to
                 * reuse DrawingContexts rather than create new ones.
                 */
                maxPoolSize: number;

                /**
                 * The pool of DrawingContexts by age.
                 * This is an array of DrawingContexts, oldest first.
                 */
                agePool: Phaser.Renderer.WebGL.DrawingContext[];

                /**
                 * The pool of DrawingContexts by size.
                 * This is an object with keys of the form `${width}x${height}`.
                 * Each value is an array of DrawingContexts.
                 */
                sizePool: object;

                /**
                 * Adds a DrawingContext to the pool.
                 * This is used by a DrawingContext to signal that it is available for reuse.
                 * @param drawingContext The DrawingContext to add to the pool.
                 */
                add(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                /**
                 * Returns a DrawingContext of the requested dimensions, following the pool's
                 * priority order: an exact-size spare, an aged spare resized, a newly created
                 * context within the pool limit, the oldest spare resized, or finally a newly
                 * created context that exceeds the pool limit. If width or height are omitted,
                 * the renderer's current dimensions are used. Both values are clamped to the
                 * renderer's maximum texture size.
                 * @param width The width of the DrawingContext.
                 * @param height The height of the DrawingContext.
                 * @returns The DrawingContext.
                 */
                get(width?: number, height?: number): Phaser.Renderer.WebGL.DrawingContext;

                /**
                 * Sets the maximum age of a DrawingContext in milliseconds.
                 * @param maxAge The maximum age of a DrawingContext in milliseconds.
                 */
                setMaxAge(maxAge: number): void;

                /**
                 * Sets the maximum number of DrawingContexts to store.
                 * @param maxPoolSize The maximum number of DrawingContexts to store.
                 */
                setMaxPoolSize(maxPoolSize: number): void;

                /**
                 * Clears the DrawingContextPool. This will not destroy any DrawingContexts
                 * that are currently in use.
                 */
                clear(): void;

                /**
                 * Prunes the DrawingContextPool down to the maximum pool size.
                 * Oldest DrawingContexts will be destroyed first.
                 * This will not destroy any DrawingContexts that are currently in use.
                 */
                prune(): void;

            }

            /**
             * The ProgramManager is a utility class used to manage
             * instantiated shader programs and a suite of associated data,
             * such as a VAO. It maintains a shared pool of uniforms,
             * so if a different shader program is used, the uniforms
             * can be applied to the new program.
             */
            class ProgramManager {
                /**
                 * 
                 * @param renderer The current WebGLRenderer instance.
                 * @param attributeBufferLayouts The attribute buffer layouts to use in the program.
                 * @param indexBuffer The index buffer to use in the program, if any.
                 */
                constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer, attributeBufferLayouts: Phaser.Types.Renderer.WebGL.WebGLAttributeBufferLayout[], indexBuffer?: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper);

                /**
                 * The current WebGLRenderer instance.
                 */
                renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                /**
                 * The index buffer to use in the program, if any.
                 * This is used to create a VAO.
                 */
                indexBuffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper | null;

                /**
                 * The attribute buffer layouts to use in the program.
                 * These are used to create a VAO.
                 */
                attributeBufferLayouts: Phaser.Types.Renderer.WebGL.WebGLAttributeBufferLayout[];

                /**
                 * The key of the currently active shader program.
                 */
                currentProgramKey: string | null;

                /**
                 * The configuration object currently being assembled.
                 */
                currentConfig: object;

                /**
                 * A map of shader programs and associated data suite,
                 * identified by a unique key.
                 * 
                 * Each key corresponds to an object of the following shape:
                 * 
                 * - `program` (WebGLProgramWrapper) - The compiled shader program.
                 * - `vao` (WebGLVAOWrapper) - The VAO associated with the program.
                 * - `config` (object) - The configuration object used to create the program.
                 */
                programs: object;

                /**
                 * A map of uniform values, identified by the shader uniform names.
                 * This allows uniforms to be kept between shader programs.
                 */
                uniforms: object;

                /**
                 * Returns a program suite based on the current configuration.
                 * If the program does not exist, it is created.
                 * 
                 * The suite contains the following properties:
                 * 
                 * - `program` (WebGLProgramWrapper) - The compiled shader program.
                 * - `vao` (WebGLVAOWrapper) - The VAO associated with the program.
                 * - `config` (object) - The configuration object used to create the program.
                 * 
                 * If parallel shader compilation is enabled,
                 * the program may not be available immediately.
                 * In this case, `null` is returned.undefined
                 * @returns The program suite, or `null` if the program is not available.
                 */
                getCurrentProgramSuite(): Object | null;

                /**
                 * Resets the current configuration object to its default empty state,
                 * clearing the base vertex and fragment shaders, all shader additions,
                 * and all features.
                 */
                resetCurrentConfig(): void;

                /**
                 * Set the value of a uniform,
                 * available for all shader programs in this manager.
                 * @param name The name of the uniform.
                 * @param value The value of the uniform.
                 */
                setUniform(name: string, value: any): void;

                /**
                 * Delete a uniform value. While unused uniforms are not harmful,
                 * they do take time to process and can be a source of confusion.
                 * @param name The name of the uniform.
                 */
                removeUniform(name: string): void;

                /**
                 * Remove all uniforms.
                 */
                clearUniforms(): void;

                /**
                 * Applies all stored uniform values to the given shader program.
                 * This is used to restore uniform state when switching between
                 * shader programs, ensuring the new program receives the same
                 * uniform values as the previous one.
                 * @param program The shader program to apply the uniforms to.
                 */
                applyUniforms(program: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper): void;

                /**
                 * Set the base shader for the current configuration.
                 * @param name The name of the shader program.
                 * @param vertexShader The vertex shader source code.
                 * @param fragmentShader The fragment shader source code.
                 */
                setBaseShader(name: string, vertexShader: string, fragmentShader: string): void;

                /**
                 * Add a shader addition to the current configuration.
                 * @param addition The shader addition to add.
                 * @param index The index at which to insert the addition. If not specified, it will be added at the end.
                 */
                addAddition(addition: Phaser.Types.Renderer.WebGL.ShaderAdditionConfig, index?: number): void;

                /**
                 * Returns the addition with the given name.
                 * @param name The name to find.
                 * @returns The addition, or `null` if it was not found.
                 */
                getAddition(name: string): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig | null;

                /**
                 * Returns a list of shader additions in the current config
                 * that have a specific tag.
                 * @param tag The tag to filter by.
                 * @returns The shader additions with the tag.
                 */
                getAdditionsByTag(tag: string): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig[];

                /**
                 * Returns the index of a shader addition with the given name.
                 * @param name The name to find.
                 * @returns The index of the addition, or `-1` if it was not found.
                 */
                getAdditionIndex(name: string): number;

                /**
                 * Remove a shader addition from the current configuration.
                 * @param name The name of the shader addition to remove.
                 */
                removeAddition(name: string): void;

                /**
                 * Replace a shader addition in the current configuration.
                 * @param name The name of the shader addition to replace.
                 * @param addition The new shader addition.
                 */
                replaceAddition(name: string, addition: Phaser.Types.Renderer.WebGL.ShaderAdditionConfig): void;

                /**
                 * Add a feature to the current configuration.
                 * @param feature The feature to add.
                 */
                addFeature(feature: string): void;

                /**
                 * Remove a feature from the current configuration.
                 * @param feature The feature to remove.
                 */
                removeFeature(feature: string): void;

                /**
                 * Clear all features from the current configuration.
                 */
                clearFeatures(): void;

            }

            /**
             * The ShaderProgramFactory is a utility class used to create and cache
             * {@link Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper} objects for the
             * WebGL renderer. It assembles compiled shader programs from a base shader
             * combined with optional additions and feature flags, then stores the result
             * under a unique key so that the same combination is never compiled more than
             * once. Use this class when you need to obtain a shader program that may vary
             * at runtime based on renderer capabilities or pipeline configuration.
             */
            class ShaderProgramFactory {
                /**
                 * 
                 * @param renderer The WebGLRenderer that owns this ShaderProgramFactory.
                 */
                constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer);

                /**
                 * The WebGLRenderer that owns this ShaderProgramFactory.
                 */
                renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                /**
                 * A map of shader programs, identified by a unique key.
                 * 
                 * The key of each shader program is made up of the following components:
                 * 
                 * - The key of the base shader program.
                 * - The key of each shader addition, in addition order.
                 * - The key of each enabled shader feature, sorted alphabetically.
                 */
                programs: object;

                /**
                 * Checks whether a compiled shader program with the given key already exists
                 * in the internal cache.
                 * @param key The unique key of the shader program.
                 * @returns `true` if a shader program with this key exists in the cache, otherwise `false`.
                 */
                has(key: string): boolean;

                /**
                 * Returns a compiled shader program for the given configuration. If a
                 * program matching the derived key already exists in the cache it is
                 * returned immediately; otherwise a new program is compiled, stored in the
                 * cache, and returned.
                 * @param base The base shader configuration.
                 * @param additions An array of shader addition configurations.
                 * @param features An array of enabled shader feature keys.
                 * @returns The compiled shader program wrapper.
                 */
                getShaderProgram(base: BaseShaderConfig, additions?: Phaser.Types.Renderer.WebGL.ShaderAdditionConfig[], features?: string[]): Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper;

                /**
                 * Returns a unique key for a shader program based on the given configuration settings.
                 * 
                 * The key is made up of the following components:
                 * 
                 * - The key of the base shader program.
                 * - The key of each shader addition, in addition order.
                 * - The key of each enabled shader feature, sorted alphabetically.
                 * @param base The base shader configuration.
                 * @param additions An array of shader addition configurations.
                 * @param features An array of enabled shader feature keys.
                 * @returns The unique cache key for this shader configuration.
                 */
                getKey(base: BaseShaderConfig, additions?: Phaser.Types.Renderer.WebGL.ShaderAdditionConfig[], features?: string[]): string;

                /**
                 * Creates a shader program based on the given configuration settings.
                 * @param name The unique key of the shader program.
                 * @param base The base shader configuration.
                 * @param additions An array of shader addition configurations.
                 * @param features An array of enabled shader feature keys.
                 * @returns The newly compiled and cached shader program wrapper.
                 */
                createShaderProgram(name: string, base: BaseShaderConfig, additions?: Phaser.Types.Renderer.WebGL.ShaderAdditionConfig[], features?: string[]): Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper;

            }

            namespace Utils {
                /**
                 * Packs four floats in a range from 0.0 to 1.0 into a single Uint32
                 * @param r Red component in a range from 0.0 to 1.0
                 * @param g Green component in a range from 0.0 to 1.0
                 * @param b Blue component in a range from 0.0 to 1.0
                 * @param a Alpha component in a range from 0.0 to 1.0
                 * @returns The packed RGBA values as a Uint32.
                 */
                function getTintFromFloats(r: number, g: number, b: number, a: number): number;

                /**
                 * Packs a Uint24, representing RGB components, with a Float32, representing
                 * the alpha component, with a range between 0.0 and 1.0 and returns a Uint32
                 * @param rgb Uint24 representing RGB components
                 * @param a Float32 representing Alpha component
                 * @returns Packed RGBA as Uint32
                 */
                function getTintAppendFloatAlpha(rgb: number, a: number): number;

                /**
                 * Packs a Uint24, representing RGB components, with a Float32, representing
                 * the alpha component, with a range between 0.0 and 1.0 and returns a
                 * swizzled Uint32 with the red and blue channels exchanged (RGB becomes BGR)
                 * @param rgb Uint24 representing RGB components
                 * @param a Float32 representing Alpha component
                 * @returns Packed RGBA as Uint32
                 */
                function getTintAppendFloatAlphaAndSwap(rgb: number, a: number): number;

                /**
                 * Unpacks a Uint24 RGB into an array of floats with values in the range 0.0 to 1.0
                 * @param rgb RGB packed as a Uint24
                 * @returns Array of floats representing each component as a float
                 */
                function getFloatsFromUintRGB(rgb: number): any[];

                /**
                 * Check to see how many texture units the GPU supports in a fragment shader
                 * and if the value specified in the game config is allowed.
                 * 
                 * This value is hard-clamped to 16 for performance reasons on Android devices.
                 * @param gl The WebGLContext used to create the shaders.
                 * @param maxTextures The Game Config maxTextures value.
                 * @returns The number of texture units that is supported by this browser and GPU.
                 */
                function checkShaderMax(gl: WebGLRenderingContext, maxTextures: number): number;

                /**
                 * Sets or clears all lighting-related uniforms on the given shader program manager.
                 * 
                 * When `enable` is `true`, this function queries the Scene's Light Manager for all
                 * active lights visible to the camera and uploads their positions, colors, intensities,
                 * and radii as uniform arrays to the shader. It also uploads the ambient light color,
                 * camera transform, and the normal map texture unit. Optionally enables self-shadowing
                 * by uploading the penumbra and diffuse threshold uniforms.
                 * 
                 * When `enable` is `false`, all previously set lighting uniforms are removed from the
                 * program manager. If the Scene has no active Light Manager, the function returns early
                 * without making any changes.
                 * @param enable Whether to enable lighting.
                 * @param drawingContext The DrawingContext instance.
                 * @param programManager The ShaderProgramManager instance.
                 * @param textureUnit The texture unit to use for the normal map.
                 * @param vec A Vector2 instance.
                 * @param selfShadow Whether to enable self-shadowing.
                 * @param selfShadowPenumbra The penumbra value for self-shadowing.
                 * @param selfShadowThreshold The threshold value for self-shadowing.
                 */
                function updateLightingUniforms(enable: boolean, drawingContext: Phaser.Renderer.WebGL.DrawingContext, programManager: Phaser.Renderer.WebGL.ProgramManager, textureUnit: number, vec: Phaser.Math.Vector2, selfShadow?: boolean, selfShadowPenumbra?: number, selfShadowThreshold?: number): void;

            }

            /**
             * WebGLRenderer is a class that contains the needed functionality to keep the
             * WebGLRenderingContext state clean. The main idea of the WebGLRenderer is to keep track of
             * any context change that happens for WebGL rendering inside of Phaser. This means
             * if raw webgl functions are called outside the WebGLRenderer of the Phaser WebGL
             * rendering ecosystem they might pollute the current WebGLRenderingContext state producing
             * unexpected behavior. It's recommended that WebGL interaction is done through
             * WebGLRenderer and/or built-in RenderNodes.
             * 
             * Persistent WebGL objects are stored in "wrappers" which are created by the WebGLRenderer.
             * Wrappers contain WebGL objects and metadata about those objects.
             * This can be used to recreate the WebGL state after a context loss.
             * Prefer to pass references to the wrappers, rather than the raw WebGL objects,
             * as the raw objects may be destroyed or replaced at any time.
             * Extract them only when needed.
             * 
             * WebGL state, such as blend mode or texture units, is managed by the WebGLRenderer.
             * Use `WebGLRenderer.glWrapper` to manage the current state
             * rather than setting it directly on the WebGLRenderingContext.
             * The state wrapper will ensure that the state is only set if it has changed,
             * and can restore the state after a context loss or external render call.
             */
            class WebGLRenderer extends Phaser.Events.EventEmitter {
                /**
                 * 
                 * @param game The Game instance which owns this WebGL Renderer.
                 */
                constructor(game: Phaser.Game);

                /**
                 * The local configuration settings of this WebGL Renderer.
                 */
                config: object;

                /**
                 * The Game instance which owns this WebGL Renderer.
                 */
                game: Phaser.Game;

                /**
                 * A constant which allows the renderer to be easily identified as a WebGL Renderer.
                 */
                type: number;

                /**
                 * An instance of the RenderNodeManager class which handles all
                 * RenderNodes used by the WebGLRenderer.
                 */
                renderNodes: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager;

                /**
                 * The RenderNode to use for rendering individual cameras.
                 * 
                 * This will be populated during the `boot` method.
                 */
                cameraRenderNode: Phaser.Renderer.WebGL.RenderNodes.RenderNode;

                /**
                 * The shader program factory for managing variant shaders.
                 */
                shaderProgramFactory: Phaser.Renderer.WebGL.ShaderProgramFactory;

                /**
                 * The width of the canvas being rendered to.
                 * This is populated in the onResize event handler.
                 */
                width: number;

                /**
                 * The height of the canvas being rendered to.
                 * This is populated in the onResize event handler.
                 */
                height: number;

                /**
                 * The canvas which this WebGL Renderer draws to.
                 */
                canvas: HTMLCanvasElement;

                /**
                 * An array of blend modes supported by the WebGL Renderer.
                 * 
                 * This array includes the default blend modes as well as any custom blend modes added through {@link #addBlendMode}.
                 */
                blendModes: Phaser.Types.Renderer.WebGL.WebGLBlendParameters[];

                /**
                 * This property is set to `true` if the WebGL context of the renderer is lost.
                 */
                contextLost: boolean;

                /**
                 * Details about the currently scheduled snapshot.
                 * 
                 * If a non-null `callback` is set in this object, a snapshot of the canvas will be taken after the current frame is fully rendered.
                 */
                snapshotState: Phaser.Types.Renderer.Snapshot.SnapshotState;

                /**
                 * The maximum number of textures the GPU can handle. The minimum under the WebGL1 spec is 8.
                 * This is set via the Game Config `maxTextures` property and should never be changed after boot.
                 */
                maxTextures: number;

                /**
                 * A list containing the indices of all available texture units.
                 * This is populated during the `init` method.
                 * It is used internally to connect texture units to shaders.
                 */
                textureUnitIndices: number[];

                /**
                 * A list of all WebGLBufferWrappers that have been created by this renderer.
                 */
                glBufferWrappers: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper[];

                /**
                 * A list of all WebGLProgramWrappers that have been created by this renderer.
                 */
                glProgramWrappers: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper[];

                /**
                 * A list of all WebGLTextureWrappers that have been created by this renderer.
                 */
                glTextureWrappers: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper[];

                /**
                 * A list of all WebGLFramebufferWrappers that have been created by this renderer.
                 */
                glFramebufferWrappers: Phaser.Renderer.WebGL.Wrappers.WebGLFramebufferWrapper[];

                /**
                 * A list of all WebGLVAOWrappers that have been created by this renderer.
                 */
                glVAOWrappers: Phaser.Renderer.WebGL.Wrappers.WebGLVAOWrapper[];

                /**
                 * A generic quad index buffer. This is a READ-ONLY buffer.
                 * It describes the four corners of a quad,
                 * a structure which is used in several places in the renderer.
                 */
                readonly genericQuadIndexBuffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;

                /**
                 * The DrawingContext used for the base canvas.
                 */
                baseDrawingContext: Phaser.Renderer.WebGL.DrawingContext;

                /**
                 * The camera currently being rendered by `render`.
                 */
                currentViewCamera: Phaser.Cameras.Scene2D.Camera;

                /**
                 * A pool of DrawingContexts which can be reused.
                 */
                drawingContextPool: Phaser.Renderer.WebGL.DrawingContextPool;

                /**
                 * The handler to invoke when the context is lost.
                 * This should not be changed and is set in the boot method.
                 */
                contextLostHandler: Function;

                /**
                 * The handler to invoke when the context is restored.
                 * This should not be changed and is set in the boot method.
                 */
                contextRestoredHandler: Function;

                /**
                 * The previous contextLostHandler that was in use.
                 * This is set when `setContextHandlers` is called.
                 */
                previousContextLostHandler: Function;

                /**
                 * The previous contextRestoredHandler that was in use.
                 * This is set when `setContextHandlers` is called.
                 */
                previousContextRestoredHandler: Function;

                /**
                 * The underlying WebGL context of the renderer.
                 */
                gl: WebGLRenderingContext;

                /**
                 * The current WebGLRenderingContext state.
                 */
                glWrapper: Phaser.Renderer.WebGL.Wrappers.WebGLGlobalWrapper;

                /**
                 * The current WebGL texture units in use.
                 */
                glTextureUnits: Phaser.Renderer.WebGL.Wrappers.WebGLTextureUnitsWrapper;

                /**
                 * Array of strings that indicate which WebGL extensions are supported by the browser.
                 * This is populated in the `setExtensions` method.
                 */
                supportedExtensions: string[];

                /**
                 * If the browser supports the `ANGLE_instanced_arrays` extension, this property will hold
                 * a reference to the glExtension for it.
                 * 
                 * This is populated in the `setExtensions` method.
                 */
                instancedArraysExtension: ANGLE_instanced_arrays;

                /**
                 * If the browser supports the `KHR_parallel_shader_compile` extension,
                 * this property will hold a reference to the glExtension for it.
                 * 
                 * This is populated in the `setExtensions` method.
                 */
                parallelShaderCompileExtension: KHR_parallel_shader_compile;

                /**
                 * If the browser supports the `OES_standard_derivatives` extension,
                 * and the `smoothPixelArt` config option is true,
                 * this property will hold a reference to the glExtension for it.
                 * 
                 * This is populated in the `setExtensions` method.
                 */
                standardDerivativesExtension: OES_standard_derivatives;

                /**
                 * If the browser supports the `OES_vertex_array_object` extension, this property will hold
                 * a reference to the glExtension for it.
                 * 
                 * This is populated in the `setExtensions` method.
                 */
                vaoExtension: OES_vertex_array_object;

                /**
                 * The WebGL Extensions loaded into the current context.
                 */
                extensions: object;

                /**
                 * Stores the current WebGL component formats for further use.
                 * 
                 * This array is populated in the `init` method.
                 */
                glFormats: any[];

                /**
                 * Stores the WebGL texture compression formats that this device and browser supports.
                 * 
                 * Support for using compressed texture formats was added in Phaser version 3.60.
                 */
                compression: Phaser.Types.Renderer.WebGL.WebGLTextureCompression;

                /**
                 * Cached drawing buffer height to reduce gl calls.
                 */
                readonly drawingBufferHeight: number;

                /**
                 * A blank 32x32 transparent texture, as used by the Graphics system where needed.
                 * This is set in the `boot` method.
                 */
                readonly blankTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * A blank 1x1 #7f7fff texture, a flat normal map,
                 * as used by the Graphics system where needed.
                 * This is set in the `boot` method.
                 */
                readonly normalTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * A pure white 4x4 texture, as used by the Graphics system where needed.
                 * This is set in the `boot` method.
                 */
                readonly whiteTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * Internal gl function mapping for uniform and attribute look-up.
                 * 
                 * https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/uniform
                 * 
                 * https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer
                 */
                shaderSetters: Phaser.Renderer.WebGL.Wrappers.WebGLShaderSetterWrapper;

                /**
                 * The mipmap magFilter to be used when creating textures.
                 * 
                 * You can specify this as a string in the game config, i.e.:
                 * 
                 * `render: { mipmapFilter: 'NEAREST_MIPMAP_LINEAR' }`
                 * 
                 * The 6 options for WebGL1 are, in order from least to most computationally expensive:
                 * 
                 * NEAREST (for pixel art)
                 * LINEAR (the default)
                 * NEAREST_MIPMAP_NEAREST
                 * LINEAR_MIPMAP_NEAREST
                 * NEAREST_MIPMAP_LINEAR
                 * LINEAR_MIPMAP_LINEAR
                 * 
                 * Mipmaps only work with textures that are fully power-of-two in size.
                 * 
                 * For more details see https://webglfundamentals.org/webgl/lessons/webgl-3d-textures.html
                 * 
                 * As of v3.60 no mipmaps will be generated unless a string is given in
                 * the game config. This saves on VRAM use when it may not be required.
                 * To obtain the previous result set the property to `LINEAR` in the config.
                 */
                mipmapFilter: GLenum;

                /**
                 * Has this renderer fully booted yet?
                 */
                isBooted: boolean;

                /**
                 * The global game Projection matrix, used by shaders as 'uProjectionMatrix' uniform.
                 */
                projectionMatrix: Phaser.Math.Matrix4;

                /**
                 * The cached width of the Projection matrix.
                 */
                projectionWidth: number;

                /**
                 * The cached height of the Projection matrix.
                 */
                projectionHeight: number;

                /**
                 * The cached flipY state of the Projection matrix.
                 * 
                 * This is usually `false`, preserving WebGL coordinate space.
                 */
                projectionFlipY: boolean;

                /**
                 * An instance of SpectorJS used for WebGL Debugging.
                 * 
                 * Only available in the Phaser Debug build.
                 */
                spector: Function;

                /**
                 * Creates a new WebGLRenderingContext and initializes all internal state.
                 * @param config The configuration object for the renderer.
                 * @returns This WebGLRenderer instance.
                 */
                init(config: object): this;

                /**
                 * Queries the GL context to get the supported extensions.
                 * 
                 * Then sets them into the `supportedExtensions`, `instancedArraysExtension` and `vaoExtension` properties.
                 * 
                 * Called automatically during the `init` method.
                 */
                setExtensions(): void;

                /**
                 * Sets the handlers that are called when WebGL context is lost or restored by the browser.
                 * 
                 * The default handlers are referenced via the properties `WebGLRenderer.contextLostHandler` and `WebGLRenderer.contextRestoredHandler`.
                 * By default, these map to the methods `WebGLRenderer.dispatchContextLost` and `WebGLRenderer.dispatchContextRestored`.
                 * 
                 * You can override these handlers with your own via this method.
                 * 
                 * If you do override them, make sure that your handlers invoke the methods `WebGLRenderer.dispatchContextLost` and `WebGLRenderer.dispatchContextRestored` in due course, otherwise the renderer will not be able to restore itself fully.
                 * @param contextLost Custom handler for responding to the WebGL context lost event. Set as `undefined` to use the default handler.
                 * @param contextRestored Custom handler for responding to the WebGL context restored event. Set as `undefined` to use the default handler.
                 */
                setContextHandlers(contextLost?: Function, contextRestored?: Function): void;

                /**
                 * This method is called when the WebGL context is lost. By default this is bound to the property `WebGLRenderer.contextLostHandler`.
                 * If you override the context loss handler via the `setContextHandlers` method then be sure to invoke this method in due course.
                 * @param event The WebGL context lost Event.
                 */
                dispatchContextLost(event: WebGLContextEvent): void;

                /**
                 * This method is called when the WebGL context is restored. By default this is bound to the property `WebGLRenderer.contextRestoredHandler`.
                 * If you override the context restored handler via the `setContextHandlers` method then be sure to invoke this method in due course.
                 * @param event The WebGL context restored Event.
                 */
                dispatchContextRestored(event: WebGLContextEvent): void;

                /**
                 * This method is only available in the Debug Build of Phaser, or a build with the
                 * `WEBGL_DEBUG` flag set in the Webpack Config.
                 * 
                 * Phaser v3.60 Debug has a build of Spector.js embedded in it, which is a WebGL inspector
                 * that allows for live inspection of your WebGL calls. Although it's easy to add the Spector
                 * extension to a desktop browser, by embedding it in Phaser we can make it available in mobile
                 * browsers too, making it a powerful tool for debugging WebGL games on mobile devices where
                 * extensions are not permitted.
                 * 
                 * See https://github.com/BabylonJS/Spector.js for more details.
                 * 
                 * This method will capture the current WebGL frame and send it to the Spector.js tool for inspection.
                 * @param quickCapture If `true` thumbnails are not captured in order to speed up the capture. Default false.
                 * @param fullCapture If `true` all details are captured. Default false.
                 */
                captureFrame(quickCapture?: boolean, fullCapture?: boolean): void;

                /**
                 * This method is only available in the Debug Build of Phaser, or a build with the
                 * `WEBGL_DEBUG` flag set in the Webpack Config.
                 * 
                 * Phaser v3.60 Debug has a build of Spector.js embedded in it, which is a WebGL inspector
                 * that allows for live inspection of your WebGL calls. Although it's easy to add the Spector
                 * extension to a desktop browser, by embedding it in Phaser we can make it available in mobile
                 * browsers too, making it a powerful tool for debugging WebGL games on mobile devices where
                 * extensions are not permitted.
                 * 
                 * See https://github.com/BabylonJS/Spector.js for more details.
                 * 
                 * This method will capture the next WebGL frame and send it to the Spector.js tool for inspection.
                 */
                captureNextFrame(): void;

                /**
                 * This method is only available in the Debug Build of Phaser, or a build with the
                 * `WEBGL_DEBUG` flag set in the Webpack Config.
                 * 
                 * Phaser v3.60 Debug has a build of Spector.js embedded in it, which is a WebGL inspector
                 * that allows for live inspection of your WebGL calls. Although it's easy to add the Spector
                 * extension to a desktop browser, by embedding it in Phaser we can make it available in mobile
                 * browsers too, making it a powerful tool for debugging WebGL games on mobile devices where
                 * extensions are not permitted.
                 * 
                 * See https://github.com/BabylonJS/Spector.js for more details.
                 * 
                 * This method will return the current FPS of the WebGL canvas.undefined
                 * @returns The current FPS of the WebGL canvas.
                 */
                getFps(): number;

                /**
                 * This method is only available in the Debug Build of Phaser, or a build with the
                 * `WEBGL_DEBUG` flag set in the Webpack Config.
                 * 
                 * Phaser v3.60 Debug has a build of Spector.js embedded in it, which is a WebGL inspector
                 * that allows for live inspection of your WebGL calls. Although it's easy to add the Spector
                 * extension to a desktop browser, by embedding it in Phaser we can make it available in mobile
                 * browsers too, making it a powerful tool for debugging WebGL games on mobile devices where
                 * extensions are not permitted.
                 * 
                 * See https://github.com/BabylonJS/Spector.js for more details.
                 * 
                 * This method adds a command with the name value in the list. This can be filtered in the search.
                 * All logs can be filtered searching for "LOG".
                 * @param arguments The arguments to log to Spector.
                 * @returns The current log.
                 */
                log(...arguments: any[]): string;

                /**
                 * This method is only available in the Debug Build of Phaser, or a build with the
                 * `WEBGL_DEBUG` flag set in the Webpack Config.
                 * 
                 * Phaser v3.60 Debug has a build of Spector.js embedded in it, which is a WebGL inspector
                 * that allows for live inspection of your WebGL calls. Although it's easy to add the Spector
                 * extension to a desktop browser, by embedding it in Phaser we can make it available in mobile
                 * browsers too, making it a powerful tool for debugging WebGL games on mobile devices where
                 * extensions are not permitted.
                 * 
                 * See https://github.com/BabylonJS/Spector.js for more details.
                 * 
                 * This method will start a capture on the Phaser canvas. The capture will stop once it reaches
                 * the number of commands specified as a parameter, or after 10 seconds. If quick capture is true,
                 * the thumbnails are not captured in order to speed up the capture.
                 * @param commandCount The number of commands to capture. If zero it will capture for 10 seconds. Default 0.
                 * @param quickCapture If `true` thumbnails are not captured in order to speed up the capture. Default false.
                 * @param fullCapture If `true` all details are captured. Default false.
                 */
                startCapture(commandCount?: number, quickCapture?: boolean, fullCapture?: boolean): void;

                /**
                 * This method is only available in the Debug Build of Phaser, or a build with the
                 * `WEBGL_DEBUG` flag set in the Webpack Config.
                 * 
                 * Phaser v3.60 Debug has a build of Spector.js embedded in it, which is a WebGL inspector
                 * that allows for live inspection of your WebGL calls. Although it's easy to add the Spector
                 * extension to a desktop browser, by embedding it in Phaser we can make it available in mobile
                 * browsers too, making it a powerful tool for debugging WebGL games on mobile devices where
                 * extensions are not permitted.
                 * 
                 * See https://github.com/BabylonJS/Spector.js for more details.
                 * 
                 * This method will stop the current capture and returns the result in JSON. It displays the
                 * result if the UI has been displayed. This returns undefined if the capture has not been completed
                 * or did not find any commands.undefined
                 * @returns The current capture.
                 */
                stopCapture(): object;

                /**
                 * The event handler that manages the `resize` event dispatched by the Scale Manager.
                 * @param gameSize The default Game Size object. This is the un-modified game dimensions.
                 * @param baseSize The base Size object. The game dimensions. The canvas width / height values match this.
                 */
                onResize(gameSize: Phaser.Structs.Size, baseSize: Phaser.Structs.Size): void;

                /**
                 * Resizes the drawing buffer to match that required by the Scale Manager.
                 * @param width The new width of the renderer.
                 * @param height The new height of the renderer.
                 * @returns This WebGLRenderer instance.
                 */
                resize(width?: number, height?: number): this;

                /**
                 * Determines which compressed texture formats this browser and device supports.
                 * 
                 * Called automatically as part of the WebGL Renderer init process. If you need to investigate
                 * which formats it supports, see the `Phaser.Renderer.WebGL.WebGLRenderer#compression` property instead.undefined
                 * @returns The compression object.
                 */
                getCompressedTextures(): Phaser.Types.Renderer.WebGL.WebGLTextureCompression;

                /**
                 * Returns a compressed texture format GLenum name based on the given format.
                 * @param baseFormat The Base Format to check.
                 * @param format An optional GLenum format to check within the base format.
                 * @returns The compressed texture format name, as a string.
                 */
                getCompressedTextureName(baseFormat: string, format?: GLenum): string;

                /**
                 * Checks if the given compressed texture format is supported, or not.
                 * @param baseFormat The Base Format to check.
                 * @param format An optional GLenum format to check within the base format.
                 * @returns True if the format is supported, otherwise false.
                 */
                supportsCompressedTexture(baseFormat: string, format?: GLenum): boolean;

                /**
                 * Gets the aspect ratio of the WebGLRenderer dimensions.undefined
                 * @returns The aspect ratio of the WebGLRenderer dimensions.
                 */
                getAspectRatio(): number;

                /**
                 * Sets the Projection Matrix of this renderer to the given dimensions.
                 * @param width The new width of the Projection Matrix.
                 * @param height The new height of the Projection Matrix.
                 * @param flipY Should the Y axis be flipped? Default false.
                 * @returns This WebGLRenderer instance.
                 */
                setProjectionMatrix(width: number, height: number, flipY?: boolean): this;

                /**
                 * Sets the Projection Matrix of this renderer to match the given drawing context.
                 * @param drawingContext The drawing context to set the projection matrix from.
                 * @returns This WebGLRenderer instance.
                 */
                setProjectionMatrixFromDrawingContext(drawingContext: Phaser.Renderer.WebGL.DrawingContext): this;

                /**
                 * Resets the Projection Matrix back to this renderers width and height.
                 * 
                 * This is called during `endCapture`, should the matrix have been changed
                 * as a result of the capture process.undefined
                 * @returns This WebGLRenderer instance.
                 */
                resetProjectionMatrix(): this;

                /**
                 * Checks if a WebGL extension is supported
                 * @param extensionName Name of the WebGL extension
                 * @returns `true` if the extension is supported, otherwise `false`.
                 */
                hasExtension(extensionName: string): boolean;

                /**
                 * Loads a WebGL extension
                 * @param extensionName The name of the extension to load.
                 * @returns WebGL extension if the extension is supported
                 */
                getExtension(extensionName: string): object;

                /**
                 * Creates a new custom blend mode for the renderer.
                 * 
                 * See https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Blending_modes
                 * @param func An array containing the WebGL functions to use for the source and the destination blending factors, respectively. See the possible constants for {@link WebGLRenderingContext#blendFunc()}.
                 * @param equation The equation to use for combining the RGB and alpha components of a new pixel with a rendered one. See the possible constants for {@link WebGLRenderingContext#blendEquation()}.
                 * @returns The index of the new blend mode, used for referencing it in the future.
                 */
                addBlendMode(func: GLenum[], equation: GLenum): number;

                /**
                 * Updates the function bound to a given custom blend mode.
                 * @param index The index of the custom blend mode.
                 * @param func The function to use for the blend mode. Specify either 2 elements for src and dest, or 4 elements for separate srcRGB, destRGB, srcAlpha, destAlpha.
                 * @param equation The equation to use for the blend mode. This can be either a single equation for both source and destination, or an array containing separate equations for source and destination.
                 * @returns This WebGLRenderer instance.
                 */
                updateBlendMode(index: number, func: GLenum[], equation: GLenum | GLenum[]): this;

                /**
                 * Removes a custom blend mode from the renderer.
                 * Any Game Objects still using this blend mode will error, so be sure to clear them first.
                 * @param index The index of the custom blend mode to be removed.
                 * @returns This WebGLRenderer instance.
                 */
                removeBlendMode(index: number): this;

                /**
                 * Clear the current framebuffer to the given color.
                 * @param color The color to clear to. Four values in the range 0.0 - 1.0.
                 * @param stencil The stencil value to clear to.
                 * @param depth The depth value to clear to. Currently, this is not set, and only determines whether the depth buffer is cleared.
                 */
                clearFramebuffer(color?: number[], stencil?: number, depth?: number): void;

                /**
                 * Creates a texture from an image source. If the source is not valid it creates an empty texture.
                 * @param source The source of the texture.
                 * @param width The width of the texture.
                 * @param height The height of the texture.
                 * @param scaleMode The scale mode to be used by the texture.
                 * @param forceClamp Force the texture to use the CLAMP_TO_EDGE wrap mode, even if a power of two? Default false.
                 * @param flipY Sets the `UNPACK_FLIP_Y_WEBGL` flag the WebGL Texture uses during upload. Default true.
                 * @returns The WebGLTextureWrapper that was created, or `null` if it couldn't be created.
                 */
                createTextureFromSource(source: object, width: number, height: number, scaleMode: number, forceClamp?: boolean, flipY?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | null;

                /**
                 * A wrapper for creating a WebGLTextureWrapper. If no pixel data is passed it will create an empty texture.
                 * @param mipLevel Mip level of the texture.
                 * @param minFilter Filtering of the texture.
                 * @param magFilter Filtering of the texture.
                 * @param wrapT Wrapping mode of the texture.
                 * @param wrapS Wrapping mode of the texture.
                 * @param format Which format does the texture use.
                 * @param pixels pixel data.
                 * @param width Width of the texture in pixels. If not supplied, it must be derived from `pixels`.
                 * @param height Height of the texture in pixels. If not supplied, it must be derived from `pixels`.
                 * @param pma Does the texture have premultiplied alpha? Default true.
                 * @param forceSize If `true` it will use the width and height passed to this method, regardless of the pixels dimension. Default false.
                 * @param flipY Sets the `UNPACK_FLIP_Y_WEBGL` flag the WebGL Texture uses during upload. Default true.
                 * @returns The WebGLTextureWrapper that was created.
                 */
                createTexture2D(mipLevel: number, minFilter: number, magFilter: number, wrapT: number, wrapS: number, format: number, pixels: object | undefined, width: number | undefined, height: number | undefined, pma?: boolean, forceSize?: boolean, flipY?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * Creates a WebGL Framebuffer object and optionally binds a depth stencil render buffer.
                 * 
                 * This will unbind any currently bound framebuffer.
                 * @param renderTexture The color texture where the color pixels are written. Specify an array for multiple color attachments, but WebGL1 only supports the first by default. Specify `null` to create a framebuffer for the base canvas.
                 * @param addStencilBuffer Create a Renderbuffer for the stencil? Default false.
                 * @param addDepthBuffer Create a Renderbuffer for the depth? Default false.
                 * @returns Wrapped framebuffer which is safe to use with the renderer.
                 */
                createFramebuffer(renderTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper[] | null, addStencilBuffer?: boolean, addDepthBuffer?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLFramebufferWrapper;

                /**
                 * Creates a WebGLProgram instance based on the given vertex and fragment shader source.
                 * 
                 * Then compiles, attaches and links the program before wrapping and returning it.
                 * @param vertexShader The vertex shader source code as a single string.
                 * @param fragmentShader The fragment shader source code as a single string.
                 * @returns The wrapped, linked WebGLProgram created from the given shader source.
                 */
                createProgram(vertexShader: string, fragmentShader: string): Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper;

                /**
                 * Wrapper for creating a vertex buffer.
                 * @param initialDataOrSize It's either ArrayBuffer or an integer indicating the size of the vbo
                 * @param bufferUsage How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW
                 * @returns Wrapped vertex buffer
                 */
                createVertexBuffer(initialDataOrSize: ArrayBuffer, bufferUsage: number): Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;

                /**
                 * Wrapper for creating an index buffer.
                 * @param initialDataOrSize Either ArrayBuffer or an integer indicating the size of the vbo.
                 * @param bufferUsage How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW.
                 * @returns Wrapped index buffer
                 */
                createIndexBuffer(initialDataOrSize: ArrayBuffer, bufferUsage: number): Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;

                /**
                 * Wrapper for creating a vertex array object.
                 * This manages a vertex attribute binding state.
                 * @param program The program to bind the VAO to.
                 * @param indexBuffer The index buffer.
                 * @param attributeBufferLayouts The attribute buffer layouts.
                 * @returns The newly created WebGLVAOWrapper.
                 */
                createVAO(program: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper, indexBuffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper, attributeBufferLayouts: Phaser.Types.Renderer.WebGL.WebGLAttributeBufferLayout[]): Phaser.Renderer.WebGL.Wrappers.WebGLVAOWrapper;

                /**
                 * Removes a texture from the GPU.
                 * @param texture The WebGL Texture to be deleted.
                 * @returns This WebGLRenderer instance.
                 */
                deleteTexture(texture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper): this;

                /**
                 * Deletes a Framebuffer from the GL instance.
                 * @param framebuffer The Framebuffer to be deleted.
                 * @returns This WebGLRenderer instance.
                 */
                deleteFramebuffer(framebuffer: Phaser.Renderer.WebGL.Wrappers.WebGLFramebufferWrapper | null): this;

                /**
                 * Deletes a WebGLProgram from the GL instance.
                 * @param program The shader program to be deleted.
                 * @returns This WebGLRenderer instance.
                 */
                deleteProgram(program: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper): this;

                /**
                 * Deletes a WebGLBuffer from the GL instance.
                 * @param buffer The WebGLBuffer to be deleted.
                 * @returns This WebGLRenderer instance.
                 */
                deleteBuffer(buffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper): this;

                /**
                 * Clears the base DrawingContext and readies it for use.
                 */
                preRender(): void;

                /**
                 * The core render step for a Scene Camera.
                 * 
                 * Iterates through the given array of Game Objects and renders them with the given Camera.
                 * 
                 * This is called by the `CameraManager.render` method. The Camera Manager instance belongs to a Scene, and is invoked
                 * by the Scene Systems.render method.
                 * 
                 * This method is not called if `Camera.visible` is `false`, or `Camera.alpha` is zero.
                 * @param scene The Scene to render.
                 * @param children An array of filtered Game Objects that can be rendered by the given Camera.
                 * @param camera The Scene Camera to render with.
                 */
                render(scene: Phaser.Scene, children: Phaser.GameObjects.GameObject[], camera: Phaser.Cameras.Scene2D.Camera): void;

                /**
                 * The post-render step happens after all Cameras in all Scenes have been rendered.
                 */
                postRender(): void;

                /**
                 * Draw a number of vertices to a drawing context.
                 * 
                 * This draws the vertices using an index buffer. The buffer should be
                 * bound to the VAO. Vertices are drawn as a `TRIANGLE_STRIP` by default.
                 * 
                 * This is the primary render method. It requires all the WebGL resources
                 * necessary to render the vertices, so they don't have to be set up
                 * ad-hoc elsewhere.
                 * 
                 * It does not upload vertex data to buffers. Ensure that this is done
                 * before calling this method.
                 * @param drawingContext The DrawingContext to draw to.
                 * @param textures An array of textures to bind. Textures are bound to units corresponding to their indices in the array.
                 * @param program The shader program to use.
                 * @param vao The Vertex Array Object to bind. It must have an index buffer attached.
                 * @param count The number of vertices to draw. Because of the TRIANGLE_STRIP topology, this should be `n + 2`, where `n` is the number of triangles to draw, including degenerate triangles.
                 * @param offset The offset to start drawing from in the index buffer. This is in bytes, and should be a multiple of 2 (for 16-bit `UNSIGNED_SHORT` indices).
                 * @param topology The type of primitives to render. Defaults to `TRIANGLE_STRIP`.
                 */
                drawElements(drawingContext: Phaser.Renderer.WebGL.DrawingContext, textures: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper[], program: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper, vao: Phaser.Renderer.WebGL.Wrappers.WebGLVAOWrapper, count: number, offset: number, topology: number): void;

                /**
                 * Draw a number of instances to a drawing context.
                 * 
                 * This draws vertices using the ANGLE_instanced_arrays extension.
                 * This typically uses an instance buffer and a vertex buffer.
                 * Both should be bound to the VAO. Vertices are drawn as a `TRIANGLE_STRIP` by default.
                 * 
                 * It does not upload vertex data to buffers. Ensure that this is done
                 * before calling this method.
                 * @param drawingContext The DrawingContext to draw to.
                 * @param textures An array of textures to bind. Textures are bound to units corresponding to their indices in the array.
                 * @param program The shader program to use.
                 * @param vao The Vertex Array Object to bind. It does not need an index buffer attached.
                 * @param first The starting index in the array of vector points.
                 * @param count The number of vertices to draw.
                 * @param instanceCount The number of instances to render.
                 */
                drawInstancedArrays(drawingContext: Phaser.Renderer.WebGL.DrawingContext, textures: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper[], program: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper, vao: Phaser.Renderer.WebGL.Wrappers.WebGLVAOWrapper, first: number, count: number, instanceCount: number): void;

                /**
                 * Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.
                 * 
                 * To capture a specific area see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.
                 * 
                 * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then
                 * calling this method will override it.
                 * 
                 * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.
                 * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,
                 * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,
                 * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
                 * @param callback The Function to invoke after the snapshot image is created.
                 * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
                 * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
                 * @returns This WebGL Renderer.
                 */
                snapshot(callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, type?: string, encoderOptions?: number): this;

                /**
                 * Schedules a snapshot of the given area of the game viewport to be taken after the current frame is rendered.
                 * 
                 * To capture the whole game viewport see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.
                 * 
                 * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then
                 * calling this method will override it.
                 * 
                 * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.
                 * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,
                 * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,
                 * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
                 * @param x The x coordinate to grab from. This is based on the game viewport, not the world.
                 * @param y The y coordinate to grab from. This is based on the game viewport, not the world.
                 * @param width The width of the area to grab.
                 * @param height The height of the area to grab.
                 * @param callback The Function to invoke after the snapshot image is created.
                 * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
                 * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
                 * @returns This WebGL Renderer.
                 */
                snapshotArea(x: number, y: number, width: number, height: number, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, type?: string, encoderOptions?: number): this;

                /**
                 * Schedules a snapshot of the given pixel from the game viewport to be taken after the current frame is rendered.
                 * 
                 * To capture the whole game viewport see the `snapshot` method. To capture a specific area, see `snapshotArea`.
                 * 
                 * Only one snapshot can be active _per frame_. If you have already called `snapshotArea`, for example, then
                 * calling this method will override it.
                 * 
                 * Unlike the other two snapshot methods, this one will return a `Color` object containing the color data for
                 * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,
                 * using less memory.
                 * @param x The x coordinate of the pixel to get. This is based on the game viewport, not the world.
                 * @param y The y coordinate of the pixel to get. This is based on the game viewport, not the world.
                 * @param callback The Function to invoke after the snapshot pixel data is extracted.
                 * @returns This WebGL Renderer.
                 */
                snapshotPixel(x: number, y: number, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback): this;

                /**
                 * Takes a snapshot of the given area of the given frame buffer.
                 * 
                 * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.
                 * 
                 * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.
                 * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,
                 * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,
                 * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.
                 * @param framebuffer The framebuffer to grab from.
                 * @param bufferWidth The width of the framebuffer.
                 * @param bufferHeight The height of the framebuffer.
                 * @param callback The Function to invoke after the snapshot image is created.
                 * @param getPixel Grab a single pixel as a Color object, or an area as an Image object? Default false.
                 * @param x The x coordinate to grab from. This is based on the framebuffer, not the world. Default 0.
                 * @param y The y coordinate to grab from. This is based on the framebuffer, not the world. Default 0.
                 * @param width The width of the area to grab. Default bufferWidth.
                 * @param height The height of the area to grab. Default bufferHeight.
                 * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
                 * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
                 * @returns This WebGL Renderer.
                 */
                snapshotFramebuffer(framebuffer: Phaser.Renderer.WebGL.Wrappers.WebGLFramebufferWrapper, bufferWidth: number, bufferHeight: number, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, getPixel?: boolean, x?: number, y?: number, width?: number, height?: number, type?: string, encoderOptions?: number): this;

                /**
                 * Creates a new WebGL Texture based on the given Canvas Element.
                 * 
                 * If the `dstTexture` parameter is given, the WebGL Texture is updated, rather than created fresh.
                 * @param srcCanvas The Canvas to create the WebGL Texture from
                 * @param dstTexture The destination WebGLTextureWrapper to set.
                 * @param noRepeat Should this canvas be allowed to set `REPEAT` (such as for Text objects?) Default false.
                 * @param flipY Should the WebGL Texture set `UNPACK_FLIP_Y_WEBGL`? Default true.
                 * @returns The newly created, or updated, WebGLTextureWrapper.
                 */
                canvasToTexture(srcCanvas: HTMLCanvasElement, dstTexture?: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, noRepeat?: boolean, flipY?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * Creates a new WebGL Texture based on the given Canvas Element.
                 * @param srcCanvas The Canvas to create the WebGL Texture from.
                 * @param noRepeat Should this canvas be allowed to set `REPEAT` (such as for Text objects?) Default false.
                 * @param flipY Should the WebGL Texture set `UNPACK_FLIP_Y_WEBGL`? Default true.
                 * @returns The newly created WebGLTextureWrapper.
                 */
                createCanvasTexture(srcCanvas: HTMLCanvasElement, noRepeat?: boolean, flipY?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * Updates a WebGL Texture based on the given Canvas Element.
                 * @param srcCanvas The Canvas to update the WebGL Texture from.
                 * @param dstTexture The destination WebGLTextureWrapper to update.
                 * @param flipY Should the WebGL Texture set `UNPACK_FLIP_Y_WEBGL`? Default true.
                 * @param noRepeat Should this canvas be allowed to set `REPEAT` (such as for Text objects?) Default false.
                 * @returns The updated WebGLTextureWrapper. This is the same wrapper object as `dstTexture`.
                 */
                updateCanvasTexture(srcCanvas: HTMLCanvasElement, dstTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, flipY?: boolean, noRepeat?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * Creates or updates a WebGL Texture based on the given HTML Video Element.
                 * 
                 * If the `dstTexture` parameter is given, the WebGL Texture is updated, rather than created fresh.
                 * @param srcVideo The Video to create the WebGL Texture from
                 * @param dstTexture The destination WebGLTextureWrapper to set.
                 * @param noRepeat Should this canvas be allowed to set `REPEAT`? Default false.
                 * @param flipY Should the WebGL Texture set `UNPACK_FLIP_Y_WEBGL`? Default true.
                 * @returns The newly created, or updated, WebGLTextureWrapper.
                 */
                videoToTexture(srcVideo: HTMLVideoElement, dstTexture?: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, noRepeat?: boolean, flipY?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * Creates a new WebGL Texture based on the given HTML Video Element.
                 * @param srcVideo The Video to create the WebGL Texture from
                 * @param noRepeat Should this canvas be allowed to set `REPEAT`? Default false.
                 * @param flipY Should the WebGL Texture set `UNPACK_FLIP_Y_WEBGL`? Default true.
                 * @returns The newly created WebGLTextureWrapper.
                 */
                createVideoTexture(srcVideo: HTMLVideoElement, noRepeat?: boolean, flipY?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * Updates a WebGL Texture based on the given HTML Video Element.
                 * @param srcVideo The Video to update the WebGL Texture with.
                 * @param dstTexture The destination WebGLTextureWrapper to update.
                 * @param flipY Should the WebGL Texture set `UNPACK_FLIP_Y_WEBGL`? Default true.
                 * @param noRepeat Should this canvas be allowed to set `REPEAT`? Default false.
                 * @returns The updated WebGLTextureWrapper. This is the same wrapper object as `dstTexture`.
                 */
                updateVideoTexture(srcVideo: HTMLVideoElement, dstTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, flipY?: boolean, noRepeat?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * Create a WebGLTexture from a Uint8Array.
                 * 
                 * The Uint8Array is assumed to be RGBA values, one byte per color component.
                 * 
                 * The texture will be filtered with `gl.NEAREST` and will not be mipped.
                 * @param data The Uint8Array to create the texture from.
                 * @param width The width of the texture.
                 * @param height The height of the texture.
                 * @param pma Should the texture be set as having premultiplied alpha? Default true.
                 * @param flipY Should the WebGL Texture set `UNPACK_FLIP_Y_WEBGL`? Default true.
                 * @returns The newly created WebGLTextureWrapper.
                 */
                createUint8ArrayTexture(data: Uint8Array, width: number, height: number, pma?: boolean, flipY?: boolean): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

                /**
                 * Sets the minification and magnification filter for a texture.
                 * @param texture The texture to set the filter for.
                 * @param filter The filter to set. 0 for linear filtering, 1 for nearest neighbor (blocky) filtering.
                 * @returns This WebGL Renderer instance.
                 */
                setTextureFilter(texture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, filter: number): this;

                /**
                 * Sets the wrap mode for a texture.
                 * 
                 * The wrap mode can be one of the following:
                 * 
                 * - Phaser.Textures.WrapMode.CLAMP_TO_EDGE
                 * - Phaser.Textures.WrapMode.REPEAT
                 * - Phaser.Textures.WrapMode.MIRRORED_REPEAT
                 * 
                 * Note that only CLAMP_TO_EDGE is supported for non-power of two textures.
                 * If another wrap mode is specified for such a texture, it will be ignored.
                 * @param glTextureWrapper The WebGL Texture Wrapper to set the wrap mode for.
                 * @param wrapModeS The wrap mode for the S (horizontal) axis.
                 * @param wrapModeT The wrap mode for the T (vertical) axis.
                 * @returns This WebGL Renderer instance.
                 */
                setTextureWrap(glTextureWrapper: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, wrapModeS: Phaser.Textures.WrapMode, wrapModeT: Phaser.Textures.WrapMode): this;

                /**
                 * Returns the largest texture size (either width or height) that can be created.
                 * Note that VRAM may not allow a texture of any given size, it just expresses
                 * hardware / driver support for a given size.undefined
                 * @returns The maximum supported texture size.
                 */
                getMaxTextureSize(): number;

                /**
                 * Destroy this WebGLRenderer, cleaning up all related resources such as wrappers, native textures, etc.
                 */
                destroy(): void;

            }

            /**
             * 8-bit twos complement signed integer.
             */
            var BYTE: Phaser.Types.Renderer.WebGL.WebGLConst;

            /**
             * 8-bit twos complement unsigned integer.
             */
            var UNSIGNED_BYTE: Phaser.Types.Renderer.WebGL.WebGLConst;

            /**
             * 16-bit twos complement signed integer.
             */
            var SHORT: Phaser.Types.Renderer.WebGL.WebGLConst;

            /**
             * 16-bit twos complement unsigned integer.
             */
            var UNSIGNED_SHORT: Phaser.Types.Renderer.WebGL.WebGLConst;

            /**
             * 32-bit twos complement signed integer.
             */
            var INT: Phaser.Types.Renderer.WebGL.WebGLConst;

            /**
             * 32-bit twos complement unsigned integer.
             */
            var UNSIGNED_INT: Phaser.Types.Renderer.WebGL.WebGLConst;

            /**
             * 32-bit IEEE floating point number.
             */
            var FLOAT: Phaser.Types.Renderer.WebGL.WebGLConst;

            /**
             * A factory namespace for creating `WebGLBlendParameters` objects, which
             * describe the WebGL blend state used when rendering. Two factory methods are
             * provided: `createCombined`, which applies the same blend equation and
             * functions to both RGB and alpha channels, and `createSeparate`, which allows
             * independent control over the RGB and alpha blend equations and functions.
             * The resulting objects are consumed by the WebGL renderer when setting blend
             * modes on draw calls.
             */
            namespace WebGLBlendParametersFactory {
                /**
                 * Create a new WebGLBlendParameters object.
                 * 
                 * Default values are for a normal blend mode.
                 * - enabled: true
                 * - color: [ 0, 0, 0, 0 ]
                 * - equation: gl.FUNC_ADD
                 * - funcSrc: gl.ONE
                 * - funcDst: gl.ONE_MINUS_SRC_ALPHA
                 * 
                 * Where `equation`, `funcSrc`, and `funcDst` are the same for RGB and alpha.
                 * @param renderer The WebGLRenderer to create the WebGLBlendParameters for.
                 * @param enabled Whether blending is enabled. Default true.
                 * @param color The blend color (array of 4 channels, 0-1). Default [0, 0, 0, 0].
                 * @param equation The blend equation. Default gl.FUNC_ADD.
                 * @param funcSrc The source blend function. Default gl.ONE.
                 * @param funcDst The destination blend function. Default gl.ONE_MINUS_SRC_ALPHA.
                 * @returns The created WebGLBlendParameters.
                 */
                function createCombined(renderer: Phaser.Renderer.WebGL.WebGLRenderer, enabled?: GLboolean, color?: GLclampf[], equation?: GLenum, funcSrc?: GLenum, funcDst?: GLenum): Phaser.Types.Renderer.WebGL.WebGLBlendParameters;

                /**
                 * Create a new WebGLBlendParameters object with independent control over
                 * the RGB and alpha blend equations and functions.
                 * 
                 * Default values are for a normal blend mode.
                 * - enabled: true
                 * - color: [ 0, 0, 0, 0 ]
                 * - equationRGB: gl.FUNC_ADD
                 * - equationAlpha: gl.FUNC_ADD
                 * - funcSrcRGB: gl.ONE
                 * - funcDstRGB: gl.ONE_MINUS_SRC_ALPHA
                 * - funcSrcAlpha: gl.ONE
                 * - funcDstAlpha: gl.ONE_MINUS_SRC_ALPHA
                 * 
                 * Unlike `createCombined`, the RGB and alpha channels can use different
                 * equations and blend functions.
                 * @param renderer The WebGLRenderer to create the WebGLBlendParameters for.
                 * @param enabled Whether blending is enabled. Default true.
                 * @param color The blend color (array of 4 channels, 0-1). Default [0, 0, 0, 0].
                 * @param equationRGB The RGB blend equation. Default gl.FUNC_ADD.
                 * @param equationAlpha The alpha blend equation. Default gl.FUNC_ADD.
                 * @param funcSrcRGB The RGB source blend function. Default gl.ONE.
                 * @param funcDstRGB The RGB destination blend function. Default gl.ONE_MINUS_SRC_ALPHA.
                 * @param funcSrcAlpha The alpha source blend function. Default gl.ONE.
                 * @param funcDstAlpha The alpha destination blend function. Default gl.ONE_MINUS_SRC_ALPHA.
                 * @returns The created WebGLBlendParameters.
                 */
                function createSeparate(renderer: Phaser.Renderer.WebGL.WebGLRenderer, enabled?: GLboolean, color?: GLclampf[], equationRGB?: GLenum, equationAlpha?: GLenum, funcSrcRGB?: GLenum, funcDstRGB?: GLenum, funcSrcAlpha?: GLenum, funcDstAlpha?: GLenum): Phaser.Types.Renderer.WebGL.WebGLBlendParameters;

            }

            /**
             * A factory namespace that creates `WebGLGlobalParameters` objects for use by the
             * WebGL Renderer. A `WebGLGlobalParameters` object captures the complete set of
             * global WebGL state tracked by Phaser, including buffer bindings, blend mode,
             * color masks, scissor region, stencil settings, texturing options, and viewport
             * dimensions. The renderer uses these objects to detect state changes and avoid
             * redundant WebGL calls, which improves rendering performance.
             */
            namespace WebGLGlobalParametersFactory {
                /**
                 * Creates a new `WebGLGlobalParameters` object populated with sensible default
                 * values. The defaults reflect the initial WebGL state expected at the start of
                 * each render: the NORMAL blend mode, a fully-opaque black clear color, all
                 * color channels enabled for writing, face culling and depth testing disabled,
                 * scissor testing enabled with a zero-sized box, default stencil parameters
                 * (obtained via `WebGLStencilParametersFactory`), and a zero-sized viewport.
                 * This object is typically used by the WebGL Renderer to initialise or reset
                 * its tracked global state.
                 * @param renderer The WebGLRenderer to create the WebGLGlobalParameters for.
                 * @returns The default WebGLGlobalParameters.
                 */
                function getDefault(renderer: Phaser.Renderer.WebGL.WebGLRenderer): Phaser.Types.Renderer.WebGL.WebGLGlobalParameters;

            }

            /**
             * A factory object that creates `WebGLStencilParameters` configuration objects.
             * These objects describe the complete stencil buffer state required by the
             * WebGL renderer, covering the stencil test function, per-operation behaviour,
             * and the value used to clear the stencil buffer. Use this factory whenever
             * you need to define or reset stencil state for a render pass.
             */
            namespace WebGLStencilParametersFactory {
                /**
                 * Creates a new `WebGLStencilParameters` object that encapsulates the full
                 * stencil buffer configuration for a WebGL render pass. The returned object
                 * groups the arguments into the three sub-objects expected by the renderer:
                 * `func` (passed to `gl.stencilFunc`), `op` (passed to `gl.stencilOp`), and
                 * `clear` (the value written when the stencil buffer is cleared). All
                 * parameters are optional and fall back to sensible no-op defaults so the
                 * stencil buffer behaves as if it were disabled.
                 * @param renderer The WebGLRenderer to create the WebGLStencilParameters for.
                 * @param enabled Whether the stencil test is enabled. Default false.
                 * @param func The stencil comparison function used to compare the reference value against the current stencil buffer value. Default GL_ALWAYS.
                 * @param funcRef The reference value against which the stencil buffer value is compared during the stencil test. Default 0.
                 * @param funcMask The bitwise mask applied to both the reference value and the stencil buffer value before they are compared. Default 0xFF.
                 * @param opFail The operation to perform if the stencil test fails. Default GL_KEEP.
                 * @param opZfail The operation to perform if the stencil test passes but the depth test fails. Default GL_KEEP.
                 * @param opZpass The operation to perform if the stencil test passes and the depth test passes or is disabled. Default GL_KEEP.
                 * @param clear The value to clear the stencil buffer to. Default 0.
                 * @returns The created WebGLStencilParameters.
                 */
                function create(renderer: Phaser.Renderer.WebGL.WebGLRenderer, enabled?: GLboolean, func?: GLenum, funcRef?: GLint, funcMask?: GLuint, opFail?: GLenum, opZfail?: GLenum, opZpass?: GLenum, clear?: GLint): Phaser.Types.Renderer.WebGL.WebGLStencilParameters;

            }

            namespace RenderNodes {
                /**
                 * A Batch Handler Render Node. This is a base class used for other
                 * Batch Handler Render Nodes.
                 * 
                 * A batch handler buffers data for a batch of objects to be rendered
                 * together. It is responsible for the vertex buffer layout and shaders
                 * used to render the batched items.
                 * 
                 * This class is not meant to be used directly, but to be extended by
                 * other classes.
                 */
                class BatchHandler extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param defaultConfig The default configuration object for this RenderNode. This is used to ensure all required properties are present, so it must be complete.
                     * @param config The configuration object for this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, defaultConfig: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig, config?: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig);

                    /**
                     * The number of instances per batch, used to determine the size of the
                     * vertex buffer, and the number of instances to render.
                     * 
                     * This is usually limited by the maximum number of vertices that can be
                     * distinguished with a 16-bit UNSIGNED_INT index buffer,
                     * which is 65536. This is set in the game render config as `batchSize`.
                     */
                    instancesPerBatch: number;

                    /**
                     * The number of vertices per instance.
                     * 
                     * This is usually 4 for a quad.
                     * 
                     * Each vertex corresponds to an index in the element buffer.
                     */
                    verticesPerInstance: number;

                    /**
                     * The number of indices per instance.
                     * This is usually 6 for a quad.
                     * Each index corresponds to a vertex in the vertex buffer.
                     */
                    indicesPerInstance: number;

                    /**
                     * The number of bytes per index per instance.
                     * This is used to advance the index buffer, and accounts for the
                     * size of a Uint16Array element.
                     */
                    bytesPerIndexPerInstance: number;

                    /**
                     * The maximum number of textures per batch entry.
                     * This is usually set to the maximum number of texture units available,
                     * but it might be smaller for some uses.
                     */
                    maxTexturesPerBatch: number;

                    /**
                     * The index buffer defining vertex order.
                     */
                    indexBuffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;

                    /**
                     * The layout, data, and vertex buffer used to store the vertex data.
                     * 
                     * The default layout is for a quad with position, texture coordinate,
                     * texture ID, tint effect, and tint color on each vertex.
                     */
                    vertexBufferLayout: Phaser.Renderer.WebGL.Wrappers.WebGLVertexBufferLayoutWrapper;

                    /**
                     * The program manager used to create and manage shader programs.
                     * This contains shader variants.
                     */
                    programManager: Phaser.Renderer.WebGL.ProgramManager;

                    /**
                     * The number of bytes per instance, used to determine how much of the vertex buffer to upload.
                     */
                    bytesPerInstance: number;

                    /**
                     * The number of floats per instance, used to determine how much of the vertex buffer to update.
                     */
                    floatsPerInstance: number;

                    /**
                     * The current batch entry being filled with textures.
                     */
                    currentBatchEntry: Phaser.Types.Renderer.WebGL.WebGLBatchEntry;

                    /**
                     * The entries in the batch.
                     * Each entry represents a "sub-batch" of quads which use the same
                     * pool of textures. This allows the renderer to continue to buffer
                     * quads into the same batch without needing to upload the vertex
                     * buffer. When the batch flushes, there will be one vertex buffer
                     * upload, and one draw call per batch entry.
                     */
                    batchEntries: Phaser.Types.Renderer.WebGL.WebGLBatchEntry[];

                    /**
                     * The number of instances currently in the batch.
                     */
                    instanceCount: number;

                    /**
                     * Set new dimensions for the renderer.
                     * This should be overridden by subclasses.
                     * 
                     * This is called automatically when the renderer is resized.
                     * @param width The new width of the renderer.
                     * @param height The new height of the renderer.
                     */
                    resize(width: number, height: number): void;

                    /**
                     * Update the number of parallel texture units available per batch.
                     * This should be overridden by subclasses.
                     * 
                     * This is called automatically by a listener
                     * for the `Phaser.Renderer.Events.SET_PARALLEL_TEXTURE_UNITS` event,
                     * triggered by the RenderNodeManager.
                     * @param count The new number of parallel texture units available per batch. If undefined, the maximum number of texture units is used.
                     */
                    updateTextureCount(count?: number): void;

                    /**
                     * Draw then empty the current batch.
                     * 
                     * This method is called automatically, by either this node or the manager,
                     * when the batch is full, or when something else needs to be rendered.
                     * 
                     * This method should be overridden by subclasses.
                     * @param drawingContext The current drawing context.
                     * @param args Additional arguments to pass to the batch handler.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, ...args: any[]): void;

                    /**
                     * Add an instance to the batch. Game objects call this method to add
                     * themselves to the batch. This method should be overridden by subclasses.
                     * @param args Arguments to pass to the batch handler. These will vary depending on the handler.
                     */
                    batch(...args: any[]): void;

                }

                /**
                 * A batch handler RenderNode that renders `PointLight` Game Objects using WebGL.
                 * 
                 * Each PointLight is submitted as a textured quad (4 vertices, 6 indices) into
                 * a shared vertex buffer. The dedicated point-light shader computes the radial
                 * light falloff per fragment, using the light's world position, radius,
                 * attenuation factor, colour, and intensity. Multiple lights are batched
                 * together and flushed in a single draw call when the batch is full or when
                 * the renderer needs to switch context.
                 * 
                 * This handler uses no textures; it passes an empty texture array to the
                 * draw call because the lighting is calculated entirely in the fragment shader.
                 */
                class BatchHandlerPointLight extends Phaser.Renderer.WebGL.RenderNodes.BatchHandler {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this handler.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig);

                    /**
                     * The default configuration for this handler.
                     */
                    readonly defaultConfig: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig;

                    /**
                     * Update the uniforms for the current shader program.
                     * 
                     * This method is called automatically when the batch is run.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Draw then empty the current batch.
                     * 
                     * This method is called automatically, by either this node or the manager,
                     * when the batch is full, or when something else needs to be rendered.
                     * @param drawingContext The current drawing context.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Add a light to the batch.
                     * @param drawingContext The current drawing context.
                     * @param light The light to add to the batch.
                     * @param xTL The top-left x-coordinate of the light.
                     * @param yTL The top-left y-coordinate of the light.
                     * @param xBL The bottom-left x-coordinate of the light.
                     * @param yBL The bottom-left y-coordinate of the light.
                     * @param xTR The top-right x-coordinate of the light.
                     * @param yTR The top-right y-coordinate of the light.
                     * @param xBR The bottom-right x-coordinate of the light.
                     * @param yBR The bottom-right y-coordinate of the light.
                     * @param lightX The world x-coordinate of the light's centre, used by the shader to calculate radial falloff.
                     * @param lightY The world y-coordinate of the light's centre, used by the shader to calculate radial falloff.
                     */
                    batch(drawingContext: Phaser.Renderer.WebGL.DrawingContext, light: Phaser.GameObjects.PointLight, xTL: number, yTL: number, xBL: number, yBL: number, xTR: number, yTR: number, xBR: number, yBR: number, lightX: number, lightY: number): void;

                }

                /**
                 * The primary batch rendering node in Phaser's WebGL pipeline. It draws
                 * textured quads (used by Image, Sprite, BitmapText, TileSprite, and other
                 * Game Objects) in large batches for performance. Supports multi-texturing,
                 * normal-map-based lighting, and smooth pixel art rendering. Game Objects are
                 * accumulated into a vertex buffer and flushed to the GPU in a single draw
                 * call whenever possible.
                 */
                class BatchHandlerQuad extends Phaser.Renderer.WebGL.RenderNodes.BatchHandler {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this handler.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig);

                    /**
                     * The current render options to which the batch is built.
                     * These help define the shader.
                     */
                    renderOptions: object;

                    /**
                     * The render options currently being built.
                     */
                    nextRenderOptions: object;

                    /**
                     * The default configuration object for this handler.
                     * This is merged with the `config` object passed in the constructor.
                     */
                    defaultConfig: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig;

                    /**
                     * Update the maximum number of textures per batch.
                     * This rebuilds the shader program with the new texture count.
                     * The minimum number of textures is 1, and the maximum is the number of
                     * texture units defined in the renderer.
                     * Rebuilding the shader may be expensive, so use this sparingly.
                     * 
                     * If this runs during a batch, and the new count is less than the number of
                     * textures in the current batch entry, the batch will be flushed before the
                     * shader program is rebuilt, so none of the textures are skipped.
                     * 
                     * This is usually called automatically by a listener
                     * for the `Phaser.Renderer.Events.SET_PARALLEL_TEXTURE_UNITS` event,
                     * triggered by the RenderNodeManager.
                     * @param count The new maximum number of textures per batch. If undefined, the maximum number of texture units is used.
                     */
                    updateTextureCount(count?: number): void;

                    /**
                     * Update the uniforms for the current shader program.
                     * 
                     * This method is called automatically when the batch is run.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Set the texture resolution uniforms for the current shader program.
                     * Specifically, this sets the `uMainResolution` uniform with the pixel
                     * dimensions of each bound texture. This information is required by shader
                     * features such as smooth pixel art rendering.
                     * 
                     * This method is called automatically when the batch is run and the
                     * `texRes` render option is enabled.
                     * @param textures The textures to render.
                     */
                    setupTextureUniforms(textures: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper[]): void;

                    /**
                     * Finalize the texture count for the current sub-batch.
                     * This is called automatically when the render is run.
                     * It requests a shader program with the necessary number of textures,
                     * if that is less than the maximum allowed.
                     * This reduces the number of textures the GPU must handle,
                     * which can improve performance.
                     * @param count The total number of textures in the batch.
                     */
                    finalizeTextureCount(count: number): void;

                    /**
                     * Compare the incoming render options against the currently active options
                     * and stage any differences into `nextRenderOptions`. Sets
                     * `_renderOptionsChanged` to `true` if any option has changed, signalling
                     * that the current batch should be flushed and the shader rebuilt via
                     * `updateShaderConfig` before the next draw.
                     * @param renderOptions The new render options.
                     */
                    updateRenderOptions(renderOptions: object): void;

                    /**
                     * Update the shader configuration based on render options.
                     * This is called automatically when the render options change.
                     */
                    updateShaderConfig(): void;

                    /**
                     * Draw then empty the current batch.
                     * 
                     * This method is called automatically, by either this node or the manager,
                     * when the batch is full, or when something else needs to be rendered.
                     * @param drawingContext The current drawing context.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Add a quad to the batch.
                     * 
                     * For compatibility with TRIANGLE_STRIP rendering,
                     * the vertices are written into the buffer in the order:
                     * 
                     * - Bottom-left
                     * - Top-left
                     * - Bottom-right
                     * - Top-right
                     * @param currentContext The current drawing context.
                     * @param glTexture The texture to render.
                     * @param x0 The x coordinate of the top-left corner.
                     * @param y0 The y coordinate of the top-left corner.
                     * @param x1 The x coordinate of the bottom-left corner.
                     * @param y1 The y coordinate of the bottom-left corner.
                     * @param x2 The x coordinate of the top-right corner.
                     * @param y2 The y coordinate of the top-right corner.
                     * @param x3 The x coordinate of the bottom-right corner.
                     * @param y3 The y coordinate of the bottom-right corner.
                     * @param texX The left u coordinate (0-1).
                     * @param texY The top v coordinate (0-1).
                     * @param texWidth The width of the texture (0-1).
                     * @param texHeight The height of the texture (0-1).
                     * @param tintMode The tint mode to use.
                     * @param tintTL The top-left tint color.
                     * @param tintBL The bottom-left tint color.
                     * @param tintTR The top-right tint color.
                     * @param tintBR The bottom-right tint color.
                     * @param renderOptions Optional render features.
                     * @param args Additional arguments for subclasses.
                     */
                    batch(currentContext: Phaser.Renderer.WebGL.DrawingContext, glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, texX: number, texY: number, texWidth: number, texHeight: number, tintMode: number, tintTL: number, tintBL: number, tintTR: number, tintBR: number, renderOptions: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerQuadRenderOptions, ...args: any[]): void;

                    /**
                     * Process textures for batching.
                     * This method is called automatically by the `batch` method.
                     * It returns a piece of data used for various texture tasks,
                     * depending on the render options.
                     * 
                     * The texture datum may be used for texture ID or normal map rotation.
                     * @param glTexture The texture to render.
                     * @param renderOptions The current render options.
                     * @returns The texture datum.
                     */
                    batchTextures(glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, renderOptions: object): number;

                    /**
                     * Push the current batch entry to the batch entry list,
                     * and create a new batch entry for future use.
                     */
                    pushCurrentBatchEntry(): void;

                }

                /**
                 * BatchHandlerQuadSingle is a specialized batch handler for rendering quads
                 * with a single instance per batch.
                 * It extends the BatchHandlerQuad class and provides a specific configuration
                 * for single-instance rendering.
                 * It is used to efficiently render operations that require only a single quad,
                 * specifically filters.
                 * Because mobile devices often struggle with large buffer sizes,
                 * this class is designed to handle the case where only one quad is needed.
                 * 
                 * If no configuration is provided, the default values are:
                 * - `name`: 'BatchHandlerQuadSingle'
                 * - `shaderName`: 'STANDARD_SINGLE'
                 * - `instancesPerBatch`: 1
                 */
                class BatchHandlerQuadSingle extends Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this handler.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig);

                }

                /**
                 * This RenderNode renders textured triangle strips, such as for the Rope
                 * Game Object. It uses batches to accelerate drawing.
                 * 
                 * If a strip is submitted with too many vertices (usually >32,768),
                 * it will throw an error.
                 * 
                 * Note that you should call `batchStrip` instead of `batch` to add strips.
                 */
                class BatchHandlerStrip extends Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this handler.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig);

                    /**
                     * The default configuration object for this handler.
                     * This is merged with the `config` object passed in the constructor.
                     */
                    defaultConfig: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig;

                    /**
                     * Adds a textured triangle strip to the batch. Each pair of vertices
                     * in `vertices` forms one instance. The vertices are transformed by
                     * `calcMatrix` before being written into the vertex buffer.
                     * 
                     * When multiple strips are batched together, degenerate triangles are
                     * automatically inserted between them by repeating the last vertex of
                     * one strip and the first vertex of the next, ensuring correct rendering
                     * without a draw-call break.
                     * 
                     * If the incoming strip would overflow the current batch, the batch is
                     * flushed first. If the strip itself exceeds the maximum batch capacity,
                     * an error is thrown.
                     * 
                     * This method is named `batchStrip` rather than `batch` because its call
                     * signature differs from the standard batch handlers used by quad-based
                     * Game Objects.
                     * @param drawingContext The current drawing context.
                     * @param src The Game Object being rendered.
                     * @param calcMatrix The current transform matrix used to transform each vertex position into world space.
                     * @param glTexture The texture to render.
                     * @param vertices The local-space vertex positions of the strip, as a flat array of alternating x and y values.
                     * @param uv The normalized texture coordinates of the strip, as a flat array of alternating u and v values, matching the layout of `vertices`.
                     * @param colors The per-vertex packed tint color values for the strip.
                     * @param alphas The per-vertex alpha multiplier values for the strip.
                     * @param alpha The overall alpha multiplier applied on top of the per-vertex alpha values.
                     * @param tintMode The tint mode to use.
                     * @param renderOptions Optional render features. Strip rendering uses a single texture slot and does not support additional multi-texturing. The `smoothPixelArt` option is supported; other options are ignored.
                     * @param debugCallback An optional callback invoked after all vertices are processed, called in the context of `src` with three arguments: the source Game Object, the total vertex count, and a flat array of alternating x,y world-space positions for the transformed vertices.
                     */
                    batchStrip(drawingContext: Phaser.Renderer.WebGL.DrawingContext, src: Phaser.GameObjects.GameObject, calcMatrix: Phaser.GameObjects.Components.TransformMatrix, glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, vertices: Float32Array, uv: Float32Array, colors: Uint32Array, alphas: Float32Array, alpha: number, tintMode: Phaser.TintModes, renderOptions: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerQuadRenderOptions, debugCallback?: Function): void;

                }

                /**
                 * A RenderNode that handles batch rendering of TileSprite and Tile game objects
                 * in WebGL. It extends `BatchHandlerQuad` by passing per-vertex frame data
                 * (the texture coordinate origin and dimensions of the source frame) to the
                 * shader, enabling the shader to correctly clamp or wrap texture coordinates
                 * within the bounds of the frame. This is essential for tiled sprites, where
                 * a texture is repeated or scrolled across a surface and must not bleed into
                 * neighbouring frames on a texture atlas.
                 * 
                 * Two additional render options are supported: `clampFrame`, which prevents
                 * texture coordinates from sampling outside the frame region, and `wrapFrame`,
                 * which tiles the frame region. These options are managed dynamically so that
                 * shader variants are compiled and swapped only when the options change.
                 */
                class BatchHandlerTileSprite extends Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this handler.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig);

                    /**
                     * Reads the incoming render options and compares them against the
                     * currently active options. If any TileSprite-specific option has changed
                     * (`clampFrame`, `wrapFrame`, or the derived `texRes` flag), the internal
                     * change flag is set so that `updateShaderConfig` will update the active
                     * shader additions before the next draw call. Also calls the parent
                     * `BatchHandlerQuad` implementation to handle shared render options.
                     * @param renderOptions The render options to apply.
                     */
                    updateRenderOptions(renderOptions: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerQuadRenderOptions): void;

                    /**
                     * Applies any pending render option changes to the active shader program
                     * by enabling or disabling the `TexCoordFrameClamp` and `TexCoordFrameWrap`
                     * shader additions as required. This is called after the current batch has
                     * been flushed whenever `updateRenderOptions` detects a change. Also calls
                     * the parent `BatchHandlerQuad` implementation to handle shared shader
                     * configuration.
                     */
                    updateShaderConfig(): void;

                    /**
                     * Adds a textured quad to the batch for rendering as a TileSprite or Tile.
                     * Each vertex receives the full frame region (texX, texY, texWidth, texHeight)
                     * so that the shader can clamp or wrap UV coordinates within the frame bounds.
                     * If the batch is full after this call, it is flushed immediately. If the
                     * render options differ from those used by the current batch, the batch is
                     * also flushed and the shader configuration is updated before the new quad
                     * is written.
                     * @param drawingContext The current drawing context.
                     * @param glTexture The texture to render.
                     * @param x0 The x-coordinate of the top-left corner.
                     * @param y0 The y-coordinate of the top-left corner.
                     * @param x1 The x-coordinate of the bottom-left corner.
                     * @param y1 The y-coordinate of the bottom-left corner.
                     * @param x2 The x-coordinate of the top-right corner.
                     * @param y2 The y-coordinate of the top-right corner.
                     * @param x3 The x-coordinate of the bottom-right corner.
                     * @param y3 The y-coordinate of the bottom-right corner.
                     * @param texX The left u coordinate (0-1).
                     * @param texY The top v coordinate (0-1).
                     * @param texWidth The width of the texture (0-1).
                     * @param texHeight The height of the texture (0-1).
                     * @param tintMode The tint mode to use.
                     * @param tintTL The tint color for the top-left corner.
                     * @param tintBL The tint color for the bottom-left corner.
                     * @param tintTR The tint color for the top-right corner.
                     * @param tintBR The tint color for the bottom-right corner.
                     * @param renderOptions Optional render features.
                     * @param u0 The u coordinate of the distorted top-left corner.
                     * @param v0 The v coordinate of the distorted top-left corner.
                     * @param u1 The u coordinate of the distorted bottom-left corner.
                     * @param v1 The v coordinate of the distorted bottom-left corner.
                     * @param u2 The u coordinate of the distorted top-right corner.
                     * @param v2 The v coordinate of the distorted top-right corner.
                     * @param u3 The u coordinate of the distorted bottom-right corner.
                     * @param v3 The v coordinate of the distorted bottom-right corner.
                     */
                    batch(drawingContext: Phaser.Renderer.WebGL.DrawingContext, glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, texX: number, texY: number, texWidth: number, texHeight: number, tintMode: Phaser.TintModes, tintTL: number, tintBL: number, tintTR: number, tintBR: number, renderOptions: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerQuadRenderOptions, u0: number, v0: number, u1: number, v1: number, u2: number, v2: number, u3: number, v3: number): void;

                }

                /**
                 * A render node that draws flat-shaded triangles with per-vertex color in
                 * batches, using the WebGL renderer. Unlike texture-based batch handlers,
                 * this node requires no texture data — each vertex carries only a position
                 * and a packed RGBA tint color. It is used to render untextured geometry such
                 * as Graphics objects and other filled or stroked shapes.
                 * 
                 * Triangles are submitted via the `batch` method as a set of vertex positions,
                 * per-vertex colors, and an index array that groups vertices into triangles.
                 * The node accumulates these into a dynamic vertex buffer and index buffer,
                 * flushing automatically when the batch is full or when render state changes.
                 * 
                 * Optionally supports dynamic lighting: when a lighting configuration is
                 * provided, the node switches to a lighting-enabled shader variant and uploads
                 * the necessary light uniforms each frame.
                 */
                class BatchHandlerTriFlat extends Phaser.Renderer.WebGL.RenderNodes.BatchHandler {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this handler.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig);

                    /**
                     * The number of vertices currently in the batch.
                     */
                    vertexCount: number;

                    /**
                     * The current render options to which the batch is built.
                     * These help define the shader.
                     */
                    renderOptions: object;

                    /**
                     * The render options currently being built.
                     */
                    nextRenderOptions: object;

                    /**
                     * Update the uniforms for the current shader program.
                     * 
                     * This method is called automatically when the batch is run.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Compare the incoming render options against the current batch's render
                     * options and record whether they have changed. If the lighting value
                     * differs from the one used to build the current batch, the change is
                     * staged in `nextRenderOptions` and `_renderOptionsChanged` is set to
                     * `true`, signalling that the batch must be flushed and the shader
                     * reconfigured before new geometry is added.
                     * @param lighting The lighting configuration for the next draw call, or `false` if lighting is disabled.
                     */
                    updateRenderOptions(lighting: object | false): void;

                    /**
                     * Apply any pending render option changes to the shader program. This
                     * method is called after the current batch has been flushed, when
                     * `_renderOptionsChanged` is `true`. It synchronises `renderOptions` with
                     * `nextRenderOptions` and enables or disables the lighting shader
                     * additions accordingly. When lighting is enabled it also updates the
                     * `LIGHT_COUNT` preprocessor define to match the renderer's configured
                     * maximum number of lights.
                     */
                    updateShaderConfig(): void;

                    /**
                     * Draw then empty the current batch.
                     * 
                     * This method is called automatically, by either this node or the manager,
                     * when the batch is full, or when something else needs to be rendered.
                     * @param drawingContext The current drawing context.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Add data to the batch.
                     * 
                     * The data is composed of vertices and indexed triangles.
                     * Each triangle is defined by three indices into the vertices array.
                     * @param currentContext The current drawing context.
                     * @param indexes The index data. Each triangle is defined by three indices into the vertices array, so the length of this should be a multiple of 3.
                     * @param vertices The vertices data. Each vertex is defined by an x-coordinate and a y-coordinate.
                     * @param colors The color data. Each vertex has a color as a Uint32 value.
                     * @param lighting Should this batch use lighting? Default false.
                     */
                    batch(currentContext: Phaser.Renderer.WebGL.DrawingContext, indexes: number[], vertices: number[], colors: number[], lighting?: boolean): void;

                }

                /**
                 * A RenderNode responsible for executing the full rendering pipeline for a
                 * single Phaser Camera. It orchestrates every stage of camera output: filling
                 * the background color, rendering the list of visible children via the
                 * ListCompositor, applying post-render effects (flash and fade), and then
                 * compositing the result into the parent drawing context.
                 * 
                 * When the camera requires isolation — because it has a non-opaque alpha,
                 * active internal or external filter chains, or `forceComposite` is set —
                 * the node allocates a temporary framebuffer from the drawing context pool and
                 * renders into that instead of directly into the parent context. Internal
                 * filters are applied to the camera contents before compositing, while
                 * external filters expand the coverage area and are applied after the camera
                 * output has been placed into the scene coordinate space. The final composited
                 * image is then batched back to the parent context using the
                 * BatchHandlerQuadSingle node, with the camera's alpha and pixel-rounding
                 * settings respected.
                 */
                class Camera extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * The RenderNode that handles batching quads.
                     * This is used when a camera is rendering to a framebuffer,
                     * and the framebuffer needs to be drawn to the parent context.
                     */
                    batchHandlerQuadSingleNode: Phaser.Renderer.WebGL.RenderNodes.BatchHandlerQuad;

                    /**
                     * The RenderNode that handles filling the camera with a
                     * flat color. This is used to render the camera background,
                     * flash effects, and fade effects.
                     */
                    fillCameraNode: Phaser.Renderer.WebGL.RenderNodes.FillCamera;

                    /**
                     * The RenderNode that handles rendering lists of children.
                     */
                    listCompositorNode: Phaser.Renderer.WebGL.RenderNodes.ListCompositor;

                    /**
                     * Executes the full rendering pipeline for the given camera. This includes
                     * drawing the camera background color, rendering all child Game Objects via
                     * the ListCompositor, applying any post-render flash and fade effects, and
                     * then compositing the result into the parent drawing context.
                     * 
                     * If the camera requires a framebuffer (due to active filters, a non-opaque
                     * alpha, or `forceComposite` being set), a temporary context is allocated
                     * from the drawing context pool. Internal filters are applied to the camera
                     * contents within that framebuffer, and external filters are applied after
                     * the output has been transformed into scene space. The final image is
                     * batched back to the parent context, with camera alpha and pixel-rounding
                     * applied as appropriate.
                     * @param drawingContext The context currently in use.
                     * @param children The list of children to render.
                     * @param camera Current Camera.
                     * @param parentTransformMatrix This transform matrix is defined if the camera is focused on a filtered object.
                     * @param forceFramebuffer Should the camera always draw to a new framebuffer? This will also be activated if the camera has filters enabled. Default false.
                     * @param renderStep Which step of the rendering process is this? This is the index of the currently running function in a list of functions. Default 0.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, children: Phaser.GameObjects.GameObject[], camera: Phaser.Cameras.Scene2D.Camera, parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix, forceFramebuffer?: boolean, renderStep?: number): void;

                }

                /**
                 * A RenderNode which computes the geometry of a line segment and expands it
                 * into a quad suitable for WebGL rendering.
                 * 
                 * A line segment has two endpoints (`a` and `b`) and can have a different
                 * width at each end, allowing tapered lines. This node calculates the four
                 * corner vertices of the quad that represents the line, by offsetting
                 * perpendicular to the line direction by the respective half-widths at each
                 * end. The resulting vertices are optionally transformed by a matrix and
                 * appended to a flat vertex list.
                 * 
                 * This node is used internally by the WebGL renderer when drawing stroked
                 * paths, such as those produced by Graphics Game Objects.
                 */
                class DrawLine extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Computes the four vertices of the quad that represents a line segment
                     * and appends them to the provided `vertices` list. The line can vary in
                     * width between its start point (`a`) and end point (`b`), producing a
                     * tapered shape. Eight values are appended (four x/y pairs) in the order
                     * TL, BL, BR, TR, relative to the line's direction.
                     * @param drawingContext The context currently in use.
                     * @param currentMatrix A transform matrix to apply to the vertices. If not defined, the vertices are not transformed.
                     * @param ax The x coordinate of the start of the line.
                     * @param ay The y coordinate of the start of the line.
                     * @param bx The x coordinate of the end of the line.
                     * @param by The y coordinate of the end of the line.
                     * @param aLineWidth The width of the line at the start.
                     * @param bLineWidth The width of the line at the end.
                     * @param vertices The list to which the vertices are assigned.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, currentMatrix: Phaser.GameObjects.Components.TransformMatrix | undefined, ax: number, ay: number, bx: number, by: number, aLineWidth: number, bLineWidth: number, vertices: number[]): void;

                }

                /**
                 * A RenderNode responsible for executing the recorded drawing commands of a
                 * `DynamicTexture`. A `DynamicTexture` accumulates drawing operations (stamps,
                 * repeats, fills, clears, game object draws, callbacks, and captures) into a
                 * command buffer. Each time this handler's `run` method is called, it iterates
                 * through that buffer and executes every command against the texture's WebGL
                 * framebuffer.
                 * 
                 * The handler manages all necessary WebGL state during execution: it unbinds
                 * the framebuffer's own texture to prevent feedback loops, configures scissor
                 * boxes, and creates or releases cloned drawing contexts as blend modes and
                 * erase mode change across commands. When a PRESERVE command is not present
                 * the command buffer is cleared after rendering, ready for the next frame's
                 * drawing calls.
                 */
                class DynamicTextureHandler extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * The RenderNode that draws a filled rectangle.
                     */
                    fillRectNode: Phaser.Renderer.WebGL.RenderNodes.FillRect;

                    /**
                     * Processes the command buffer of the given DynamicTexture and executes
                     * each recorded drawing operation against its WebGL framebuffer. This
                     * includes stamping textures, tiling sprites, filling rectangles, clearing
                     * regions, drawing arbitrary game objects, toggling erase mode, invoking
                     * custom callbacks, and capturing game objects to sub-regions. Drawing
                     * contexts are cloned and released as blend modes change across commands.
                     * After all commands have been executed, the command buffer is cleared
                     * unless a PRESERVE command was encountered, and a POST_RENDER camera
                     * event is emitted.
                     * @param dynamicTexture The DynamicTexture to render.
                     */
                    run(dynamicTexture: Phaser.Textures.DynamicTexture): void;

                }

                /**
                 * A RenderNode that fills the viewport of a camera with a solid color, used
                 * to render a camera's background color before any game objects are drawn.
                 * 
                 * This node is invoked during the WebGL render pipeline whenever a camera has
                 * a background color set. It delegates the actual drawing to the `FillRect`
                 * RenderNode, which means the fill is submitted as a batched quad rather than
                 * a standalone draw call, keeping it efficient.
                 * 
                 * For cameras that render to a framebuffer (render textures), the camera's
                 * screen position is ignored and the fill is drawn at the origin of the
                 * framebuffer instead, since the framebuffer itself will be composited into
                 * the main scene at the correct position.
                 */
                class FillCamera extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * The RenderNode that draws a filled rectangle.
                     */
                    fillRectNode: Phaser.Renderer.WebGL.RenderNodes.FillRect;

                    /**
                     * Fills the camera with a color.
                     * This uses `FillRect`, so it is batched with other quads.
                     * @param drawingContext The context currently in use.
                     * @param color The color to fill the camera with.
                     * @param isFramebufferCamera Is this camera rendering to a framebuffer? If so, the camera position will not be applied, on the assumption that the camera position will be used to position the framebuffer in the external context.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, color: number, isFramebufferCamera?: boolean): void;

                }

                /**
                 * A RenderNode which fills a closed path with solid color.
                 * 
                 * It works by taking the array of path data and passing it through
                 * Earcut, which triangulates the polygon into a list of triangles.
                 * Each triangle is then submitted to the batch for rendering.
                 * The first and last points in the path are always preserved; interior
                 * points may be skipped based on the `detail` threshold.
                 */
                class FillPath extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Render the path using Earcut.
                     * @param drawingContext The context currently in use.
                     * @param currentMatrix The current transform matrix.
                     * @param submitterNode The Submitter node to use.
                     * @param path The points that define the line segments.
                     * @param tintTL The top-left tint color.
                     * @param tintTR The top-right tint color.
                     * @param tintBL The bottom-left tint color.
                     * @param detail The level of detail to use when filling the path, in pixels. Any interior point whose x and y distances from the previous accepted point are both within this threshold is skipped. The first and last points are always kept. A value of 0 disables simplification and keeps all points.
                     * @param lighting Whether to apply lighting effects to the path.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, submitterNode: Phaser.Renderer.WebGL.RenderNodes.BatchHandlerTriFlat, path: Phaser.Types.GameObjects.Graphics.WidePoint[], tintTL: number, tintTR: number, tintBL: number, detail: number, lighting: boolean): void;

                }

                /**
                 * A RenderNode which renders a solid, flat-colored rectangle into the WebGL
                 * render pipeline. It transforms four corner vertices using a provided
                 * transform matrix, submits them as two triangles to a `BatchHandlerTriFlat`
                 * node, and supports per-corner tint colors and optional lighting. This node
                 * is used for full-screen color fills, background overlays, camera effects,
                 * and any rectangle-shaped geometry that does not require a texture.
                 */
                class FillRect extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Transforms a rectangle's four corner vertices using the given matrix,
                     * then submits them as two indexed triangles to the batch handler, along
                     * with per-corner tint colors. Call this once per frame for each rectangle
                     * you wish to draw; it delegates the actual draw call to the submitter node.
                     * @param drawingContext The context currently in use.
                     * @param currentMatrix A transform matrix to apply to the vertices. If not defined, the identity matrix is used.
                     * @param submitterNode The Submitter node to use. If not defined, `BatchHandlerTriFlat` is used.
                     * @param x The x-coordinate of the top-left corner of the rectangle, in pixels.
                     * @param y The y-coordinate of the top-left corner of the rectangle, in pixels.
                     * @param width The width of the rectangle, in pixels.
                     * @param height The height of the rectangle, in pixels.
                     * @param tintTL The top-left tint color.
                     * @param tintTR The top-right tint color.
                     * @param tintBL The bottom-left tint color.
                     * @param tintBR The bottom-right tint color.
                     * @param lighting Whether to apply lighting effects to the rectangle.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, currentMatrix: Phaser.GameObjects.Components.TransformMatrix | undefined, submitterNode: Phaser.Renderer.WebGL.RenderNodes.BatchHandlerTriFlat | undefined, x: number, y: number, width: number, height: number, tintTL: number, tintTR: number, tintBL: number, tintBR: number, lighting: boolean): void;

                }

                /**
                 * A RenderNode which renders a single filled triangle with per-vertex tint colors.
                 * It is used internally by Phaser to draw flat-colored triangles, such as those
                 * produced by the Graphics Game Object when filling shapes. Each of the three
                 * vertices can carry an independent packed ARGB tint color, allowing smooth color
                 * gradients across the triangle face. An optional transform matrix can be supplied
                 * to position the triangle within the world before it is submitted to the GPU batch.
                 */
                class FillTri extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Batches a filled triangle for rendering in the current drawing context.
                     * The three vertices are optionally transformed by `currentMatrix` before
                     * being passed to `submitterNode`, which writes them into the GPU vertex
                     * batch. Per-vertex tint colors allow the triangle to display a smooth color
                     * gradient across its surface.
                     * @param drawingContext The context currently in use.
                     * @param currentMatrix A transform matrix to apply to the vertices. If not defined, the vertices are not transformed.
                     * @param submitterNode The Submitter node to use.
                     * @param xA The x-coordinate of the first vertex.
                     * @param yA The y-coordinate of the first vertex.
                     * @param xB The x-coordinate of the second vertex.
                     * @param yB The y-coordinate of the second vertex.
                     * @param xC The x-coordinate of the third vertex.
                     * @param yC The y-coordinate of the third vertex.
                     * @param tintA The tint color of the first vertex, as a packed ARGB integer.
                     * @param tintB The tint color of the second vertex, as a packed ARGB integer.
                     * @param tintC The tint color of the third vertex, as a packed ARGB integer.
                     * @param lighting Whether to apply lighting effects to the triangle.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, currentMatrix: Phaser.GameObjects.Components.TransformMatrix | undefined, submitterNode: Phaser.Renderer.WebGL.RenderNodes.BatchHandlerTriFlat, xA: number, yA: number, xB: number, yB: number, xC: number, yC: number, tintA: number, tintB: number, tintC: number, lighting: boolean): void;

                }

                /**
                 * ListCompositor
                 */
                class ListCompositor extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Render each child in the display list.
                     * 
                     * This allocates a new DisplayContext if a child's blend mode is different
                     * from the previous child. This will start a new batch if one is in progress.
                     * @param displayContext The context currently in use.
                     * @param children The list of children to render.
                     * @param parentTransformMatrix The accumulated transform matrix of the parent Game Object, passed down when this list is rendered as part of a nested display hierarchy.
                     * @param renderStep The index of the current render step within the ordered list of render functions being executed for this frame. Default 0.
                     */
                    run(displayContext: Phaser.Renderer.WebGL.DrawingContext, children: Phaser.GameObjects.GameObject[], parentTransformMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): void;

                }

                /**
                 * RebindContext is a RenderNode which sets the WebGL context to
                 * a default state, resetting important properties
                 * that might have been changed by an external renderer.
                 * 
                 * This is used by the Extern GameObject after rendering.
                 * It is the counterpart of YieldContext.
                 */
                class RebindContext extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Resets the WebGL context to a default state after an external renderer
                     * has finished rendering. This clears the current framebuffer's stencil
                     * and depth renderbuffers, rebinds the WebGL state with null resources,
                     * and unbinds all texture units to force rebinding on next use.
                     * @param displayContext The current drawing context.
                     */
                    run(displayContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * RenderNode
                 */
                class RenderNode {
                    /**
                     * 
                     * @param name The name of the RenderNode.
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(name: string, manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * The name of the RenderNode.
                     */
                    name: string;

                    /**
                     * The manager that owns this RenderNode.
                     */
                    manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager;

                    /**
                     * Run the RenderNode.
                     * This is a stub method that should be overridden by the specific
                     * implementation.
                     * 
                     * This method may be wrapped by `setDebug`.
                     * @param args Arguments to pass to the node. These will vary depending on the node.
                     */
                    run(...args: any[]): void;

                    /**
                     * By default this is an empty method hook that you can override and use in your own custom render nodes.
                     * 
                     * This method is called at the start of the `run` method.
                     * Don't forget to call it in your custom method.
                     * @param drawingContext The context currently in use.
                     */
                    onRunBegin(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * By default this is an empty method hook that you can override and use in your own custom render nodes.
                     * 
                     * This method is called at the end of the `run` method.
                     * Don't forget to call it in your custom method.
                     * @param drawingContext The context currently in use.
                     */
                    onRunEnd(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Enables or disables debug reporting for this node.
                     * 
                     * When enabled, the `run` method is replaced with a wrapper that pushes
                     * the node's name onto the manager's debug stack before execution and pops
                     * it afterwards, allowing the renderer to track which nodes are active.
                     * The original `run` implementation is preserved in `_run`.
                     * 
                     * When disabled, the original `run` method is restored and `_run` is cleared.
                     * @param debug Whether to report debug information.
                     */
                    setDebug(debug: boolean): void;

                }

                /**
                 * RenderNodeManager
                 */
                class RenderNodeManager {
                    /**
                     * 
                     * @param renderer The renderer that owns this manager.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer);

                    /**
                     * The renderer that owns this manager.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * The maximum number of texture units to use as choices in a batch.
                     * Batches can bind several textures and select one of them per instance,
                     * allowing for larger batches.
                     * However, some mobile devices degrade performance when using multiple
                     * texture units. So if the game config option `autoMobileTextures` is
                     * enabled and the device is not a desktop, this will be set to 1.
                     * Otherwise, it will be set to the renderer's `maxTextures`.
                     * 
                     * Some shaders may require more than one texture unit,
                     * so the actual limit on texture units per batch is `maxTextures`.
                     * 
                     * This value can be changed at runtime via `setMaxParallelTextureUnits`.
                     */
                    maxParallelTextureUnits: number;

                    /**
                     * The RenderNode which is currently being filled.
                     * This is stored so that it can be completed when another type of
                     * render is run.
                     */
                    currentBatchNode: Phaser.Renderer.WebGL.RenderNodes.RenderNode | null;

                    /**
                     * The drawing context of the current batch.
                     * This is stored here because the batch node is stateless.
                     */
                    currentBatchDrawingContext: Phaser.Renderer.WebGL.DrawingContext | null;

                    /**
                     * Whether nodes should record their run method for debugging.
                     * This should be set via `setDebug`.
                     */
                    debug: boolean;

                    /**
                     * The debug graph of nodes that have been run.
                     * This is used when `debug` is enabled.
                     */
                    debugGraph: DebugGraphNode | null;

                    /**
                     * The current node in the debug graph.
                     * This is used when `debug` is enabled.
                     */
                    currentDebugNode: DebugGraphNode | null;

                    /**
                     * Add a node to the manager.
                     * @param name The name of the node.
                     * @param node The node to add.
                     */
                    addNode(name: string, node: Phaser.Renderer.WebGL.RenderNodes.RenderNode): void;

                    /**
                     * Add a constructor for a node to the manager.
                     * This will allow the node to be constructed when `getNode` is called.
                     * @param name The name of the node.
                     * @param constructor The constructor for the node.
                     */
                    addNodeConstructor(name: string, constructor: Function): void;

                    /**
                     * Get a node from the manager.
                     * 
                     * If the node does not exist, and a constructor is available,
                     * it will be constructed and added to the manager,
                     * then returned.
                     * @param name The name of the node.
                     * @returns The node, or null if it does not exist.
                     */
                    getNode(name: string): Phaser.Renderer.WebGL.RenderNodes.RenderNode | null;

                    /**
                     * Check if a node exists in the manager.
                     * 
                     * If a node is not constructed, but a constructor is available,
                     * it will be considered to exist. Set `constructed` to true to
                     * require that the node has already been constructed.
                     * @param name The name of the node.
                     * @param constructed Whether the node must be constructed to be considered to exist. Default false.
                     * @returns Whether the node exists.
                     */
                    hasNode(name: string, constructed?: boolean): boolean;

                    /**
                     * Set the current batch node. If a batch node is already in progress,
                     * it will be completed before the new node is set.
                     * @param node The node to set, or null to clear the current node.
                     * @param drawingContext The drawing context. Only used if `node` is defined.
                     */
                    setCurrentBatchNode(node: Phaser.Renderer.WebGL.RenderNodes.BatchHandler | undefined, drawingContext?: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Set `maxParallelTextureUnits` to a new value.
                     * This will be clamped to the range [1, renderer.maxTextures].
                     * 
                     * This can be useful for providing the user with a way to adjust the
                     * performance of the game at runtime.
                     * @param value The new value for `maxParallelTextureUnits`. Must be a number; it will be clamped to the range [1, renderer.maxTextures].
                     */
                    setMaxParallelTextureUnits(value?: number): void;

                    /**
                     * Finish rendering the current batch.
                     * This should be called when starting a new rendering task.
                     */
                    finishBatch(): void;

                    /**
                     * Start a standalone render (SAR), which is not part of a batch.
                     * This will trigger batch completion if a batch is in progress.
                     */
                    startStandAloneRender(): void;

                    /**
                     * Set whether nodes should record their run method for debugging.
                     * This will set the debug property on all nodes, reset the debug graph,
                     * and record a single frame of the graph before disabling debug.
                     * @param value Whether nodes should record their run method for debugging.
                     */
                    setDebug(value: boolean): void;

                    /**
                     * Record a newly run RenderNode in the debug graph.
                     * @param name The name of the node.
                     */
                    pushDebug(name: string): void;

                    /**
                     * Pop the last recorded RenderNode from the debug graph.
                     */
                    popDebug(): void;

                    /**
                     * Format the current debug graph as an indented string.undefined
                     * @returns The formatted debug graph.
                     */
                    debugToString(): string;

                }

                /**
                 * A RenderNode that renders a single quad using a custom GLSL shader program.
                 * It is used by the Shader Game Object to execute user-defined vertex and
                 * fragment shaders against a four-vertex quad that matches the game object's
                 * dimensions. The quad is transformed through the scene camera and supports
                 * optional rendering directly to a texture via `renderToTexture`. Shader
                 * uniforms, texture samplers, and shader addition variants are all managed
                 * through this node, making it the primary entry point for custom WebGL
                 * shader effects in Phaser.
                 */
                class ShaderQuad extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config: Phaser.Types.GameObjects.Shader.ShaderQuadConfig);

                    /**
                     * The WebGLRenderer in use.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * The index buffer defining vertex order.
                     */
                    indexBuffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;

                    /**
                     * The vertex buffer layout for this RenderNode.
                     * 
                     * This consists of 4 vertices, 0-3, forming the corners of a quad instance.
                     */
                    readonly vertexBufferLayout: Phaser.Renderer.WebGL.Wrappers.WebGLVertexBufferLayoutWrapper;

                    /**
                     * The program manager used to create and manage shader programs.
                     * This contains shader variants.
                     */
                    programManager: Phaser.Renderer.WebGL.ProgramManager;

                    /**
                     * A bound convenience function that queues a uniform value to be applied
                     * to the current shader program. Delegates to the ProgramManager's
                     * `setUniform` method.
                     */
                    setUniform: Function;

                    /**
                     * The transformer node used to transform the quad for rendering.
                     */
                    transformerNode: Phaser.Renderer.WebGL.RenderNodes.TransformerImage;

                    /**
                     * An object which acts as a proxy for textures in the transformer.
                     */
                    _texturerProxy: object;

                    /**
                     * Renders a quad using the shader program. Transforms the quad vertices
                     * based on the game object properties, populates the vertex buffer,
                     * sets up uniforms and textures, and issues a draw call.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The Shader game object being rendered.
                     * @param parentMatrix The parent transform matrix.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.Shader, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void;

                    /**
                     * Extracts the WebGL textures from the game object's texture list
                     * and returns them as an array for use during rendering.
                     * @param gameObject The Shader game object to extract textures from.
                     * @returns An array of WebGL textures.
                     */
                    setupTextures(gameObject: Phaser.GameObjects.Shader): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper[];

                    /**
                     * Updates the shader configuration for the current render pass.
                     * This is called before the shader is rendered.
                     * This method is a hook for custom shader configurations.
                     * You should override it if you need to adjust shader additions
                     * after initialization.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param renderNode The RenderNode being rendered.
                     */
                    updateShaderConfig(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.GameObject, renderNode: Phaser.Renderer.WebGL.RenderNodes.ShaderQuad): void;

                }

                /**
                 * A RenderNode which renders a stroke path as a series of connected line
                 * segments, optionally closing the path by connecting the last segment back
                 * to the first. It is used by the WebGL renderer to draw stroked shapes, such
                 * as those created by the Graphics Game Object. Each segment is rendered as a
                 * quad (two triangles), and adjacent segments are joined with an additional
                 * connecting quad when the stroke width exceeds two pixels. A level-of-detail
                 * mechanism allows intermediate points that are too close together in screen
                 * space to be skipped, reducing overdraw on dense paths.
                 */
                class StrokePath extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * The RenderNode that generates a line segment.
                     */
                    drawLineNode: Phaser.Renderer.WebGL.RenderNodes.DrawLine;

                    /**
                     * Render a stroke path consisting of several line segments.
                     * @param drawingContext The context currently in use.
                     * @param submitterNode The Submitter node to use.
                     * @param path The points that define the line segments.
                     * @param lineWidth The width of the stroke.
                     * @param open If `true`, the path is open and the last segment will not be connected back to the first. If `false`, the path is closed and a connecting quad is drawn between the last and first segments.
                     * @param currentMatrix The current transform matrix.
                     * @param tintTL The top-left tint color.
                     * @param tintTR The top-right tint color.
                     * @param tintBL The bottom-left tint color.
                     * @param tintBR The bottom-right tint color.
                     * @param detail The minimum distance, in screen-space pixels, between consecutive path points. Any intermediate point closer than this distance to the current point is skipped, reducing overdraw on dense paths. The final point of each segment is always preserved. Set to `0` to disable LOD and render every point.
                     * @param lighting Whether to apply lighting effects to the stroke.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, submitterNode: Phaser.Renderer.WebGL.RenderNodes.BatchHandlerTriFlat, path: Phaser.Types.GameObjects.Graphics.WidePoint[], lineWidth: number, open: boolean, currentMatrix: Phaser.GameObjects.Components.TransformMatrix, tintTL: number, tintTR: number, tintBL: number, tintBR: number, detail: number, lighting: boolean): void;

                }

                /**
                 * YieldContext is a RenderNode which sets the WebGL context to a default state,
                 * ready for another renderer.
                 * 
                 * This is used by the Extern Game Object to prepare the WebGL context for custom rendering.
                 * It is the counterpart of RebindContext.
                 */
                class YieldContext extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the WebGL context to a default state.
                     * This will flush any existing batch, set the blend mode to NORMAL,
                     * unbind any current VAO, and unbind all texture units.
                     * @param displayContext The context currently in use.
                     */
                    run(displayContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                namespace Defaults {
                    /**
                     * A Map defining the default render nodes used by TileSprite Game Objects in the WebGL renderer.
                     * 
                     * Each entry maps a node role name to the string identifier of the render node class
                     * responsible for that role. These nodes work together in the render pipeline to
                     * process and draw a TileSprite:
                     * 
                     * - `Submitter`: Submits the TileSprite geometry to the batch for drawing (`SubmitterTileSprite`).
                     * - `BatchHandler`: Manages the WebGL batch that accumulates TileSprite draw calls (`BatchHandlerTileSprite`).
                     * - `Transformer`: Computes the world transform matrix for the TileSprite (`TransformerTileSprite`).
                     * - `Texturer`: Resolves and applies the scrolling texture coordinates for the TileSprite (`TexturerTileSprite`).
                     * 
                     * This map is used when constructing the render node graph for a TileSprite, ensuring
                     * each role is fulfilled by an appropriate default implementation unless overridden.
                     */
                    var DefaultTileSpriteNodes: Phaser.Structs.Map<string, string>;

                }

                /**
                 * The base class for all WebGL post-processing filters in Phaser.
                 * 
                 * Filters are render nodes that apply visual effects to a WebGL texture by
                 * processing an input drawing context and producing an output drawing context.
                 * They are managed by a `Phaser.Filters.Controller`, which chains multiple
                 * filters together so that each filter's output becomes the next filter's
                 * input. Examples of filters include blur, glow, bloom, and color correction.
                 * 
                 * This class should not be instantiated directly. Instead, extend it to create
                 * a custom filter that overrides the {@link Phaser.Renderer.WebGL.RenderNodes.BaseFilter#run run} method.
                 */
                class BaseFilter extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param name The name of the filter.
                     * @param manager The manager that owns this filter.
                     */
                    constructor(name: string, manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Runs the filter, processing the input drawing context and returning a drawing context containing the output texture.
                     * 
                     * This base implementation does nothing and is intended to be overridden by subclasses. Each subclass should apply its specific visual effect (for example, blur or glow) by writing to the output drawing context using WebGL shader programs.
                     * @param controller The filter controller.
                     * @param inputDrawingContext The drawing context containing the input texture. This is either the initial render, or the output of the previous filter. This will be released during the run process, and can no longer be used.
                     * @param outputDrawingContext The drawing context where the output texture will be drawn. If not specified, a new drawing context will be generated. Generally, this parameter is used for the last filter in a chain, so the output texture is drawn to the main framebuffer.
                     * @param padding The padding to add to the input texture to create the output texture. If not specified, the controller is used to get the padding. This should be undefined for internal filters, so the controller will expand textures as needed; and defined as the negative padding of the previous filter for external filters, so the texture will shrink to the correct size.
                     * @returns The drawing context containing the output texture.
                     */
                    run(controller: Phaser.Filters.Controller, inputDrawingContext: Phaser.Renderer.WebGL.DrawingContext, outputDrawingContext?: Phaser.Renderer.WebGL.DrawingContext, padding?: Phaser.Geom.Rectangle): Phaser.Renderer.WebGL.DrawingContext;

                }

                /**
                 * This is a base class for all filters that use a shader.
                 * Most filters will extend this class.
                 * 
                 * It takes care of setting up the shader program and vertex buffer layout.
                 * It also provides the `run` method which handles the rendering of the filter.
                 * When rendering, it generates a new DrawingContext to render to,
                 * and releases the input DrawingContext.
                 * 
                 * Note: be careful when using `gl_FragCoord` in shader code.
                 * This built-in variable gives you the "window relative" coordinate
                 * of the pixel being processed.
                 * But this is actually relative to the framebuffer size,
                 * and Phaser treats all framebuffers except the main canvas
                 * as being vertically flipped.
                 * This means that `gl_FragCoord.y = 0` in a shader will be the bottom of a framebuffer,
                 * but the top of the canvas.
                 * This means `gl_FragCoord` gives different results when it's inside a
                 * framebuffer (like a Render Texture or Filter) compared to the main canvas.
                 * Be aware of this restriction when writing shaders.
                 */
                class BaseFilterShader extends Phaser.Renderer.WebGL.RenderNodes.BaseFilter {
                    /**
                     * 
                     * @param name The name of the filter.
                     * @param manager The manager that owns this filter.
                     * @param fragmentShaderKey The key of the fragment shader source in the shader cache. This will only be used if `fragmentShaderSource` is not set.
                     * @param fragmentShaderSource The fragment shader source.
                     * @param shaderAdditions An array of shader additions to apply to the shader program.
                     */
                    constructor(name: string, manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, fragmentShaderKey?: string, fragmentShaderSource?: string, shaderAdditions?: Phaser.Types.Renderer.WebGL.ShaderAdditionConfig[] | undefined);

                    /**
                     * The index buffer defining vertex order.
                     */
                    indexBuffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;

                    /**
                     * The vertex buffer layout for this RenderNode.
                     * 
                     * This consists of 4 vertices forming the corners of a quad.
                     */
                    readonly vertexBufferLayout: Phaser.Renderer.WebGL.Wrappers.WebGLVertexBufferLayoutWrapper;

                    /**
                     * The program manager used to create and manage shader programs.
                     * This contains shader variants.
                     */
                    programManager: Phaser.Renderer.WebGL.ProgramManager;

                    /**
                     * Runs the filter shader. This method handles the full rendering pipeline for the filter:
                     * it acquires an output DrawingContext (or uses the one provided), computes
                     * padded quad vertices, populates the vertex buffer, sets up textures and uniforms
                     * via the shader program, issues the draw call, and releases the input context.
                     * @param controller The filter controller that owns this filter.
                     * @param inputDrawingContext The input drawing context containing the source texture.
                     * @param outputDrawingContext An optional output drawing context. If not provided, one will be obtained from the pool.
                     * @param padding Optional padding Rectangle to apply. If not provided, the controller's padding is used.
                     * @returns The output drawing context containing the filtered result.
                     */
                    run(controller: Phaser.Filters.Controller, inputDrawingContext: Phaser.Renderer.WebGL.DrawingContext, outputDrawingContext?: Phaser.Renderer.WebGL.DrawingContext, padding?: Phaser.Geom.Rectangle): Phaser.Renderer.WebGL.DrawingContext;

                    /**
                     * Set up the shader configuration for this shader.
                     * Override this method to handle shader configuration.
                     * @param controller The filter controller.
                     * @param drawingContext The drawing context in use.
                     */
                    updateShaderConfig(controller: Phaser.Filters.Controller, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Run any necessary modifications on the textures array.
                     * Override this method to handle texture inputs.
                     * @param controller The filter controller.
                     * @param textures The array of textures to modify in-place.
                     * @param drawingContext The drawing context in use.
                     */
                    setupTextures(controller: Phaser.Filters.Controller, textures: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper[], drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Set up the uniforms for this shader, based on the controller.
                     * Override this method to handle uniform setup.
                     * @param controller The filter controller.
                     * @param drawingContext The drawing context in use.
                     */
                    setupUniforms(controller: Phaser.Filters.Controller, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that applies a barrel (or pincushion) distortion effect to a
                 * WebGL render target. Barrel distortion warps the image as though it were
                 * projected onto a curved surface: positive amounts bow the edges outward
                 * (barrel), while negative amounts pinch them inward (pincushion). It is
                 * commonly used to simulate fisheye lenses, VR screen curvature, or retro CRT
                 * monitor effects.
                 * 
                 * This node is used internally by the {@link Phaser.Filters.Barrel} filter
                 * controller, which exposes the `amount` property for controlling the strength
                 * and direction of the distortion.
                 * 
                 * See {@link Phaser.Filters.Barrel}.
                 */
                class FilterBarrel extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the shader uniforms required by the barrel distortion fragment
                     * shader. Reads the `amount` value from the filter controller and passes it
                     * to the GPU program, where it controls the strength and direction of the
                     * distortion applied to the render target.
                     * @param controller The filter controller providing the `amount` uniform value.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(controller: Phaser.Filters.Barrel, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the Blend filter effect, compositing the main
                 * rendered texture with a secondary blend texture using a specified blend mode
                 * (such as Normal, Multiply, Screen, or Overlay). The active blend mode is
                 * injected into the fragment shader as a preprocessor define at draw time,
                 * allowing a single shader program to support multiple compositing algorithms
                 * via shader additions.
                 * 
                 * Use this RenderNode indirectly through the {@link Phaser.Filters.Blend}
                 * filter controller, which exposes the blend mode, blend texture, blend amount,
                 * and tint color as configurable properties.
                 * 
                 * See {@link Phaser.Filters.Blend}.
                 */
                class FilterBlend extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Updates the shader configuration to match the blend mode specified by
                     * the filter controller. The blend mode is resolved to its string name and
                     * injected into the fragment shader as a `#define BLEND` preprocessor
                     * directive via a tagged shader addition. If the controller specifies
                     * `SKIP_CHECK`, the blend mode falls back to `NORMAL`. If the blend mode
                     * is not found in the internal map, `NORMAL` is used as a safe default.
                     * @param controller The filter controller providing the blend mode.
                     * @param drawingContext The current drawing context.
                     */
                    updateShaderConfig(controller: Phaser.Filters.Blend, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Assigns the blend texture from the filter controller to texture slot 1.
                     * The main rendered texture occupies slot 0; slot 1 is the secondary
                     * texture that the fragment shader blends against using the active blend
                     * mode.
                     * @param controller The filter controller providing the blend texture.
                     * @param textures The texture array to populate. Index 1 is set to the blend texture.
                     * @param drawingContext The current drawing context.
                     */
                    setupTextures(controller: Phaser.Filters.Blend, textures: WebGLTexture[], drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Sets the WebGL uniforms required by the blend fragment shader:
                     * 
                     * - `uMainSampler2` — bound to texture unit 1 (the blend texture).
                     * - `amount` — the blend strength, where `0` shows only the main texture
                     *   and `1` applies the full blend effect.
                     * - `color` — a tint color applied to the blend texture during compositing.
                     * @param controller The filter controller providing uniform values.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(controller: Phaser.Filters.Blend, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the Blocky filter effect, which pixelates the
                 * rendered output by dividing it into rectangular blocks of a configurable
                 * size. Each block is filled with a uniform color sampled from the source
                 * texture, producing a retro, low-resolution appearance. The block dimensions
                 * and positional offset are driven by the associated
                 * {@link Phaser.Filters.Blocky} controller.
                 * See {@link Phaser.Filters.Blocky}.
                 */
                class FilterBlocky extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the WebGL shader uniforms required by the Blocky filter.
                     * 
                     * Passes the current render target dimensions as `resolution`, and a
                     * combined `uSizeAndOffset` vector containing the clamped block width,
                     * block height, and the x/y positional offset. The block size values are
                     * clamped to a minimum of 1 to prevent division-by-zero in the shader.
                     * @param controller The filter controller providing block size and offset values.
                     * @param drawingContext The current drawing context, used to read the render target dimensions.
                     */
                    setupUniforms(controller: Phaser.Filters.Blocky, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that applies a multi-pass Gaussian blur effect, driven by a
                 * {@link Phaser.Filters.Blur} controller.
                 * 
                 * Rather than running a blur shader directly, this node acts as a dispatcher:
                 * it inspects the controller's `quality` setting and delegates to one of three
                 * dedicated blur nodes — `FilterBlurLow` (quality 0), `FilterBlurMed`
                 * (quality 1), or `FilterBlurHigh` (quality 2).
                 * 
                 * For each step requested by the controller, the node performs two separated
                 * passes — one horizontal and one vertical. Because Gaussian blurs are
                 * axis-separable, this produces the same visual result as a single full 2D
                 * Gaussian pass while being significantly cheaper to execute. Padding is
                 * applied only on the first pass so that subsequent passes do not
                 * progressively grow the render area.
                 */
                class FilterBlur extends Phaser.Renderer.WebGL.RenderNodes.BaseFilter {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Runs the Blur filter effect.
                     * 
                     * The method selects the appropriate blur shader node based on
                     * `controller.quality`, then executes `controller.steps` iterations of
                     * axis-separated Gaussian blur. Each iteration consists of a horizontal
                     * pass followed by a vertical pass. Padding from the controller is applied
                     * on the first pass only; subsequent passes use an empty rectangle so the
                     * render area does not grow with each iteration.
                     * @param controller The Blur filter controller, supplying quality, steps, strength, color, and axis blur amounts.
                     * @param inputDrawingContext The drawing context containing the source texture to blur.
                     * @param outputDrawingContext The drawing context to receive the final blurred output.
                     * @param padding Padding to apply around the render area on the first pass. If omitted, it is retrieved from the controller.
                     * @returns The drawing context containing the blurred result.
                     */
                    run(controller: Phaser.Filters.Blur, inputDrawingContext: Phaser.Renderer.WebGL.DrawingContext, outputDrawingContext: Phaser.Renderer.WebGL.DrawingContext, padding?: Phaser.Geom.Rectangle): Phaser.Renderer.WebGL.DrawingContext;

                }

                /**
                 * A RenderNode that renders a high quality Gaussian blur effect using a
                 * dedicated fragment shader. Unlike the standard blur variant, this node
                 * uses a larger kernel that produces smoother, more visually accurate results
                 * at the cost of additional GPU work per pass.
                 * 
                 * This node should not be instantiated or called directly. It is selected
                 * and invoked automatically by the `FilterBlur` RenderNode when the blur
                 * controller's quality setting is set to high.
                 */
                class FilterBlurHigh extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Uploads the shader uniforms required for the high quality blur pass.
                     * 
                     * Called automatically by the rendering pipeline before the blur shader
                     * is executed. It passes the current render target dimensions as the
                     * `resolution` uniform, the blur `strength`, the tint `color`, and the
                     * directional `offset` (x/y) that controls which axis the blur is applied
                     * along for the current pass.
                     * @param controller The Blur filter controller providing the blur parameters.
                     * @param drawingContext The current drawing context, used to determine the render resolution.
                     */
                    setupUniforms(controller: Phaser.Filters.Blur, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that renders the BlurLow filter effect, which applies a
                 * single-pass Gaussian blur to the input texture using a small sample kernel.
                 * 
                 * This is the lowest quality tier of the blur filter family. It uses fewer
                 * texture samples than the medium and high quality variants, making it faster
                 * to execute on the GPU at the cost of a less smooth result. It is well suited
                 * to subtle or fast-moving blur effects where visual fidelity is less critical
                 * than rendering performance.
                 * 
                 * This node should not be used directly. It is selected and invoked
                 * automatically by the FilterBlur RenderNode based on the quality setting of
                 * the blur controller that is currently being processed.
                 */
                class FilterBlurLow extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the WebGL shader uniforms required by the blur fragment shader.
                     * 
                     * Called once per render pass before the blur is drawn. It uploads the
                     * current render target dimensions as `resolution`, the blur spread
                     * amount as `strength`, the tint as `color`, and the directional
                     * blur axis as `offset` (a two-component vector containing the
                     * horizontal and vertical offset values from the controller).
                     * @param controller The Blur filter controller providing the uniform values.
                     * @param drawingContext The current drawing context, used to read the render target dimensions.
                     */
                    setupUniforms(controller: Phaser.Filters.Blur, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the BlurMed filter effect.
                 * This is a medium quality blur filter.
                 * It should not be used directly.
                 * It is intended to be called by the FilterBlur filter
                 * based on the quality setting of the controller it is running.
                 */
                class FilterBlurMed extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the WebGL shader uniforms required by the blur fragment shader.
                     * 
                     * Called once per render pass before the blur is drawn. It uploads the
                     * current render target dimensions as `resolution`, the blur spread
                     * amount as `strength`, the tint as `color`, and the directional
                     * blur axis as `offset` (a two-component vector containing the
                     * horizontal and vertical offset values from the controller).
                     * @param controller The Blur filter controller providing the uniform values.
                     * @param drawingContext The current drawing context, used to read the render target dimensions.
                     */
                    setupUniforms(controller: Phaser.Filters.Blur, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the Bokeh filter effect, which simulates the
                 * lens blur and depth-of-field appearance found in photography and film.
                 * It supports both a standard circular bokeh blur and a tilt-shift mode,
                 * which blurs only the top and bottom regions of the image to create the
                 * illusion of a shallow focal plane. The effect is controlled via the
                 * associated filter controller.
                 * See {@link Phaser.Filters.Bokeh}.
                 */
                class FilterBokeh extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the WebGL shader uniforms required by the Bokeh fragment shader,
                     * sourcing values from the filter controller and the current drawing
                     * context. This method is called automatically each time the filter is
                     * rendered.
                     * @param controller The Bokeh filter controller supplying the effect parameters.
                     * @param drawingContext The current drawing context, used to supply the render resolution.
                     */
                    setupUniforms(controller: Phaser.Filters.Bokeh, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that applies a Color Matrix filter effect to a Game Object or
                 * camera. The color matrix is a 5x4 floating-point matrix that transforms the
                 * red, green, blue, and alpha channels of every pixel in the rendered output,
                 * enabling visual effects such as grayscale, sepia tone, hue rotation,
                 * brightness, contrast, and saturation adjustments.
                 * 
                 * This node is used internally by the Phaser filter pipeline and is driven by
                 * a {@link Phaser.Filters.ColorMatrix} controller, which provides the matrix
                 * data and alpha values passed as uniforms to the fragment shader.
                 */
                class FilterColorMatrix extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the WebGL shader uniforms required by the Color Matrix filter.
                     * 
                     * Uploads the 5x4 color matrix data array from the controller's
                     * {@link Phaser.Display.ColorMatrix} to the `uColorMatrix` uniform, and
                     * the overall alpha multiplier to the `uAlpha` uniform.
                     * @param controller The filter controller providing the color matrix and alpha values.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(controller: Phaser.Filters.ColorMatrix, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that applies the Combine Color Matrix filter effect, as defined
                 * by {@link Phaser.Filters.CombineColorMatrix}.
                 * 
                 * This effect blends two independent color matrices: one applied to the game
                 * object itself (`colorMatrixSelf`) and one sourced from an external transfer
                 * texture (`colorMatrixTransfer`). Each matrix has its own alpha multiplier,
                 * and additional per-channel addition and multiplication values can be supplied
                 * to further adjust the final color output.
                 * 
                 * Use this filter when you need to composite or blend colour-grading from two
                 * separate sources in a single WebGL pass, for example combining a base
                 * desaturation pass with a tinted overlay texture.
                 */
                class FilterCombineColorMatrix extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Binds the transfer texture required by the shader.
                     * 
                     * Assigns the controller's pre-rendered GL texture to texture slot 1, which
                     * the fragment shader reads via the `uTransferSampler` uniform as the source
                     * for the transfer color matrix pass.
                     * @param controller The filter controller providing the transfer GL texture.
                     * @param textures The texture array used by the shader. The transfer texture is written to index 1.
                     * @param _drawingContext The current drawing context (unused by this method).
                     */
                    setupTextures(controller: Phaser.Filters.CombineColorMatrix, textures: WebGLTexture[], _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Uploads all shader uniforms required by the Combine Color Matrix effect.
                     * 
                     * Sets the following uniforms on the active shader program:
                     * 
                     * - `uTransferSampler` — texture unit index for the transfer texture.
                     * - `uColorMatrixSelf` — the 4×5 color matrix applied to the game object itself.
                     * - `uColorMatrixTransfer` — the 4×5 color matrix applied to the transfer texture.
                     * - `uAlphaSelf` — the global alpha multiplier for the self color matrix.
                     * - `uAlphaTransfer` — the global alpha multiplier for the transfer color matrix.
                     * - `uAdditions` — per-channel additive offsets applied after matrix multiplication.
                     * - `uMultiplications` — per-channel multiplicative factors applied after matrix multiplication.
                     * @param controller The filter controller supplying color matrix data, alpha values, additions, and multiplications.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(controller: Phaser.Filters.CombineColorMatrix, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that applies a displacement filter effect to the WebGL rendering pipeline.
                 * 
                 * Displacement filtering offsets the pixels of the source image using a
                 * displacement map texture. The red channel of the map controls horizontal
                 * offset and the green channel controls vertical offset. The magnitude of the
                 * displacement is scaled by the controller's `x` and `y` amount values,
                 * allowing you to create ripple, wave, heat-haze, and similar distortion
                 * effects at runtime.
                 * 
                 * This node is used internally by {@link Phaser.Filters.Displacement} and is
                 * not typically instantiated directly. Use the Displacement filter on a Game
                 * Object or Camera to apply this effect.
                 */
                class FilterDisplacement extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Binds the displacement map texture used by this filter.
                     * 
                     * Assigns the controller's WebGL displacement texture to texture slot 1,
                     * which maps to the `uDisplacementSampler` uniform in the fragment shader.
                     * @param controller The Displacement filter controller providing the displacement map texture.
                     * @param textures The textures array for this render pass. The displacement texture is written to index 1.
                     */
                    setupTextures(controller: Phaser.Filters.Displacement, textures: WebGLTexture[]): void;

                    /**
                     * Sets the shader uniforms required by the displacement filter.
                     * 
                     * Passes the displacement sampler index and the displacement amount vector
                     * to the fragment shader. The amount vector is a two-component value whose
                     * x and y components scale the horizontal and vertical displacement
                     * respectively, as defined on the {@link Phaser.Filters.Displacement}
                     * controller.
                     * @param controller The Displacement filter controller providing the displacement amount values.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(controller: Phaser.Filters.Displacement, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that applies a glow effect around the edges of a Game Object
                 * using a WebGL fragment shader. The glow radiates outward from the visible
                 * pixels of the source texture, with configurable distance, quality, color,
                 * and inner and outer strength. An optional knockout mode renders only the
                 * glow itself, hiding the original image beneath it.
                 * 
                 * This node is used internally by the {@link Phaser.Filters.Glow} filter
                 * controller. The glow distance and quality are compiled into the shader as
                 * preprocessor defines, so changing them causes a shader recompile. Other
                 * properties are passed as uniforms and can be updated each frame without
                 * recompilation.
                 * 
                 * See {@link Phaser.Filters.Glow}.
                 */
                class FilterGlow extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Updates the shader program's preprocessor defines for glow distance and
                     * quality based on the current controller values. Because these parameters
                     * are baked into the shader at compile time, changing them replaces the
                     * relevant shader additions and triggers a program recompile.
                     * @param controller The Glow filter controller providing the distance and quality values.
                     * @param drawingContext The current drawing context.
                     */
                    updateShaderConfig(controller: Phaser.Filters.Glow, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Sets the WebGL shader uniforms required by the glow fragment shader.
                     * This includes the render target resolution, the glow color, the outer
                     * and inner glow strength, the scale factor, and the knockout flag that
                     * controls whether the original image is hidden beneath the glow.
                     * @param controller The Glow filter controller providing the uniform values.
                     * @param drawingContext The current drawing context, used to read the render target dimensions.
                     */
                    setupUniforms(controller: Phaser.Filters.Glow, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that renders the GradientMap filter effect, which maps the
                 * luminosity of each pixel in the source image to a corresponding color from
                 * a gradient ramp texture. Darker pixels are mapped to one end of the gradient
                 * and brighter pixels to the other, replacing the original colors entirely.
                 * This enables stylistic effects such as thermal imaging, night vision, sepia
                 * toning, or any arbitrary color grade driven by brightness.
                 * 
                 * The gradient is defined by a {@link Phaser.Display.ColorRamp} attached to
                 * the controlling {@link Phaser.Filters.GradientMap} filter. The ramp is
                 * uploaded as a data texture and sampled in the fragment shader. The shader
                 * variant is selected dynamically based on the ramp's band tree depth, so the
                 * program is recompiled when the ramp structure changes.
                 * 
                 * See {@link Phaser.Filters.GradientMap}.
                 */
                class FilterGradientMap extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Binds the textures required by the gradient map shader.
                     * The ramp data texture, which encodes the gradient color lookup, is
                     * assigned to texture slot 1. Slot 0 is reserved for the source render
                     * texture and is handled by the base class.
                     * @param controller The filter controller providing the ramp data.
                     * @param textures The texture array to populate for this draw call.
                     * @param _drawingContext The current drawing context. Unused by this method.
                     */
                    setupTextures(controller: Phaser.Filters.GradientMap, textures: WebGLTexture[], _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Sets all shader uniforms required by the gradient map effect. This
                     * includes the ramp texture index, the ramp's data texture resolution and
                     * first-band offset (used to address the correct rows in a shared ramp
                     * atlas), the dither toggle, the unpremultiply flag, the tint color and
                     * its blend factor, and the overall alpha value.
                     * @param controller The filter controller providing uniform values.
                     * @param _drawingContext The current drawing context. Unused by this method.
                     */
                    setupUniforms(controller: Phaser.Filters.GradientMap, _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Updates the shader program configuration to match the current ramp's
                     * band tree depth. The RAMP shader addition's name is set to
                     * `RAMP_<depth>` so the program manager can cache and retrieve the correct
                     * variant, and the `BAND_TREE_DEPTH` preprocessor define in the fragment
                     * shader header is rewritten accordingly. This causes the program to be
                     * recompiled whenever the ramp structure changes.
                     * @param controller The filter controller whose ramp provides the current band tree depth.
                     * @param _drawingContext The current drawing context. Unused by this method.
                     */
                    updateShaderConfig(controller: Phaser.Filters.GradientMap, _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the ImageLight filter effect, which simulates
                 * image-based lighting on a Game Object using an environment map and a normal
                 * map. The environment map provides the source lighting information, while the
                 * normal map describes the surface orientation of the object, allowing the
                 * shader to calculate how light reflects across its surface. This produces a
                 * convincing 3D lighting effect within a 2D scene.
                 * 
                 * Use this node when a {@link Phaser.Filters.ImageLight} filter controller is
                 * active on a Game Object. It binds the environment and normal textures to the
                 * correct sampler slots and uploads the view matrix, model rotation, bulge, and
                 * color factor uniforms required by the fragment shader.
                 * 
                 * See {@link Phaser.Filters.ImageLight}.
                 */
                class FilterImageLight extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Binds the environment map and normal map WebGL textures to their
                     * respective texture slots. The environment map is assigned to slot 1 and
                     * the normal map to slot 2, matching the sampler uniforms set in
                     * {@link Phaser.Renderer.WebGL.RenderNodes.FilterImageLight#setupUniforms}.
                     * @param controller The filter controller providing the texture references.
                     * @param textures The texture slot array to populate.
                     * @param _drawingContext The current drawing context (unused).
                     */
                    setupTextures(controller: Phaser.Filters.ImageLight, textures: WebGLTexture[], _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Uploads the shader uniforms required by the ImageLight fragment shader.
                     * This includes the sampler indices for the environment and normal map
                     * textures, the view matrix used to orient the environment map in world
                     * space, the model rotation of the filtered object, the bulge factor that
                     * controls the spherical distortion of the environment reflection, and the
                     * color factor that blends the lighting contribution with the original
                     * object color.
                     * @param controller The filter controller providing uniform values.
                     * @param _drawingContext The current drawing context (unused).
                     */
                    setupUniforms(controller: Phaser.Filters.ImageLight, _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the Key filter effect.
                 * See {@link Phaser.Filters.Key}.
                 * 
                 * The Key filter removes or isolates pixels that match a specified color,
                 * similar to a chroma-key (green screen) effect. It compares each pixel's
                 * RGB values against the key color using vector distance, then makes matching
                 * pixels transparent (or, when in isolate mode, removes everything that does
                 * not match). A threshold controls how strictly pixels must match the key
                 * color, and an optional feather value softens the transition at the boundary.
                 */
                class FilterKey extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets up the shader uniforms for the Key filter based on the current
                     * state of its controller.
                     * 
                     * Sends the key color as a `vec4` uniform (`uColor`), and packs the
                     * isolate flag, threshold, and feather values into a single `vec4`
                     * uniform (`uIsolateThresholdFeather`) to minimise uniform slots.
                     * @param controller The Key filter controller providing the uniform values.
                     * @param _drawingContext The drawing context in use (unused by this filter).
                     */
                    setupUniforms(controller: Phaser.Filters.Key, _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that renders the Mask filter effect, used to selectively show
                 * or hide regions of a Game Object using a mask texture.
                 * 
                 * The mask is sourced from a {@link Phaser.Filters.Mask} controller, which can
                 * provide either a static GL texture or a dynamically rendered Game Object as
                 * the mask. When a mask Game Object is used, this node will re-render it into
                 * a texture each frame if `autoUpdate` is enabled, or when `needsUpdate` is
                 * flagged. The mask can optionally be inverted so that masked areas are
                 * revealed instead of hidden.
                 * 
                 * This node binds the source image to texture unit 0 and the mask texture to
                 * texture unit 1, then passes the `invert` flag to the fragment shader to
                 * control mask polarity.
                 * 
                 * See {@link Phaser.Filters.Mask}.
                 */
                class FilterMask extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Prepares the texture slots required by the mask filter shader.
                     * 
                     * Texture unit 0 is the source image (bound by the base class). This method
                     * assigns the mask GL texture to unit 1. If the controller has a mask Game
                     * Object and either `autoUpdate` or `needsUpdate` is set, the dynamic
                     * texture is re-rendered at the current drawing context dimensions before
                     * being bound.
                     * @param controller The filter controller providing the mask texture and update flags.
                     * @param textures The texture array to populate. The mask texture is written to index 1.
                     * @param drawingContext The current drawing context, used to determine the dimensions for dynamic texture updates.
                     */
                    setupTextures(controller: Phaser.Filters.Mask, textures: WebGLTexture[], drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Sets the shader uniforms required by the mask filter.
                     * 
                     * Binds the `uMaskSampler` uniform to texture unit 1 so the fragment shader
                     * samples from the mask texture, and passes the `invert` boolean flag to
                     * control whether the mask is applied normally or inverted.
                     * @param controller The filter controller providing the `invert` flag.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(controller: Phaser.Filters.Mask, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the NormalTools filter effect, which processes
                 * normal map textures for use in lighting calculations. It transforms normal
                 * vectors using a view matrix so they are correctly oriented relative to the
                 * camera, enabling accurate directional lighting on normal-mapped Game Objects.
                 * 
                 * Two optional features can be enabled via the controller: facing power, which
                 * raises the dot-product result to a given exponent to sharpen or soften the
                 * lighting falloff; and ratio output, which blends the normal contribution
                 * against a direction vector and radius to produce a ratio value used by
                 * downstream lighting passes.
                 * 
                 * This node is used internally by {@link Phaser.Filters.NormalTools} and
                 * should not need to be instantiated directly.
                 * See {@link Phaser.Filters.NormalTools}.
                 */
                class FilterNormalTools extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Updates the shader program configuration based on the current controller
                     * settings. Resets the fragment header addition to the base
                     * `VIEW_MATRIX` define, then conditionally appends the `FACING_POWER`
                     * and `OUTPUT_RATIO` defines — and adjusts the addition name accordingly —
                     * so that the correct shader variant is compiled and cached for the active
                     * combination of features.
                     * @param controller The filter controller providing the current configuration.
                     * @param drawingContext The current drawing context.
                     */
                    updateShaderConfig(controller: Phaser.Filters.NormalTools, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Sets the WebGL uniform values for the NormalTools shader based on the
                     * current controller settings. Always uploads the view matrix as
                     * `uViewMatrix`. If the controller's `facingPower` differs from the default
                     * value of `1`, the `uFacingPower` uniform is also uploaded. If
                     * `outputRatio` is enabled on the controller, the `uRatioVector` (a 3-component
                     * direction vector) and `uRatioRadius` uniforms are uploaded as well.
                     * @param controller The filter controller providing the uniform values.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(controller: Phaser.Filters.NormalTools, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the PanoramaBlur filter effect, which applies a
                 * radial blur that simulates the distortion seen at the edges of wide-angle
                 * or panoramic lenses. The blur is controlled by a radius and a power value,
                 * and uses configurable horizontal and vertical sample counts to balance
                 * quality against performance. Higher sample counts produce smoother results
                 * at the cost of GPU time.
                 * 
                 * This node manages a dynamic shader addition that injects the sample count
                 * as preprocessor defines (`SAMPLES_X` and `SAMPLES_Y`) into the fragment
                 * shader, so the correct variant is compiled and cached automatically.
                 * 
                 * See {@link Phaser.Filters.PanoramaBlur}.
                 */
                class FilterPanoramaBlur extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Updates the shader addition that controls the sample counts used by the
                     * panorama blur fragment shader. The horizontal and vertical sample counts
                     * are read from the controller and injected as `SAMPLES_X` and `SAMPLES_Y`
                     * preprocessor defines, causing the program manager to compile and cache
                     * the appropriate shader variant if it has not been used before.
                     * @param controller The filter controller providing the sample count values.
                     * @param drawingContext The current drawing context (unused by this method).
                     */
                    updateShaderConfig(controller: Phaser.Filters.PanoramaBlur, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Sets the WebGL shader uniforms required by the panorama blur fragment
                     * shader. This uploads the blur radius (`uRadius`) and the blur power
                     * (`uPower`) from the filter controller to the currently active program.
                     * @param controller The filter controller providing the radius and power values.
                     * @param _drawingContext The current drawing context (unused by this method).
                     */
                    setupUniforms(controller: Phaser.Filters.PanoramaBlur, _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that processes two independent filter chains — a bottom layer
                 * and a top layer — each applied to the same input, then composites their
                 * results together using a configurable blend mode. This allows you to combine
                 * two completely different filter effects on a single Game Object; for example,
                 * applying a glow to the bottom layer and a color correction to the top layer,
                 * then merging them with an add or multiply blend.
                 * 
                 * Each layer (bottom and top) runs its own ordered chain of filters in series,
                 * where the output of one filter feeds into the next. Once both chains have
                 * completed, the results are blended using the `FilterBlend` RenderNode
                 * according to the controller's blend settings.
                 * 
                 * If neither layer contains any active filters, the input is copied directly
                 * to the output with no modifications.
                 * 
                 * This node delegates rendering work to other RenderNodes during execution.
                 * See {@link Phaser.Filters.ParallelFilters} for the associated controller.
                 */
                class FilterParallelFilters extends Phaser.Renderer.WebGL.RenderNodes.BaseFilter {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Runs the parallel filter process. The input drawing context is passed
                     * through the bottom filter chain and the top filter chain independently,
                     * producing two separately filtered results. Those results are then blended
                     * together using the `FilterBlend` RenderNode with the blend mode and
                     * settings defined on the controller.
                     * 
                     * Padding is applied on the first filter in each chain only; subsequent
                     * filters in the same chain receive zero padding to avoid double-expanding
                     * the output bounds.
                     * 
                     * If no filters are active on either layer, the input is copied directly
                     * to the output unchanged.
                     * @param controller The controller that defines the bottom and top filter chains and their blend settings.
                     * @param inputDrawingContext The drawing context to use as the source image for both filter chains.
                     * @param outputDrawingContext The drawing context to render the final blended result into. May be `null`, in which case a new context is allocated.
                     * @param padding The padding to apply around the rendered area on the first filter pass.
                     * @returns The drawing context containing the final composited output.
                     */
                    run(controller: Phaser.Filters.ParallelFilters, inputDrawingContext: Phaser.Renderer.WebGL.DrawingContext, outputDrawingContext: Phaser.Renderer.WebGL.DrawingContext, padding: Phaser.Geom.Rectangle): Phaser.Renderer.WebGL.DrawingContext;

                }

                /**
                 * A RenderNode that renders the Pixelate filter effect. It applies a blocky,
                 * low-resolution pixelation to the Game Object by dividing the rendered surface
                 * into uniformly-sized pixel blocks whose size is controlled by the `amount`
                 * property on the filter controller. Larger values produce more pronounced
                 * pixelation. This node binds the shader uniforms required by the
                 * `FilterPixelate` fragment shader and delegates actual rendering to its
                 * {@link Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader} base class.
                 * See {@link Phaser.Filters.Pixelate}.
                 */
                class FilterPixelate extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the shader uniforms required by the Pixelate filter.
                     * 
                     * Passes the pixelation `amount` from the filter controller and the current
                     * render target dimensions as a two-element `resolution` uniform. The
                     * fragment shader uses these values to snap texture coordinates to a grid,
                     * producing the blocky pixelation effect.
                     * @param controller The filter controller that owns this effect, providing the `amount` property.
                     * @param drawingContext The current drawing context, used to obtain the render target width and height in pixels.
                     */
                    setupUniforms(controller: Phaser.Filters.Pixelate, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the Quantize filter effect, which reduces the number
                 * of distinct color levels in the output image to simulate a low bit-depth or
                 * posterized look. The effect can be applied in different color modes and
                 * supports optional dithering to reduce visible banding. Gamma correction and
                 * an offset value allow fine-tuning of how the quantization steps are
                 * distributed across the tonal range.
                 * See {@link Phaser.Filters.Quantize}.
                 */
                class FilterQuantize extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the shader uniforms for the Quantize filter from the given
                     * controller. This transfers the current steps, gamma, offset, mode, and
                     * dither values to the WebGL program before rendering.
                     * @param controller The filter controller providing the uniform values.
                     * @param _drawingContext The current drawing context (unused).
                     */
                    setupUniforms(controller: Phaser.Filters.Quantize, _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A RenderNode that implements the Sampler filter, which reads pixel data
                 * from a WebGL framebuffer and delivers it to a callback without applying
                 * any visual modifications.
                 * 
                 * Unlike other filter nodes, FilterSampler does not transform or composite
                 * its input. Instead it acts as a snapshot mechanism: it calls
                 * `renderer.snapshotFramebuffer` on the input drawing context's framebuffer
                 * and forwards the result to the controller's callback function. The area
                 * sampled is determined by the controller's `region` property. If `region`
                 * is a `Phaser.Geom.Rectangle`, that rectangular area is captured. If
                 * `region` is a point (an object with `x` and `y` but no `width`), a single
                 * pixel is read. If no `region` is set, the entire framebuffer is sampled.
                 * 
                 * This node is used internally by the Phaser filter pipeline when a game
                 * object or camera requests a framebuffer snapshot via the Sampler filter.
                 */
                class FilterSampler extends Phaser.Renderer.WebGL.RenderNodes.BaseFilter {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Samples the input framebuffer and delivers the result to the
                     * controller's callback, then returns the input drawing context unchanged.
                     * 
                     * The method reads pixel data from `inputDrawingContext.framebuffer` via
                     * `renderer.snapshotFramebuffer`. The sampled region is controlled by
                     * `controller.region`:
                     * 
                     * - If `controller.region` is a `Phaser.Geom.Rectangle`, the rectangular
                     *   area defined by its `x`, `y`, `width`, and `height` is captured.
                     * - If `controller.region` is a point (has `x` and `y` but no `width`),
                     *   a single pixel at that coordinate is read.
                     * - If `controller.region` is not set, the entire framebuffer is sampled.
                     * 
                     * The captured data is passed to `controller.callback`. The input drawing
                     * context is returned unmodified; this node does not write to
                     * `outputDrawingContext`.
                     * @param controller The Sampler filter controller, providing the `region` to sample and the `callback` to receive the result.
                     * @param inputDrawingContext The drawing context whose framebuffer will be sampled.
                     * @param outputDrawingContext The output drawing context. Not used by this node.
                     * @param padding Additional padding around the render area. Not used by this node.
                     * @returns The `inputDrawingContext`, returned unchanged.
                     */
                    run(controller: Phaser.Filters.Sampler, inputDrawingContext: Phaser.Renderer.WebGL.DrawingContext, outputDrawingContext?: Phaser.Renderer.WebGL.DrawingContext, padding?: Phaser.Geom.Rectangle): Phaser.Renderer.WebGL.DrawingContext;

                }

                /**
                 * This RenderNode renders the Shadow filter effect, producing a directional
                 * light-ray glow that emanates from a light source position toward the Game
                 * Object. It uploads all shader uniforms required by the Shadow fragment
                 * shader, including the light position (converted to WebGL UV space), decay,
                 * power, color, sample count, and intensity values sourced from the
                 * {@link Phaser.Filters.Shadow} controller.
                 */
                class FilterShadow extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the shader uniforms for the Shadow filter effect.
                     * 
                     * This method is called automatically before rendering. It reads values
                     * from the Shadow filter controller and uploads them to the WebGL program,
                     * including the light source position (with the Y axis inverted to match
                     * WebGL UV coordinates), decay, power (normalized by sample count), shadow
                     * color, sample count, and intensity.
                     * @param controller The Shadow filter controller providing the uniform values.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(controller: Phaser.Filters.Shadow, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the Threshold filter effect, which converts each
                 * pixel of a Game Object to either fully opaque or fully transparent based on
                 * its luminance value relative to a configurable threshold range. Pixels whose
                 * luminance falls below `edge1` are discarded, those above `edge2` are kept,
                 * and those in between are smoothly interpolated. The effect can optionally be
                 * inverted so that bright pixels are discarded instead of dark ones.
                 * See {@link Phaser.Filters.Threshold}.
                 */
                class FilterThreshold extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the WebGL shader uniforms required by the Threshold filter.
                     * 
                     * Passes the lower threshold edge (`edge1`), the upper threshold edge
                     * (`edge2`), and the invert flag to the fragment shader so it can apply
                     * the correct threshold calculation for the current frame.
                     * @param controller The filter controller providing the uniform values.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(controller: Phaser.Filters.Threshold, drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the Vignette filter effect, which darkens the edges
                 * of the Game Object toward a configurable color, drawing visual focus toward
                 * the center of the image. The effect is controlled by a radius (how far the
                 * vignette extends inward), a strength (how intense the darkening is), a
                 * position (the center point of the vignette, in normalized 0-1 coordinates),
                 * a color, and a blend mode that determines how the vignette is composited
                 * over the source image.
                 * 
                 * This node is used internally by the WebGL renderer when a
                 * {@link Phaser.Filters.Vignette} controller is active on a Game Object.
                 * See {@link Phaser.Filters.Vignette}.
                 */
                class FilterVignette extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Sets the WebGL shader uniforms required by the Vignette filter.
                     * 
                     * Passes the current vignette properties from the controller to the GPU,
                     * including the radius, strength, center position, color, and blend mode.
                     * This method is called automatically during rendering.
                     * @param controller The Vignette filter controller providing the effect properties.
                     * @param _drawingContext The current drawing context. Not used by this filter.
                     */
                    setupUniforms(controller: Phaser.Filters.Vignette, _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * This RenderNode renders the Wipe filter effect, which creates a directional
                 * transition that sweeps across the screen to reveal or hide a second texture.
                 * The wipe can travel along either axis and in either direction, with a
                 * configurable edge softness (wipe width). It is used by the
                 * {@link Phaser.Filters.Wipe} filter controller to produce scene transitions
                 * or in-game reveal effects.
                 * See {@link Phaser.Filters.Wipe}.
                 */
                class FilterWipe extends Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * Binds the wipe reveal texture to texture slot 1, making it available
                     * to the fragment shader as the secondary sampler that will be blended
                     * in as the wipe progresses.
                     * @param controller The filter controller providing the wipe texture.
                     * @param textures The texture array for this render node. Index 1 is set to the reveal texture.
                     * @param _drawingContext The current drawing context (unused).
                     */
                    setupTextures(controller: Phaser.Filters.Wipe, textures: WebGLTexture[], _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Uploads the wipe shader uniforms derived from the filter controller.
                     * Sets the secondary texture sampler unit, and passes a vec4 containing
                     * the current progress (0–1), the wipe edge softness width, the wipe
                     * direction (1 or -1), and the axis (0 for horizontal, 1 for vertical).
                     * Also uploads the reveal flag, which determines whether the wipe
                     * uncovers the secondary texture (reveal) or covers it (hide).
                     * @param controller The filter controller providing wipe parameters.
                     * @param _drawingContext The current drawing context (unused).
                     */
                    setupUniforms(controller: Phaser.Filters.Wipe, _drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * The SubmitterQuad RenderNode submits data for rendering a single Image-like GameObject.
                 * It uses a BatchHandler to render the image as part of a batch.
                 * 
                 * This node receives the drawing context, game object, and parent matrix.
                 * It also receives the texturer, tinter, and transformer nodes
                 * from the node that invoked it.
                 * This allows the behavior to be configured by setting the appropriate nodes
                 * on the GameObject for individual tweaks, or on the invoking Renderer node
                 * for global changes.
                 */
                class SubmitterQuad extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: Phaser.Types.Renderer.WebGL.RenderNodes.SubmitterQuadConfig);

                    /**
                     * The key of the RenderNode used to render data.
                     */
                    batchHandler: string;

                    /**
                     * The default configuration for this RenderNode.
                     */
                    defaultConfig: Phaser.Types.Renderer.WebGL.RenderNodes.SubmitterQuadConfig;

                    /**
                     * Processes the given GameObject and submits quad vertex data to the appropriate
                     * batch handler for rendering. This method invokes the texturer, transformer, and
                     * optional tinter nodes in sequence to compute texture coordinates, transformed
                     * vertex positions, and tint colors. If no tinter node is provided, Image-style
                     * tinting is read directly from the GameObject. It then calls `setRenderOptions`
                     * to resolve lighting and smooth pixel art settings before passing all assembled
                     * data to the batch handler.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param parentMatrix The parent matrix of the GameObject.
                     * @param element The specific element within the game object. This is used for objects that consist of multiple quads.
                     * @param texturerNode The texturer node used to texture the GameObject. You may pass a TexturerImage node or an object containing equivalent data without a `run` method.
                     * @param transformerNode The transformer node used to transform the GameObject. You may pass a transformer node or an object with a `quad` property.
                     * @param tinterNode The tinter node used to tint the GameObject. You may pass a tinter node or an object containing equivalent data without a `run` method. If omitted, Image-style tinting will be used.
                     * @param normalMap The normal map texture to use for lighting. If omitted, the normal map texture of the GameObject will be used, or the default normal map texture of the renderer.
                     * @param normalMapRotation The rotation of the normal map texture. If omitted, the rotation of the GameObject will be used.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.GameObject, parentMatrix: Phaser.GameObjects.Components.TransformMatrix, element: object | undefined, texturerNode: Phaser.Renderer.WebGL.RenderNodes.RenderNode, transformerNode: Phaser.Renderer.WebGL.RenderNodes.RenderNode | Object, tinterNode?: Phaser.Renderer.WebGL.RenderNodes.RenderNode | Omit<Phaser.Renderer.WebGL.RenderNodes.RenderNode, 'run'>, normalMap?: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, normalMapRotation?: number): void;

                    /**
                     * Resolves and stores render options for the current GameObject into `_renderOptions`
                     * before it is submitted to the batch handler. This includes determining the correct
                     * normal map texture and rotation for lighting (falling back to the game object's base
                     * texture data source, then the renderer's default normal texture), resolving self-shadow
                     * settings (falling back to the global game configuration if not set on the object), and
                     * determining the smooth pixel art setting from either the base texture or the global
                     * game configuration. If the GameObject has no lighting component, the lighting option
                     * is set to `null`.
                     * @param gameObject The GameObject being rendered.
                     * @param normalMap The normal map texture to use for lighting. If omitted, it will be resolved from the game object's base texture data source or the renderer's default normal texture.
                     * @param normalMapRotation The rotation of the normal map texture, in radians. If omitted or `NaN`, it will be resolved from the game object's rotation or its world transform matrix if it belongs to a container.
                     */
                    setRenderOptions(gameObject: Phaser.GameObjects.GameObject, normalMap?: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, normalMapRotation?: number): void;

                }

                /**
                 * This RenderNode handles rendering of a single SpriteGPULayer object.
                 * A new instance of the RenderNode should be created for each SpriteGPULayer object,
                 * as it stores the shader program and vertex buffer data for the object.
                 * 
                 * It is a Stand-Alone Render Node, meaning that it does not batch with other objects.
                 * It is best suited to rendering highly complex GPU-driven sprite layers.
                 */
                class SubmitterSpriteGPULayer extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this handler.
                     * @param gameObject The SpriteGPULayer object to render.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config: Phaser.Types.Renderer.WebGL.RenderNodes.SubmitterSpriteGPULayerConfig, gameObject: Phaser.GameObjects.SpriteGPULayer);

                    /**
                     * The completed configuration object for this RenderNode.
                     * This is defined by the default configuration and the user-defined configuration object.
                     */
                    config: object;

                    /**
                     * The SpriteGPULayer GameObject this RenderNode is rendering.
                     */
                    readonly gameObject: Phaser.GameObjects.SpriteGPULayer;

                    /**
                     * The instance buffer layout for this RenderNode.
                     */
                    readonly instanceBufferLayout: Phaser.Renderer.WebGL.Wrappers.WebGLVertexBufferLayoutWrapper;

                    /**
                     * The vertex buffer layout for this RenderNode.
                     * 
                     * This consists of 4 bytes, 0-3, forming corners of a quad instance.
                     */
                    readonly vertexBufferLayout: Phaser.Renderer.WebGL.Wrappers.WebGLVertexBufferLayoutWrapper;

                    /**
                     * The program manager used to create and manage shader programs.
                     * This contains shader variants.
                     */
                    programManager: Phaser.Renderer.WebGL.ProgramManager;

                    /**
                     * A matrix used for temporary calculations.
                     */
                    _calcMatrix: Phaser.GameObjects.Components.TransformMatrix;

                    /**
                     * Default configuration of this RenderNode.
                     */
                    readonly defaultConfig: object;

                    /**
                     * Fill out the configuration object with default values where needed.
                     * @param config The configuration object to complete.
                     */
                    _completeLayout(config: object): void;

                    /**
                     * Uploads all shader uniforms required for the current render pass.
                     * This includes camera projection and view matrices, render resolution,
                     * pixel rounding, scroll offsets, elapsed time, diffuse and frame data
                     * texture resolutions, gravity, texture sampler bindings, and lighting
                     * uniforms if lighting is enabled on the layer.
                     * @param drawingContext The current drawing context.
                     */
                    setupUniforms(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                    /**
                     * Updates the shader program options based on the current state of the
                     * SpriteGPULayer game object. Enables or disables lighting shader additions,
                     * sets the active light count define, configures smooth pixel art rendering,
                     * and applies any shader features reported by the game object, including
                     * self-shadowing support.
                     */
                    updateRenderOptions(): void;

                    /**
                     * Render a SpriteGPULayer object.
                     * @param drawingContext The current drawing context.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext): void;

                }

                /**
                 * A specialized RenderNode that extends SubmitterQuad to handle the submission
                 * of tile rendering data to the WebGL batch handler. It is used internally by
                 * Tilemap layers to render individual tiles. Unlike the base SubmitterQuad,
                 * SubmitterTile enables frame clamping (`clampFrame = true`) on its render
                 * options, which prevents texture bleeding between adjacent tiles that share a
                 * tileset texture atlas.
                 */
                class SubmitterTile extends Phaser.Renderer.WebGL.RenderNodes.SubmitterQuad {
                    /**
                     * 
                     * @param manager The WebGLRenderer that owns this Submitter.
                     * @param config The configuration object for this Submitter. This is a SubmitterQuad configuration object with the `name` defaulting to `SubmitterTile`.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.WebGLRenderer, config?: Phaser.Types.Renderer.WebGL.RenderNodes.SubmitterQuadConfig);

                    /**
                     * The default configuration for this RenderNode.
                     */
                    defaultConfig: Phaser.Types.Renderer.WebGL.RenderNodes.SubmitterQuadConfig;

                    /**
                     * Submits rendering data for a single tile to the WebGL batch handler.
                     * Optionally executes the texturer, transformer, and tinter nodes to resolve
                     * texture coordinates, transformed quad geometry, and per-corner tint colors.
                     * If no tinter node is provided, the tile is rendered without tinting using
                     * a full white (0xffffffff) color. The resolved data is then passed to the
                     * appropriate batch handler for GPU submission.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param parentMatrix The parent matrix of the GameObject.
                     * @param element The specific element within the game object. This is used for objects that consist of multiple quads.
                     * @param texturerNode The texturer node used to texture the GameObject. You may pass a TexturerTileSprite node or an object containing equivalent data without a `run` method.
                     * @param transformerNode The transformer node used to transform the GameObject. You may pass a transformer node or an object with a `quad` property.
                     * @param tinterNode The tinter node used to tint the GameObject. You may pass a tinter node or an object containing equivalent data without a `run` method. If omitted, no tinting will be used.
                     * @param normalMap The normal map texture to use for lighting. If omitted, the normal map texture of the GameObject will be used, or the default normal map texture of the renderer.
                     * @param normalMapRotation The rotation of the normal map texture. If omitted, the rotation of the GameObject will be used.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.GameObject, parentMatrix: Phaser.GameObjects.Components.TransformMatrix, element: object | undefined, texturerNode: Phaser.Renderer.WebGL.RenderNodes.RenderNode, transformerNode: Phaser.Renderer.WebGL.RenderNodes.TransformerTileSprite | Object, tinterNode?: Phaser.Renderer.WebGL.RenderNodes.RenderNode | Omit<Phaser.Renderer.WebGL.RenderNodes.RenderNode, 'run'>, normalMap?: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, normalMapRotation?: number): void;

                }

                /**
                 * The SubmitterTileSprite RenderNode submits data for rendering a single TileSprite GameObject.
                 * It uses a BatchHandler to render the TileSprite as part of a batch.
                 * 
                 * This node receives the drawing context, game object, and parent matrix.
                 * It also receives the texturer, tinter, and transformer nodes
                 * from the node that invoked it.
                 * This allows the behavior to be configured by setting the appropriate nodes
                 * on the GameObject for individual tweaks, or on the invoking Renderer node
                 * for global changes.
                 */
                class SubmitterTileSprite extends Phaser.Renderer.WebGL.RenderNodes.SubmitterQuad {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this Submitter. This is a SubmitterQuad configuration object with the `name` defaulting to `SubmitterTileSprite`.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: Phaser.Types.Renderer.WebGL.RenderNodes.SubmitterQuadConfig);

                    /**
                     * The default configuration for this RenderNode.
                     */
                    defaultConfig: Phaser.Types.Renderer.WebGL.RenderNodes.SubmitterQuadConfig;

                    /**
                     * Submits vertex, texture, and tint data for a single TileSprite GameObject
                     * to the appropriate batch handler for WebGL rendering. This method invokes
                     * the texturer, transformer, and tinter nodes in sequence to populate the
                     * required rendering data, then passes it to the batch handler along with
                     * the UV matrix quad for tile scrolling and wrapping, and any lighting
                     * options including the tile's rotation applied to the normal map.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param parentMatrix The parent matrix of the GameObject.
                     * @param element The specific element within the game object. This is used for objects that consist of multiple quads.
                     * @param texturerNode The texturer node used to texture the GameObject. You may pass a TexturerTileSprite node or an object containing equivalent data without a `run` method.
                     * @param transformerNode The transformer node used to transform the GameObject. You may pass a transformer node or an object with a `quad` property.
                     * @param tinterNode The tinter node used to tint the GameObject. You may pass a tinter node or an object containing equivalent data without a `run` method. If omitted, Image-style tinting will be used.
                     * @param normalMap The normal map texture to use for lighting. If omitted, the normal map texture of the GameObject will be used, or the default normal map texture of the renderer.
                     * @param normalMapRotation The rotation of the normal map texture. If omitted, the rotation of the GameObject will be used.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.GameObject, parentMatrix: Phaser.GameObjects.Components.TransformMatrix, element: object | undefined, texturerNode: Phaser.Renderer.WebGL.RenderNodes.RenderNode, transformerNode: Phaser.Renderer.WebGL.RenderNodes.TransformerTileSprite | Object, tinterNode?: Phaser.Renderer.WebGL.RenderNodes.RenderNode | Omit<Phaser.Renderer.WebGL.RenderNodes.RenderNode, 'run'>, normalMap?: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, normalMapRotation?: number): void;

                }

                /**
                 * The SubmitterTilemapGPULayer RenderNode handles GPU-accelerated rendering
                 * of TilemapGPULayer objects in the WebGL renderer.
                 * 
                 * Unlike batch-based submitters, this is a Stand Alone Render, meaning each
                 * layer is drawn in its own draw call. It manages its own shader program
                 * via a ProgramManager, which supports several optional shader features
                 * including smooth pixel art upscaling, normal-mapped lighting, animated
                 * tiles, self-shadowing, and bilinear border filtering. The appropriate
                 * shader variant is selected each frame based on the layer's configuration.
                 */
                class SubmitterTilemapGPULayer extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this handler.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig);

                    /**
                     * The completed configuration object for this RenderNode.
                     * This is defined by the default configuration and the user-defined configuration object.
                     */
                    config: object;

                    /**
                     * The index buffer defining vertex order.
                     */
                    indexBuffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;

                    /**
                     * The vertex buffer layout for this RenderNode.
                     * 
                     * This consists of 4 vertices (indexed 0-3), one per corner of the quad.
                     */
                    readonly vertexBufferLayout: Phaser.Renderer.WebGL.Wrappers.WebGLVertexBufferLayoutWrapper;

                    /**
                     * The program manager used to create and manage shader programs.
                     * This contains shader variants.
                     */
                    programManager: Phaser.Renderer.WebGL.ProgramManager;

                    /**
                     * Default configuration of this RenderNode.
                     */
                    readonly defaultConfig: Phaser.Types.Renderer.WebGL.RenderNodes.BatchHandlerConfig;

                    /**
                     * Fill out the configuration object with default values where needed.
                     * @param config The configuration object to complete.
                     */
                    _completeLayout(config: object): void;

                    /**
                     * Populates all shader uniforms required to render the given TilemapGPULayer.
                     * 
                     * This includes the viewport resolution and projection matrix, the tileset
                     * image texture, the layer data texture, the animation data texture, tile
                     * dimensions (width, height, margin, and spacing), the layer's alpha and
                     * elapsed time for animation, and any lighting uniforms when the layer has
                     * lighting enabled.
                     * @param drawingContext The current drawing context.
                     * @param tilemapLayer The TilemapGPULayer being rendered.
                     */
                    setupUniforms(drawingContext: Phaser.Renderer.WebGL.DrawingContext, tilemapLayer: Phaser.Tilemaps.TilemapGPULayer): void;

                    /**
                     * Evaluates the current state of the TilemapGPULayer and updates the
                     * shader program configuration accordingly. This is called before each
                     * render and may result in a different shader variant being selected.
                     * 
                     * Specifically, it configures: the animation length addition (based on the
                     * tileset's maximum animation frame count), lighting additions (enabled or
                     * disabled based on the layer's lighting setting, with the light count
                     * define updated when active), the self-shadow feature flag, the smooth
                     * pixel art addition, and the border filter feature flag (based on whether
                     * the tileset texture uses linear magnification filtering).
                     * @param gameObject The TilemapGPULayer being rendered.
                     */
                    updateRenderOptions(gameObject: Phaser.Tilemaps.TilemapGPULayer): void;

                    /**
                     * The main render entry point for a TilemapGPULayer. Transforms the layer
                     * quad using the camera view matrix and any parent transform, writes the
                     * four corner positions and texture coordinates into the vertex buffer,
                     * assembles the texture array (tileset image, layer data, optional
                     * animation data, and optional normal map for lighting), selects the
                     * correct shader variant via `updateRenderOptions`, populates all uniforms
                     * via `setupUniforms`, and issues a single draw call for the layer.
                     * @param drawingContext The current drawing context.
                     * @param tilemapLayer The TilemapGPULayer being rendered.
                     * @param parentMatrix The parent matrix describing the game object's context.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, tilemapLayer: Phaser.Tilemaps.TilemapGPULayer, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): void;

                }

                /**
                 * A RenderNode which handles texturing for a single Image-like GameObject,
                 * such as an Image or Sprite.
                 * 
                 * During the WebGL rendering pipeline, this node is called to extract and
                 * temporarily cache the texture data needed to render a GameObject: its frame
                 * reference, UV source, and display dimensions. It accounts for cropped
                 * GameObjects by switching to the crop's UV coordinates and adjusted
                 * dimensions, and scales all dimensions by the frame source's resolution so
                 * that the upstream batcher receives device-independent pixel values.
                 * 
                 * Because this node may be reused across multiple GameObjects in a single
                 * frame, callers must consume its stored values (via `frame`, `frameWidth`,
                 * `frameHeight`, and `uvSource`) before the next `run` call overwrites them.
                 */
                class TexturerImage extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * The frame data of the GameObject being rendered.
                     */
                    frame: Phaser.Textures.Frame;

                    /**
                     * The display width of the frame in resolution-adjusted pixels.
                     * This reflects the crop width when the GameObject is cropped, and is
                     * divided by the frame source's resolution to produce
                     * device-independent pixel values for the renderer.
                     */
                    frameWidth: number;

                    /**
                     * The display height of the frame in resolution-adjusted pixels.
                     * This reflects the crop height when the GameObject is cropped, and is
                     * divided by the frame source's resolution to produce
                     * device-independent pixel values for the renderer.
                     */
                    frameHeight: number;

                    /**
                     * The object where UV coordinates and frame coordinates are stored.
                     * This is either a Frame or a Crop object.
                     * 
                     * It should have the properties u0, v0, u1, v1, x, y.
                     */
                    uvSource: Phaser.Textures.Frame | Phaser.GameObjects.Components.Crop;

                    /**
                     * Populates this RenderNode with the texture data required to render the
                     * given Image-like GameObject.
                     * 
                     * This method resolves the correct UV source for the GameObject: if it is
                     * not cropped, the frame itself is used; if it is cropped, the crop object
                     * is used and its UVs are recalculated when the flip state has changed.
                     * Frame dimensions are set to the crop dimensions when cropped. In both
                     * cases, the resulting dimensions are divided by the frame source's
                     * resolution to produce device-independent pixel values.
                     * 
                     * The stored values (`frame`, `frameWidth`, `frameHeight`, `uvSource`)
                     * must be consumed before this node is run again, as they will be
                     * overwritten on the next call.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param element The specific element within the game object. This is used for objects that consist of multiple quads. It is unused here.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.Image, element?: object): void;

                }

                /**
                 * A RenderNode which handles texturing for a single TileSprite GameObject.
                 * 
                 * Unlike a standard sprite texturer, this node computes a UV transformation
                 * matrix that accounts for the TileSprite's tile position, tile scale, and
                 * tile rotation, allowing the texture to scroll, scale, and rotate
                 * independently of the GameObject's own transform. It stores the resulting
                 * frame data and UV matrix so they can be consumed by a subsequent render
                 * node before this node is reused.
                 */
                class TexturerTileSprite extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager);

                    /**
                     * The frame data of the GameObject being rendered.
                     */
                    frame: Phaser.Textures.Frame;

                    /**
                     * The matrix used internally to compute UV coordinates.
                     */
                    uvMatrix: Phaser.GameObjects.Components.TransformMatrix;

                    /**
                     * Populates this RenderNode with texture data for the given TileSprite
                     * GameObject. Stores the frame and computes the UV transformation matrix
                     * by applying the tile position, tile scale, and tile rotation in TSR order,
                     * then mapping the result to the GameObject's display area. If the
                     * GameObject is cropped, the crop UVs are updated first to account for any
                     * flip state change. The stored values must be consumed before this node
                     * is reused.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param element The specific element within the game object. This is used for objects that consist of multiple quads. It is unused here.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.Image, element?: object): void;

                }

                /**
                 * A RenderNode that computes and stores the screen-space quad vertex positions
                 * for a single Image-like GameObject each time it is rendered.
                 * 
                 * During its `run` call, this node combines the camera view matrix (adjusted
                 * for the game object's scroll factors), any parent container matrix, and the
                 * game object's own position, rotation, and scale into a single final transform
                 * matrix. It then projects the four corners of the game object's frame through
                 * that matrix and writes the resulting eight coordinate values (four x/y pairs)
                 * into the `quad` Float32Array, ready for consumption by the subsequent
                 * submitter node.
                 * 
                 * Horizontal and vertical flipping are handled here, with the local origin
                 * offset adjusted automatically when the frame does not use a custom pivot.
                 * Vertex rounding is also applied when required by the game object or camera
                 * settings, snapping all quad corners to integer pixel coordinates to avoid
                 * sub-pixel rendering artefacts.
                 */
                class TransformerImage extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: object);

                    /**
                     * A flat array of 8 floats storing the screen-space positions of the four
                     * corners of the rendered quad, written during each `run` call. Values are
                     * ordered as [x0, y0, x1, y1, x2, y2, x3, y3], representing the top-left,
                     * top-right, bottom-left, and bottom-right corners respectively.
                     */
                    quad: Float32Array;

                    /**
                     * Computes the final screen-space quad vertex positions for the given
                     * Image-like GameObject and stores them in `this.quad`.
                     * 
                     * The method builds the complete transform by combining the camera view
                     * matrix (modified by the game object's scroll factors), an optional parent
                     * container matrix, and the game object's own position, rotation, and scale.
                     * Horizontal and vertical flips are factored in by negating the relevant
                     * scale axis and, when the frame does not use a custom pivot, by adjusting
                     * the local origin offset so the image flips around its display origin.
                     * The resulting four corner positions are then projected through the matrix
                     * via `setQuad` and written into `this.quad`. If vertex rounding is required,
                     * all eight values are snapped to the nearest integer before the node exits.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param texturerNode The texturer node used to texture the GameObject. This contains relevant data on the dimensions of the object.
                     * @param parentMatrix This transform matrix is defined if the game object is nested.
                     * @param element The specific element within the game object. This is used for objects that consist of multiple quads. It is unused here.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.GameObject, texturerNode: Phaser.Renderer.WebGL.RenderNodes.RenderNode, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, element?: object): void;

                }

                /**
                 * A RenderNode which computes and stores the world-space quad vertices for a
                 * single Stamp-like GameObject, such as a Stamp or similar object that renders
                 * directly into world space without being affected by the camera transform.
                 * 
                 * This is a modified version of the `TransformerImage` RenderNode. Unlike
                 * `TransformerImage`, this node skips the camera matrix multiplication entirely,
                 * meaning the resulting quad coordinates are in world space rather than
                 * camera-projected screen space. This makes it suitable for objects that manage
                 * their own world-to-screen positioning, such as the Stamp Game Object.
                 * 
                 * During the `run` call, the node applies the GameObject's position, rotation,
                 * scale, flip, and display origin to compute the final four corner vertices of
                 * the rendered quad, storing them in the `quad` Float32Array. Vertex rounding
                 * is also applied when appropriate to prevent sub-pixel rendering artefacts.
                 */
                class TransformerStamp extends Phaser.Renderer.WebGL.RenderNodes.RenderNode {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: object);

                    /**
                     * A Float32Array containing the eight vertex coordinates (x, y pairs for
                     * each of the four corners) of the transformed quad, written during `run`
                     * and consumed by subsequent renderer nodes to draw the GameObject.
                     */
                    quad: Float32Array;

                    /**
                     * Computes the world-space quad vertices for the given Stamp-like GameObject
                     * and stores them in the `quad` Float32Array for use by subsequent render
                     * nodes. The camera matrix is intentionally excluded from this calculation.
                     * 
                     * The method resolves the frame offset and display origin into local-space
                     * corner coordinates, applies horizontal and vertical flipping (adjusting
                     * the offset when no custom pivot is set), then builds the sprite transform
                     * matrix from the GameObject's position, rotation, and scale. The four
                     * corner vertices are projected through that matrix via `setQuad` and,
                     * when vertex rounding is required, each coordinate is rounded to the
                     * nearest integer to avoid sub-pixel rendering artefacts.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param texturerNode The texturer node used to texture the GameObject. This contains relevant data on the dimensions of the object.
                     * @param parentMatrix This transform matrix is defined if the game object is nested. It is unused here.
                     * @param element The specific element within the game object. This is used for objects that consist of multiple quads. It is unused here.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.GameObject, texturerNode: Phaser.Renderer.WebGL.RenderNodes.RenderNode, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, element?: object): void;

                }

                /**
                 * A RenderNode which handles transformation data for a single Tile within a TilemapLayer.
                 * 
                 * This node extends `TransformerImage` with tile-specific logic, including support
                 * for tileset offsets, per-tile flip flags, and per-tile rotation. It is used by
                 * the TilemapLayer rendering pipeline to position and orient each individual tile
                 * in world space before it is submitted to the batch renderer.
                 * 
                 * Unlike `TransformerImage`, which operates on a standalone Game Object, this node
                 * reads positional and flip data from a tile element descriptor (`element`) rather
                 * than directly from the Game Object, allowing it to handle the many tiles that
                 * make up a single TilemapLayer in a single render pass.
                 */
                class TransformerTile extends Phaser.Renderer.WebGL.RenderNodes.TransformerImage {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: object);

                    /**
                     * Computes and stores the world-space transform quad for a single tile element, ready for submission to the batch renderer.
                     * 
                     * This method builds the final transformation by combining the camera view matrix (with scroll
                     * factor applied), an optional parent matrix for nested Game Objects, and a per-tile sprite
                     * matrix derived from the tile's pixel position, rotation, and the TilemapLayer's scale. Tileset
                     * tile offsets are factored into the world position, and horizontal or vertical flips are applied
                     * by negating the quad dimensions. If vertex rounding is enabled on the camera, the resulting
                     * quad coordinates are rounded to the nearest integer to avoid sub-pixel rendering artefacts.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param texturerNode The texturer node used to texture the GameObject. This contains relevant data on the dimensions of the object.
                     * @param parentMatrix This transform matrix is defined if the game object is nested.
                     * @param element The tile element descriptor for the tile being rendered. Contains the tile's pixel position, rotation, flip flags, and GID index used to look up the tileset.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.GameObject, texturerNode: Phaser.Renderer.WebGL.RenderNodes.RenderNode, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, element?: object): void;

                }

                /**
                 * A RenderNode that computes and stores the world-space transformation data
                 * required to render a TileSprite GameObject.
                 * 
                 * This class extends `TransformerImage` with one key difference: whereas
                 * `TransformerImage` derives the quad dimensions from the texture frame,
                 * `TransformerTileSprite` reads them directly from the GameObject's `width`
                 * and `height` properties. This is necessary because a TileSprite can have
                 * an arbitrary size that is independent of its underlying tile texture.
                 * 
                 * During its `run` call, the node builds a combined camera-and-sprite
                 * transform matrix (accounting for scroll factors, an optional parent matrix,
                 * rotation, scale, and flip), projects the GameObject's bounding quad into
                 * screen space, and optionally rounds the resulting vertices for crisp
                 * pixel-aligned rendering. The resulting quad coordinates are stored on
                 * `this.quad` for use by downstream render nodes (e.g. texturer and batcher
                 * nodes) in the same render pass.
                 */
                class TransformerTileSprite extends Phaser.Renderer.WebGL.RenderNodes.TransformerImage {
                    /**
                     * 
                     * @param manager The manager that owns this RenderNode.
                     * @param config The configuration object for this RenderNode.
                     */
                    constructor(manager: Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager, config?: object);

                    /**
                     * Computes the screen-space quad for a TileSprite GameObject and stores
                     * it in `this.quad` for use by downstream render nodes.
                     * 
                     * The method reads the GameObject's own `width` and `height` (rather than
                     * frame dimensions), applies the display origin offset, handles horizontal
                     * and vertical flipping, then builds a combined transform matrix from the
                     * camera view, the optional parent matrix, and the sprite's own position,
                     * rotation, and scale. The resulting four corner coordinates are written
                     * into `this.quad`, and are pixel-rounded if vertex rounding is required
                     * for this GameObject and camera combination.
                     * @param drawingContext The current drawing context.
                     * @param gameObject The GameObject being rendered.
                     * @param texturerNode The texturer node used to texture the GameObject. This contains relevant data on the dimensions of the object. It is unused here.
                     * @param parentMatrix This transform matrix is defined if the game object is nested.
                     * @param element The specific element within the game object. This is used for objects that consist of multiple quads. It is unused here.
                     */
                    run(drawingContext: Phaser.Renderer.WebGL.DrawingContext, gameObject: Phaser.GameObjects.GameObject, texturerNode?: Phaser.Renderer.WebGL.RenderNodes.RenderNode, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, element?: object): void;

                }

            }

            namespace ShaderAdditionMakers {
                /**
                 * Returns a ShaderAdditionConfig for defining the maximum number of
                 * animation frames. This is used by TilemapGPULayer.
                 * @param maxAnims The maximum number of animation frames to support. This value is injected into the shader as the `MAX_ANIM_FRAMES` preprocessor constant.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeAnimLength(maxAnims: number, disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Creates and returns a `ShaderAdditionConfig` that injects normal-map
                 * lighting into a WebGL shader pipeline. When added to a renderer, it
                 * includes the `ApplyLighting` GLSL header in the fragment shader and
                 * runs `applyLighting(fragColor, normal)` during the fragment process
                 * stage, blending the lighting result into the output color.
                 * 
                 * The `normal` variable must be available in the fragment shader.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeApplyLighting(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Return a ShaderAdditionConfig for applying a tint to a texture.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeApplyTint(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Return a ShaderAdditionConfig for bounded texture sampling.
                 * A bounded sampler will return a transparent pixel
                 * if the texture coordinates are outside the texture bounds.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeBoundedSampler(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Return a ShaderAdditionConfig for defining the lights and core lighting
                 * algorithm in the fragment shader.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeDefineLights(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Returns a ShaderAdditionConfig for defining the texture count
                 * in a multi-texture shader. This is used by other additions
                 * to process the correct number of textures.
                 * @param maxTextures The maximum number of textures the shader supports. This value is used to set the `TEXTURE_COUNT` preprocessor define in the fragment shader.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeDefineTexCount(maxTextures: number, disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Return a ShaderAdditionConfig for defining a flat normal.
                 * This is used to light objects without a normal map.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeFlatNormal(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Return a ShaderAdditionConfig that injects the `getNormalFromMap` function
                 * into the fragment shader header and samples the normal map at the current
                 * texture coordinate during fragment processing. The resulting normal vector
                 * is used by the lighting pipeline to apply per-pixel lighting to a texture.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeGetNormalFromMap(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Return a ShaderAdditionConfig for getting the texture coordinates
                 * from the vertex shader via the `outTexCoord` variable.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeGetTexCoordOut(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Creates and returns a ShaderAdditionConfig that injects a GLSL fragment
                 * shader header providing a helper function for looking up a texture's
                 * resolution from a uniform array of resolutions, as used in multi-texture
                 * rendering where each bound texture may have a different size.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeGetTexRes(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Creates a ShaderAdditionConfig for multi-texture sampling in a WebGL shader.
                 * The returned config injects a `getTexture` GLSL function into the fragment
                 * shader header, built as an if...else chain that selects from up to
                 * `maxTextures` texture units based on the texture ID. It also injects a
                 * single-line process that samples the current fragment color via that function.
                 * @param maxTextures The number of texture units to support. Determines how many branches are generated in the texture-selection if...else chain. Default 1.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeGetTexture(maxTextures?: number, disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Returns a ShaderAdditionConfig that declares `inFrame` as a vertex attribute and passes it to the fragment shader via the `outFrame` varying.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeOutFrame(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Returns a ShaderAdditionConfig for creating an `outInverseRotationMatrix`
                 * varying in the vertex shader. This matrix is used during lighting calculations
                 * to correctly transform normal vectors into world space, ensuring that
                 * light direction is applied relative to the game object's orientation.
                 * 
                 * The `rotation` variable must be available in the vertex renderer.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeOutInverseRotation(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Creates and returns a `ShaderAdditionConfig` that reads the rotation value
                 * from the `inTexDatum` vertex attribute and exposes it as a `float rotation`
                 * variable in the vertex shader's processing stage. This addition is tagged
                 * for use with lighting shaders, enabling directional and normal-mapped
                 * lighting calculations to account for the rotation of the rendered geometry.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeRotationDatum(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Returns a `ShaderAdditionConfig` that adds normal map sampling to a
                 * TilemapGPULayer shader. The addition samples the normal map texture via
                 * `uNormSampler`, decodes the stored RGB values from the [0, 1] range back
                 * into a normalized direction vector in the [-1, 1] range, and exposes the
                 * result through a `Samples` object so that other shader additions (such as
                 * lighting calculations) can consume it. The addition is tagged `LIGHTING`,
                 * meaning it will only be active when a lighting pass is in use.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 */
                function MakeSampleNormal(disable?: boolean): void;

                /**
                 * Creates and returns a ShaderAdditionConfig that enables smooth pixel art rendering.
                 * 
                 * When applied to a shader, this addition replaces standard texture coordinate
                 * interpolation with a blocky sampling method that preserves crisp pixel edges
                 * while applying sub-pixel anti-aliasing at texel boundaries. The result is that
                 * pixel art assets scaled up or rendered at non-integer scales retain sharp,
                 * clean edges rather than the blurriness introduced by bilinear filtering.
                 * 
                 * Internally this uses the `GL_OES_standard_derivatives` WebGL extension to
                 * compute per-fragment derivative information, which drives the anti-aliased
                 * edge blending via the `getBlockyTexCoord` GLSL helper.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeSmoothPixelArt(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Returns a ShaderAdditionConfig for clamping coordinates inside a frame.
                 * This prevents bleeding across the edges of the frame.
                 * However, it creates a hard edge at the frame boundary.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeTexCoordFrameClamp(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

                /**
                 * Returns a ShaderAdditionConfig for wrapping coordinates inside a frame.
                 * This makes the texture repeat within the bounds of the frame -
                 * it's what makes a TileSprite work.
                 * @param disable Whether to disable the shader addition on creation. Default false.
                 * @returns The shader addition configuration.
                 */
                function MakeTexCoordFrameWrap(disable?: boolean): Phaser.Types.Renderer.WebGL.ShaderAdditionConfig;

            }

            namespace Shaders {
            }

            namespace Wrappers {
                /**
                 * Wrapper for a WebGL buffer, containing all the information that was used
                 * to create it. This can be a VertexBuffer or IndexBuffer.
                 * 
                 * A WebGLBuffer should never be exposed outside the WebGLRenderer, so the
                 * WebGLRenderer can handle context loss and other events without other
                 * systems having to be aware of it. Always use WebGLBufferWrapper instead.
                 */
                class WebGLBufferWrapper {
                    /**
                     * 
                     * @param renderer The WebGLRenderer instance that owns this wrapper.
                     * @param dataBuffer An ArrayBuffer of data to store. The buffer will be permanently associated with this data.
                     * @param bufferType The type of the buffer being created.
                     * @param bufferUsage The usage of the buffer being created. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer, dataBuffer: ArrayBuffer, bufferType: GLenum, bufferUsage: GLenum);

                    /**
                     * The WebGLRenderer instance that owns this wrapper.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * The WebGLBuffer being wrapped by this class.
                     * 
                     * This property could change at any time.
                     * Therefore, you should never store a reference to this value.
                     * It should only be passed directly to the WebGL API for drawing.
                     */
                    webGLBuffer: WebGLBuffer | null;

                    /**
                     * The data associated with the buffer.
                     * 
                     * Note that this will be used to recreate the buffer if the WebGL context is lost.
                     */
                    dataBuffer: ArrayBuffer;

                    /**
                     * A Float32Array view of the dataBuffer.
                     * 
                     * This will be `null` if the byte length of the dataBuffer
                     * is not divisible by Float32Array.BYTES_PER_ELEMENT (4).
                     * Such a buffer is only suited for use with 16-bit indices.
                     */
                    viewF32: Float32Array | null;

                    /**
                     * A Uint8Array view of the dataBuffer.
                     */
                    viewU8: Uint8Array;

                    /**
                     * A Uint16Array view of the dataBuffer.
                     * 
                     * This will be `null` if the byte length of the dataBuffer
                     * is not divisible by Uint16Array.BYTES_PER_ELEMENT (2).
                     * Such a buffer is only suited for use with byte data.
                     */
                    viewU16: Uint16Array | null;

                    /**
                     * A Uint32Array view of the dataBuffer.
                     * 
                     * This will be `null` if the byte length of the dataBuffer
                     * is not divisible by Uint32Array.BYTES_PER_ELEMENT (4).
                     * Such a buffer is only suited for use with 16-bit indices.
                     */
                    viewU32: Uint32Array | null;

                    /**
                     * The type of the buffer.
                     */
                    bufferType: GLenum;

                    /**
                     * The usage of the buffer. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW.
                     */
                    bufferUsage: GLenum;

                    /**
                     * Creates a WebGLBuffer for this WebGLBufferWrapper.
                     * 
                     * This is called automatically by the constructor. It may also be
                     * called again if the WebGLBuffer needs re-creating.
                     */
                    createResource(): void;

                    /**
                     * Binds this WebGLBufferWrapper to the current WebGLRenderingContext.
                     * It uses the bufferType of this wrapper to determine which binding point to use.
                     * @param unbind Whether to unbind the buffer instead. Default false.
                     */
                    bind(unbind?: boolean): void;

                    /**
                     * Updates the data in this WebGLBufferWrapper.
                     * The dataBuffer must contain the new data to be uploaded to the GPU.
                     * The specified range of data is uploaded from the local dataBuffer to the WebGLBuffer on the GPU.
                     * @param bytes The number of bytes to update in the buffer. If not specified, the entire buffer will be updated.
                     * @param offset The offset into the buffer to start updating data at. Default 0.
                     */
                    update(bytes?: number, offset?: number): void;

                    /**
                     * Resizes the dataBuffer of this WebGLBufferWrapper.
                     * This will recreate `dataBuffer` and the views into it.
                     * All data will be lost.
                     * All views into `dataBuffer` will be destroyed and recreated.
                     * @param bytes The new size of the buffer in bytes.
                     */
                    resize(bytes: number): void;

                    /**
                     * Destroys this WebGLBufferWrapper, deleting the underlying WebGLBuffer from the GL context and releasing all references to the dataBuffer and its typed array views.
                     */
                    destroy(): void;

                }

                /**
                 * Wrapper for a WebGL frame buffer,
                 * containing all the information that was used to create it.
                 * 
                 * A WebGLFramebuffer should never be exposed outside the WebGLRenderer,
                 * so the WebGLRenderer can handle context loss and other events
                 * without other systems having to be aware of it.
                 * Always use WebGLFramebufferWrapper instead.
                 * 
                 * This also manages the attachments to the framebuffer,
                 * including renderbuffer life cycle.
                 */
                class WebGLFramebufferWrapper {
                    /**
                     * 
                     * @param renderer The renderer this WebGLFramebuffer belongs to.
                     * @param colorAttachments The color textures where the color pixels are written. If empty, the canvas will be used as the color attachment. Only the first color attachment is used in default WebGL1.
                     * @param addStencilBuffer Whether to add a stencil buffer to the framebuffer. If the canvas is used as the color attachment, this will be ignored. Default false.
                     * @param addDepthBuffer Whether to add a depth buffer to the framebuffer. If depth and stencil are both provided, they will be combined into a single depth-stencil buffer. If the canvas is used as the color attachment, this will be ignored. Default false.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer, colorAttachments: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper[] | undefined, addStencilBuffer?: boolean, addDepthBuffer?: boolean);

                    /**
                     * The WebGLFramebuffer being wrapped by this class.
                     * 
                     * This property could change at any time.
                     * Therefore, you should never store a reference to this value.
                     * It should only be passed directly to the WebGL API for drawing.
                     * 
                     * If the FrameBuffer is using the canvas as the color attachment,
                     * this property will be `null`.
                     */
                    webGLFramebuffer: WebGLFramebuffer | null;

                    /**
                     * The WebGLRenderer this WebGLFramebuffer belongs to.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * Whether to use the canvas as the color attachment.
                     * If this is true, a framebuffer will not be created.
                     * This is useful for the main framebuffer, which is created by the browser.
                     */
                    useCanvas: boolean;

                    /**
                     * The width of the framebuffer, in pixels. This is derived from the
                     * first color attachment and is used when allocating renderbuffer storage.
                     */
                    width: number;

                    /**
                     * The height of the framebuffer, in pixels. This is derived from the
                     * first color attachment and is used when allocating renderbuffer storage.
                     */
                    height: number;

                    /**
                     * Attachments to the framebuffer. These contain data such as
                     * the width, height, and renderbuffer or texture.
                     */
                    attachments: Attachment[];

                    /**
                     * The color texture where the color pixels are written.
                     * 
                     * This will be `null` if the canvas is used as the color attachment.
                     * It is the first color attachment on the framebuffer.
                     */
                    renderTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | null;

                    /**
                     * Creates a WebGLFramebuffer from the given parameters.
                     * 
                     * This is called automatically by the constructor. It may also be
                     * called again if the WebGLFramebuffer needs re-creating.
                     */
                    createResource(): void;

                    /**
                     * Resizes the attachments of this WebGLFramebufferWrapper.
                     * @param width The new width of the framebuffer.
                     * @param height The new height of the framebuffer.
                     */
                    resize(width: number, height: number): void;

                    /**
                     * Destroys this WebGLFramebufferWrapper.
                     */
                    destroy(): void;

                }

                /**
                 * Wrapper for the WebGL global state, including blend mode, texture bindings,
                 * scissor test, stencil test, depth test, and other GL context settings. It
                 * tracks the current state and applies changes efficiently to avoid redundant
                 * WebGL calls.
                 */
                class WebGLGlobalWrapper {
                    /**
                     * 
                     * @param renderer The WebGLRenderer to create the WebGLGlobalWrapper for.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer);

                    /**
                     * The WebGLRenderer this WebGLGlobalWrapper is associated with.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * The current WebGL global state parameters tracked by this wrapper.
                     */
                    state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters;

                    /**
                     * Sets the global WebGL state. Parameters are updated on the
                     * WebGLRenderingContext only if they are defined in the input `state`,
                     * and different from the current state.
                     * 
                     * When `force` is true, and `state` is defined, parameters on `state`
                     * are always set, regardless of the current state.
                     * 
                     * When `force` is true, and `state` is undefined, the current state is
                     * used to reset all the parameters.
                     * @param state The state to set. If undefined, the current state is used when `force` is `true`.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     * @param vaoLast If `true`, the VAO will be set last.
                     * Otherwise, it will be set first. This is useful when performing state
                     * changes that will affect a VAO, such as `bindings.elementArrayBuffer`. Default false.
                     */
                    update(state?: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean, vaoLast?: boolean): void;

                    /**
                     * Updates the bindings state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBindings(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the active texture unit state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBindingsActiveTexture(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the array buffer (ARRAY_BUFFER) binding state. This binds the
                     * vertex buffer object used to supply vertex attribute data to the GPU.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBindingsArrayBuffer(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the index array buffer state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBindingsElementArrayBuffer(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the framebuffer state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBindingsFramebuffer(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the currently bound WebGL shader program by calling `gl.useProgram`.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBindingsProgram(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the renderbuffer state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBindingsRenderbuffer(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the blend state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBlend(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the blend color.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBlendColor(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the blend enabled state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBlendEnabled(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the blend equation state.
                     * 
                     * Equations are always treated as separate.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBlendEquation(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the blend function state.
                     * 
                     * Functions are always treated as separate.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateBlendFunc(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the RGBA color value used to fill the color buffer when
                     * `gl.clear` is called with the color buffer bit.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateColorClearValue(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the color write mask, which controls which RGBA color components
                     * are written to the color buffer during rendering.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateColorWritemask(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the cull face state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateCullFace(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the depth test state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateDepthTest(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the scissor state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateScissor(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the scissor enabled state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateScissorEnabled(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the scissor box state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateScissorBox(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the stencil state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateStencil(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the value used to clear the stencil buffer when `gl.clear` is
                     * called with the stencil buffer bit.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateStencilClear(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the stencil enabled state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateStencilEnabled(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the stencil function state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateStencilFunc(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the stencil operation state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateStencilOp(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the texturing state, which takes effect when creating a texture.
                     * This includes `flipY` and `premultiplyAlpha`.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateTexturing(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the `UNPACK_FLIP_Y_WEBGL` pixel store parameter, which controls
                     * whether texture image data is flipped vertically when uploaded to the GPU.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateTexturingFlipY(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the `UNPACK_PREMULTIPLY_ALPHA_WEBGL` pixel store parameter,
                     * which controls whether the alpha channel is pre-multiplied into the RGB
                     * components when texture image data is uploaded to the GPU.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateTexturingPremultiplyAlpha(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the vertex array object state.
                     * 
                     * Note that the VAO is automatically affected by
                     * bindings of `elementArrayBuffer` and any attribute settings,
                     * as written in WebGL. When binding the VAO, ensure that other
                     * bindings come before or after, as you intend.
                     * When using `update`, the VAO is set first by default.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateVAO(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                    /**
                     * Updates the viewport state.
                     * @param state The state to set.
                     * @param force If `true`, the state will be set regardless of the current state. Default false.
                     */
                    updateViewport(state: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters, force?: boolean): void;

                }

                /**
                 * Wraps a WebGL shader program, which is the GPU-side program compiled from a vertex shader
                 * and a fragment shader. Together, these shaders define how geometry is transformed and
                 * how each pixel within that geometry is colored. Every pipeline in Phaser's WebGL renderer
                 * is backed by a WebGLProgramWrapper.
                 * 
                 * Beyond holding the compiled program, this wrapper manages the full lifecycle of the
                 * associated WebGL resources: it tracks vertex attribute locations and layout, stores
                 * uniform values, and queues uniform update requests that are applied lazily when the
                 * program is bound for drawing.
                 * 
                 * The raw WebGLProgram object should never be used or stored directly outside of the
                 * WebGLRenderer. By routing all access through this wrapper, the renderer can transparently
                 * handle WebGL context loss and restoration — recreating the underlying program and
                 * re-applying all state — without any other system needing to be aware of it.
                 * Always use WebGLProgramWrapper instead of holding a direct WebGLProgram reference.
                 */
                class WebGLProgramWrapper {
                    /**
                     * 
                     * @param renderer The WebGLRenderer instance that owns this wrapper.
                     * @param vertexSource The vertex shader source code as a string.
                     * @param fragmentSource The fragment shader source code as a string.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer, vertexSource: string, fragmentSource: string);

                    /**
                     * The WebGLRenderer instance that owns this wrapper.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * The WebGLProgram being wrapped by this class.
                     * 
                     * This property could change at any time.
                     * Therefore, you should never store a reference to this value.
                     * It should only be passed directly to the WebGL API for drawing.
                     */
                    webGLProgram: WebGLProgram | null;

                    /**
                     * Whether this program is currently being compiled.
                     * This will always be false, unless parallel shader compilation
                     * is enabled via `config.render.skipUnreadyShaders`.
                     */
                    readonly compiling: boolean;

                    /**
                     * The time taken to compile this program, in milliseconds.
                     */
                    readonly compileTimeMs: number;

                    /**
                     * The WebGL state necessary to bind this program.
                     * 
                     * This is used internally to accelerate state changes.
                     */
                    glState: Phaser.Types.Renderer.WebGL.WebGLGlobalParameters;

                    /**
                     * The vertex shader source code as a string.
                     */
                    vertexSource: string;

                    /**
                     * The fragment shader source code as a string.
                     */
                    fragmentSource: string;

                    /**
                     * The attribute state of this program.
                     * 
                     * These represent the actual state in WebGL, and are only updated when
                     * the program is used to draw.
                     */
                    glAttributes: {location: GLint, name: string, size: number, type: GLenum}[];

                    /**
                     * Map of attribute names to their indexes in `glAttributes`.
                     */
                    glAttributeNames: Map<string, number>;

                    /**
                     * The buffer which this program is using for its attributes.
                     */
                    glAttributeBuffer: WebGLBuffer | null;

                    /**
                     * The uniform state of this program.
                     * 
                     * These represent the actual state in WebGL, and are only updated when
                     * the program is used to draw.
                     */
                    glUniforms: Map<string, Phaser.Types.Renderer.WebGL.WebGLUniform>;

                    /**
                     * Requests to update the uniform state.
                     * Set a request by name to a new value.
                     * These are only processed when the program is used to draw.
                     */
                    uniformRequests: Map<string, any>;

                    /**
                     * Creates a WebGLProgram from the given vertex and fragment shaders.
                     * 
                     * This is called automatically by the constructor. It may also be
                     * called again if the WebGLProgram needs re-creating.
                     */
                    createResource(): void;

                    /**
                     * Poll shader compilation status, and complete the program if it is ready.
                     * This is only called if `skipUnreadyShaders` is enabled
                     * and the KHR_parallel_shader_compile extension is available.
                     */
                    checkParallelCompile(): void;

                    /**
                     * Set a uniform value for this WebGLProgram.
                     * 
                     * This method doesn't set the WebGL value directly.
                     * Instead, it adds a request to the `uniformRequests` map.
                     * These requests are processed when the program is used to draw.
                     * @param name The name of the uniform.
                     * @param value The value to set.
                     */
                    setUniform(name: string, value: number | number[] | Int32Array | Float32Array): void;

                    /**
                     * Set this program as the active program in the WebGL context, then
                     * process all pending uniform update requests that were queued via
                     * `setUniform`. Each request is applied to the GPU and the queue is
                     * cleared, so only values that have actually changed are sent to WebGL.
                     */
                    bind(): void;

                    /**
                     * Destroys this WebGLProgramWrapper and releases all associated WebGL resources.
                     * 
                     * If the context is not lost, this deletes the vertex shader, fragment shader,
                     * and the linked WebGLProgram from the GPU, and disables all vertex attribute
                     * arrays used by this program. The uniform map, attribute map, and any pending
                     * uniform requests are also cleared. All internal references are then nulled so
                     * this wrapper can be safely garbage-collected.
                     */
                    destroy(): void;

                }

                /**
                 * Stores the metadata and WebGL function references needed to set shader
                 * uniform values for every GLSL data type. The core of the class is the
                 * `constants` map, which is keyed by WebGL type constant (e.g. `gl.FLOAT`,
                 * `gl.FLOAT_VEC2`, `gl.FLOAT_MAT4`) and provides the corresponding uniform
                 * setter function, element count, byte size, and matrix flag for each type.
                 * 
                 * Because the WebGL uniform setter functions (`gl.uniform1f`, `gl.uniform2i`,
                 * etc.) are bound to the rendering context at construction time, this class
                 * exists primarily to capture those function references once and make them
                 * available throughout the lifetime of the renderer. It is created by the
                 * `WebGLRenderer` and used internally when uploading uniform data to GPU
                 * shader programs.
                 */
                class WebGLShaderSetterWrapper {
                    /**
                     * 
                     * @param renderer The WebGLRenderer instance that owns this WebGLShaderSetterWrapper.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer);

                    /**
                     * A lookup table keyed by WebGL type constant (hex value) that maps each
                     * GLSL data type to its uniform setter functions, component count, byte
                     * size per component, and a flag indicating whether the type is a matrix.
                     * Used when uploading uniform values to a shader program so the correct
                     * WebGL call is chosen automatically for each uniform's declared type.
                     */
                    readonly constants: Phaser.Types.Renderer.WebGL.Wrappers.ShaderSetterConstants;

                }

                /**
                 * A wrapper for the WebGLRenderingContext's texture units.
                 * It tracks which textures are bound to which units, and provides
                 * binding utilities.
                 */
                class WebGLTextureUnitsWrapper {
                    /**
                     * 
                     * @param renderer The WebGLRenderer instance that owns this wrapper.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer);

                    /**
                     * The WebGLRenderer instance that owns this wrapper.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * The list of texture units available to the WebGLRenderingContext.
                     */
                    units: (Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper|null)[];

                    /**
                     * List of the indexes of available texture units.
                     * Used in setting uniforms.
                     */
                    unitIndices: number[];

                    /**
                     * Initializes the texture units to `null`. The active texture unit
                     * will be 0 after this runs.
                     * 
                     * This populates every texture unit with a 1x1 texture.
                     * This stops WebGL errors on MacOS.
                     * These textures are not wrapped, and are not intended to be used,
                     * so the texture units are recorded as null.
                     */
                    init(): void;

                    /**
                     * Binds a texture to a texture unit.
                     * 
                     * This will change the active texture unit to the given unit,
                     * unless `forceActive` is false.
                     * 
                     * This should be the only way to bind a texture to a unit.
                     * @param texture The texture to bind, or null to unbind the unit.
                     * @param unit The texture unit to bind the texture to.
                     * @param force If true, it will bind the texture even if it is already bound. Default false.
                     * @param forceActive If true, it will change the active texture unit to the given unit even if it is already active. Otherwise, it will only change the active texture unit if it is not already active. Default true.
                     */
                    bind(texture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | null, unit: number, force?: boolean, forceActive?: boolean): void;

                    /**
                     * Set specific texture units to specific textures.
                     * 
                     * The active texture unit may change to accommodate the bindings.
                     * @param textures The textures to bind. Null values will be unbound. Undefined values will be skipped.
                     * @param force If true, it will bind all textures, even if they are already bound. Default false.
                     */
                    bindUnits(textures: (Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper|null|undefined)[], force?: boolean): void;

                    /**
                     * Unbinds a specific texture from all texture units it is currently bound to.
                     * 
                     * Iterates over all texture units and replaces any binding that matches
                     * the given texture with `null`. This is typically called when a texture
                     * is about to be destroyed, to ensure no unit holds a stale reference.
                     * @param texture The texture to unbind from all units.
                     */
                    unbindTexture(texture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper): void;

                    /**
                     * Unbinds all textures from all texture units.
                     * This will change the active texture unit to 0.
                     */
                    unbindAllUnits(): void;

                }

                /**
                 * Wrapper for a WebGL texture, containing all the information that was used
                 * to create it.
                 * 
                 * A WebGLTexture should never be exposed outside the WebGLRenderer,
                 * so the WebGLRenderer can handle context loss and other events
                 * without other systems having to be aware of it.
                 * Always use WebGLTextureWrapper instead.
                 */
                class WebGLTextureWrapper {
                    /**
                     * 
                     * @param renderer The WebGLRenderer instance that owns this wrapper.
                     * @param mipLevel Mip level of the texture.
                     * @param minFilter Filtering of the texture.
                     * @param magFilter Filtering of the texture.
                     * @param wrapT Wrapping mode of the texture.
                     * @param wrapS Wrapping mode of the texture.
                     * @param format Which format does the texture use.
                     * @param pixels The pixel data used to populate the texture. Can be a Canvas, Video, ImageData, Uint8Array, or compressed texture object.
                     * @param width Width of the texture in pixels.
                     * @param height Height of the texture in pixels.
                     * @param pma Does the texture have premultiplied alpha? Default true.
                     * @param forceSize If `true` it will use the width and height passed to this method, regardless of the pixels dimension. Default false.
                     * @param flipY Sets the `UNPACK_FLIP_Y_WEBGL` flag the WebGL Texture uses during upload. Default true.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer, mipLevel: number, minFilter: number, magFilter: number, wrapT: number, wrapS: number, format: number, pixels: object | undefined, width: number, height: number, pma?: boolean, forceSize?: boolean, flipY?: boolean);

                    /**
                     * The WebGLRenderer this WebGLTexture belongs to.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * The WebGLTexture that this wrapper is wrapping.
                     * 
                     * This property could change at any time.
                     * Therefore, you should never store a reference to this value.
                     * It should only be passed directly to the WebGL API for drawing.
                     */
                    webGLTexture: WebGLTexture | null;

                    /**
                     * Whether this is used as a RenderTexture.
                     */
                    isRenderTexture: boolean;

                    /**
                     * Mip level of the texture.
                     */
                    mipLevel: number;

                    /**
                     * The minification filter for the texture, as a WebGL filter constant
                     * (e.g. `gl.LINEAR` or `gl.NEAREST`). Applied when the texture is
                     * scaled down.
                     */
                    minFilter: number;

                    /**
                     * The magnification filter for the texture, as a WebGL filter constant
                     * (e.g. `gl.LINEAR` or `gl.NEAREST`). Applied when the texture is
                     * scaled up.
                     */
                    magFilter: number;

                    /**
                     * The wrapping mode for the T (vertical) axis of the texture,
                     * as a WebGL wrap constant (e.g. `gl.REPEAT` or `gl.CLAMP_TO_EDGE`).
                     */
                    wrapT: number;

                    /**
                     * The wrapping mode for the S (horizontal) axis of the texture,
                     * as a WebGL wrap constant (e.g. `gl.REPEAT` or `gl.CLAMP_TO_EDGE`).
                     */
                    wrapS: number;

                    /**
                     * The WebGL pixel format of the texture (e.g. `gl.RGBA` or `gl.RGB`).
                     */
                    format: number;

                    /**
                     * Pixel data. This is the source data used to create the WebGLTexture.
                     */
                    pixels: object | null;

                    /**
                     * Width of the texture in pixels.
                     */
                    width: number;

                    /**
                     * Height of the texture in pixels.
                     */
                    height: number;

                    /**
                     * Does the texture have premultiplied alpha?
                     */
                    pma: boolean;

                    /**
                     * Whether to use the width and height properties, regardless of pixel dimensions.
                     */
                    forceSize: boolean;

                    /**
                     * Sets the `UNPACK_FLIP_Y_WEBGL` flag the WebGL Texture uses during upload.
                     */
                    flipY: boolean;

                    /**
                     * The texture unit this texture will be bound to in the current
                     * rendering batch.
                     * 
                     * This should be set by the batcher. It is a quick way to tell whether
                     * this texture has been included in the batch. If it is -1, it has not.
                     */
                    batchUnit: number;

                    /**
                     * Whether the mipmaps should be regenerated.
                     * This is only relevant to dynamic textures and framebuffers with
                     * rapidly changing content.
                     * The process which changes the content should set this flag.
                     * When the texture is next bound, the WebGLTextureUnitsWrapper
                     * should trigger the `generateMipmap` method.
                     */
                    needsMipmapRegeneration: boolean;

                    /**
                     * Creates a WebGLTexture from the given parameters.
                     * 
                     * This is called automatically by the constructor. It may also be
                     * called again if the WebGLTexture needs re-creating.
                     */
                    createResource(): void;

                    /**
                     * Resizes the WebGLTexture to the new dimensions.
                     * This will destroy the contents of the texture.
                     * 
                     * Wrap mode will be updated: REPEAT if the new size is power-of-two,
                     * CLAMP_TO_EDGE if not.
                     * 
                     * Texture minification filter will be updated:
                     * - Uses mipmap settings from game config if:
                     *   - Size is power-of-two
                     *   - There is a mipmap setting
                     *   - This is not a render texture, OR mipmap regeneration is enabled
                     * - Uses regular texture filter otherwise.
                     * @param width The new width of the WebGLTexture.
                     * @param height The new height of the WebGLTexture.
                     */
                    resize(width: number, height: number): void;

                    /**
                     * Updates the WebGLTexture from an updated source.
                     * 
                     * This should only be used when the source is a Canvas or Video element.
                     * 
                     * Because textures usually change into something complex and unique,
                     * this method forces all properties to update without checking.
                     * @param source The source to update the WebGLTexture with.
                     * @param width The new width of the WebGLTexture.
                     * @param height The new height of the WebGLTexture.
                     * @param flipY Should the WebGLTexture set `UNPACK_FLIP_Y_WEBGL`?
                     * @param wrapS The new wrapping mode for the WebGLTexture.
                     * @param wrapT The new wrapping mode for the WebGLTexture.
                     * @param minFilter The new minification filter for the WebGLTexture.
                     * @param magFilter The new magnification filter for the WebGLTexture.
                     * @param format The new format for the WebGLTexture.
                     */
                    update(source: object | undefined, width: number, height: number, flipY: boolean, wrapS: number, wrapT: number, minFilter: number, magFilter: number, format: number): void;

                    /**
                     * Return whether the texture is set to use a mipmap minification filter.
                     */
                    isMipmap: any;

                    /**
                     * Generate mipmap levels for the texture.
                     * This method is called internally.
                     * 
                     * Mipmaps are only generated if this texture is mipmap-enabled
                     * and has a size which is a power of two.
                     * Otherwise this function returns without side effects.
                     */
                    generateMipmap: any;

                    /**
                     * The `__SPECTOR_Metadata` property of the `WebGLTexture`,
                     * used to add extra data to the debug SpectorJS integration.
                     */
                    spectorMetadata: object;

                    /**
                     * Deletes the WebGLTexture from the GPU, if it has not been already.
                     */
                    destroy(): void;

                }

                /**
                 * Wrapper for a WebGL Vertex Array Object (VAO).
                 * 
                 * A VAO stores the complete vertex attribute configuration for a draw call,
                 * including attribute pointer definitions, enabled attribute arrays, and the
                 * bound element array buffer. Binding a VAO before drawing restores all of
                 * this state in a single call, reducing the number of WebGL API calls needed
                 * per frame.
                 * 
                 * A raw WebGLVertexArrayObject should never be exposed outside the
                 * WebGLRenderer, so the WebGLRenderer can handle context loss and other
                 * events without other systems having to be aware of it.
                 * Always use WebGLVAOWrapper instead.
                 */
                class WebGLVAOWrapper {
                    /**
                     * 
                     * @param renderer The WebGLRenderer instance that owns this wrapper.
                     * @param program The shader program that this VAO is associated with.
                     * @param indexBuffer The index buffer used in this VAO, if any.
                     * @param attributeBufferLayouts The vertex buffers containing attribute data for this VAO, alongside the relevant attribute layout.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer, program: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper, indexBuffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper | undefined, attributeBufferLayouts: Phaser.Renderer.WebGL.Wrappers.WebGLVertexBufferLayoutWrapper[]);

                    /**
                     * The WebGLRenderer instance that owns this wrapper.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * The shader program that this VAO is associated with.
                     */
                    program: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper;

                    /**
                     * The WebGLVertexArrayObject being wrapped by this class.
                     * 
                     * This property could change at any time.
                     * Therefore, you should never store a reference to this value.
                     * It should only be passed directly to the WebGL API for drawing.
                     */
                    vertexArrayObject: WebGLVertexArrayObject | null;

                    /**
                     * The element array buffer used in this VAO, if any.
                     */
                    indexBuffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper | null;

                    /**
                     * The vertex buffers containing attribute data for this VAO,
                     * alongside the relevant attribute layout.
                     */
                    attributeBufferLayouts: Phaser.Renderer.WebGL.Wrappers.WebGLVertexBufferLayoutWrapper[];

                    /**
                     * The state object used to bind this VAO.
                     */
                    glState: object;

                    /**
                     * Creates a new WebGLVertexArrayObject and records the full vertex
                     * attribute configuration into it. This includes binding the optional
                     * index buffer, enabling each vertex attribute array, setting up the
                     * attribute pointers (including per-column pointers for matrix
                     * attributes), and applying instance divisors for instanced rendering.
                     * Once the VAO is fully configured it is unbound, along with any array
                     * and element-array buffers, to leave the WebGL state clean.
                     * 
                     * This method is called automatically by the constructor. It is also
                     * called by the WebGLRenderer when the WebGL context is restored after
                     * a context loss event.
                     */
                    createResource(): void;

                    /**
                     * Binds this WebGLVAOWrapper to the current WebGLRenderingContext.
                     */
                    bind(): void;

                    /**
                     * Destroys this WebGLVAOWrapper and removes all associated resources.
                     */
                    destroy(): void;

                }

                /**
                 * Wraps a WebGL vertex buffer together with its attribute layout description.
                 * This class manages the relationship between a `WebGLBufferWrapper` (the raw
                 * GPU buffer) and the attribute layout that describes how vertex data is
                 * arranged within it, including the stride, per-attribute byte counts, and
                 * byte offsets. It is used by Phaser's WebGL renderer to bind vertex data to
                 * shader attribute locations when drawing geometry. On construction, the
                 * layout is completed by computing stride, byte counts, and offsets from the
                 * provided attribute definitions, and any GL enum values specified as strings
                 * are resolved to their numeric equivalents.
                 */
                class WebGLVertexBufferLayoutWrapper {
                    /**
                     * 
                     * @param renderer The WebGLRenderer instance that owns this wrapper.
                     * @param program The program that this layout is associated with.
                     * @param layout The layout of the buffer. At construction, this should be incomplete. The stride and per-attribute location, bytes, and offset will be filled in during construction. This will mutate the object.
                     * @param buffer The buffer that this layout should use. If not provided, a new buffer will be created. If the buffer is too small, an exception is thrown.
                     */
                    constructor(renderer: Phaser.Renderer.WebGL.WebGLRenderer, program: Phaser.Renderer.WebGL.Wrappers.WebGLProgramWrapper, layout: Partial<Phaser.Types.Renderer.WebGL.WebGLAttributeBufferLayout>, buffer?: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper);

                    /**
                     * The WebGLRenderer instance that owns this wrapper.
                     */
                    renderer: Phaser.Renderer.WebGL.WebGLRenderer;

                    /**
                     * The completed attribute buffer layout, describing the stride,
                     * attributes, their types, sizes, byte counts, and byte offsets
                     * within the vertex buffer.
                     */
                    layout: Phaser.Types.Renderer.WebGL.WebGLAttributeBufferLayout;

                    /**
                     * The WebGLBufferWrapper holding the vertex data for this layout.
                     */
                    buffer: Phaser.Renderer.WebGL.Wrappers.WebGLBufferWrapper;

                    /**
                     * Complete the layout of the provided attribute buffer layout.
                     * This will fill in the stride, byte counts, and offsets.
                     * In addition, it will convert any GLenums specified as strings
                     * to their numeric values.
                     * This mutates the layout.
                     * 
                     * The order of attributes within the layout forms the order of the buffer.
                     * @param attributeBufferLayout The layout to complete.
                     */
                    completeLayout(attributeBufferLayout: Phaser.Types.Renderer.WebGL.WebGLAttributeBufferLayout): void;

                }

            }

        }

    }

    namespace Scale {
        /**
         * The Scale Manager handles the scaling, resizing and alignment of the game canvas.
         * 
         * The way scaling is handled is by setting the game canvas to a fixed size, which is defined in the
         * game configuration. You also define the parent container in the game config. If no parent is given,
         * it will default to using the document body. The Scale Manager will then look at the available space
         * within the _parent_ and scale the canvas accordingly. Scaling is handled by setting the canvas CSS
         * width and height properties, leaving the width and height of the canvas element itself untouched.
         * Scaling is therefore achieved by keeping the core canvas the same size and 'stretching'
         * it via its CSS properties. This gives the same result and speed as using the `transform-scale` CSS
         * property, without the need for browser prefix handling.
         * 
         * The calculations for the scale are heavily influenced by the bounding parent size, which is the computed
         * dimensions of the canvas's parent. The CSS rules of the parent element play an important role in the
         * operation of the Scale Manager. For example, if the parent has no defined width or height, then actions
         * like auto-centering will fail to achieve the required result. The Scale Manager works in tandem with the
         * CSS you set-up on the page hosting your game, rather than taking control of it.
         * 
         * #### Parent and Display canvas containment guidelines:
         * 
         * - Style the Parent element (of the game canvas) to control the Parent size and thus the games size and layout.
         * 
         * - The Parent element's CSS styles should _effectively_ apply maximum (and minimum) bounding behavior.
         * 
         * - The Parent element should _not_ apply a padding as this is not accounted for.
         *   If a padding is required apply it to the Parent's parent or apply a margin to the Parent.
         *   If you need to add a border, margin or any other CSS around your game container, then use a parent element and
         *   apply the CSS to this instead, otherwise you'll be constantly resizing the shape of the game container.
         * 
         * - The Display canvas layout CSS styles (i.e. margins, size) should not be altered / specified as
         *   they may be updated by the Scale Manager.
         * 
         * #### Scale Modes
         * 
         * The way the scaling is handled is determined by the `scaleMode` property. The default is `NONE`,
         * which prevents Phaser from scaling or touching the canvas, or its parent, at all. In this mode, you are
         * responsible for all scaling. The other scaling modes afford you automatic scaling.
         * 
         * If you wish to scale your game so that it always fits into the available space within the parent, you
         * should use the scale mode `FIT`. Look at the documentation for other scale modes to see what options are
         * available. Here is a basic config showing how to set this scale mode:
         * 
         * ```javascript
         * scale: {
         *     parent: 'yourgamediv',
         *     mode: Phaser.Scale.FIT,
         *     width: 800,
         *     height: 600
         * }
         * ```
         * 
         * Place the `scale` config object within your game config.
         * 
         * If you wish for the canvas to be resized directly, so that the canvas itself fills the available space
         * (i.e. it isn't scaled, it's resized) then use the `RESIZE` scale mode. This will give you a 1:1 mapping
         * of canvas pixels to game size. In this mode CSS isn't used to scale the canvas, it's literally adjusted
         * to fill all available space within the parent. You should be extremely careful about the size of the
         * canvas you're creating when doing this, as the larger the area, the more work the GPU has to do and it's
         * very easy to hit fill-rate limits quickly.
         * 
         * For complex, custom-scaling requirements, you should probably consider using the `RESIZE` scale mode,
         * with your own limitations in place re: canvas dimensions and managing the scaling with the game scenes
         * yourself. For the vast majority of games, however, the `FIT` mode is likely to be the most used.
         * 
         * Please appreciate that the Scale Manager cannot perform miracles. All it does is scale your game canvas
         * as best it can, based on what it can infer from its surrounding area. There are all kinds of environments
         * where it's up to you to guide and help the canvas position itself, especially when built into rendering
         * frameworks like React and Vue. If your page requires meta tags to prevent user scaling gestures, or such
         * like, then it's up to you to ensure they are present in the html.
         * 
         * #### Centering
         * 
         * You can also have the game canvas automatically centered. Again, this relies heavily on the parent being
         * properly configured and styled, as the centering offsets are based entirely on the available space
         * within the parent element. Centering is disabled by default, or can be applied horizontally, vertically,
         * or both. Here's an example:
         * 
         * ```javascript
         * scale: {
         *     parent: 'yourgamediv',
         *     autoCenter: Phaser.Scale.CENTER_BOTH,
         *     width: 800,
         *     height: 600
         * }
         * ```
         * 
         * #### Fullscreen API
         * 
         * If the browser supports it, you can send your game into fullscreen mode. In this mode, the game will fill
         * the entire display, removing all browser UI and anything else present on the screen. It will remain in this
         * mode until your game either disables it, or until the user tabs out or presses ESCape if on desktop. It's a
         * great way to achieve a desktop-game like experience from the browser, but it does require a modern browser
         * to handle it. Some mobile browsers also support this.
         */
        class ScaleManager extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param game A reference to the Phaser.Game instance.
             */
            constructor(game: Phaser.Game);

            /**
             * A reference to the Phaser.Game instance.
             */
            readonly game: Phaser.Game;

            /**
             * A reference to the HTML Canvas Element that Phaser uses to render the game.
             */
            canvas: HTMLCanvasElement;

            /**
             * The DOM bounds of the canvas element.
             */
            canvasBounds: Phaser.Geom.Rectangle;

            /**
             * The parent object of the Canvas. Often a div, or the browser window, or nothing in non-browser environments.
             * 
             * This is set in the Game Config as the `parent` property. If undefined (or just not present), it will default
             * to use the document body. If specifically set to `null` Phaser will ignore all parent operations.
             */
            parent: any | null;

            /**
             * Is the parent element the browser window?
             */
            parentIsWindow: boolean;

            /**
             * The Parent Size component.
             */
            parentSize: Phaser.Structs.Size;

            /**
             * The Game Size component.
             * 
             * The un-modified game size, as requested in the game config (the raw width / height),
             * as used for world bounds, cameras, etc
             */
            gameSize: Phaser.Structs.Size;

            /**
             * The Base Size component.
             * 
             * The modified game size, which is the auto-rounded gameSize, used to set the canvas width and height
             * (but not the CSS style)
             */
            baseSize: Phaser.Structs.Size;

            /**
             * The Display Size component.
             * 
             * The size used for the canvas style, factoring in the scale mode, parent and other values.
             */
            displaySize: Phaser.Structs.Size;

            /**
             * The game scale mode.
             */
            scaleMode: Phaser.Scale.ScaleModeType;

            /**
             * The game zoom factor.
             * 
             * This value allows you to multiply your games base size by the given zoom factor.
             * This is then used when calculating the display size, even in `NONE` situations.
             * If you don't want Phaser to touch the canvas style at all, this value should be 1.
             * 
             * Can also be set to `MAX_ZOOM` in which case the zoom value will be derived based
             * on the game size and available space within the parent.
             */
            zoom: number;

            /**
             * Internal flag set when the game zoom factor is modified.
             */
            readonly _resetZoom: boolean;

            /**
             * The scale factor between the baseSize and the canvasBounds.
             */
            displayScale: Phaser.Math.Vector2;

            /**
             * If set, the canvas sizes will be automatically passed through Math.floor.
             * This results in rounded pixel display values, which is important for performance on legacy
             * and low powered devices, but at the cost of not achieving a 'perfect' fit in some browser windows.
             */
            autoRound: boolean;

            /**
             * Automatically center the canvas within the parent? The different centering modes are:
             * 
             * 1. No centering.
             * 2. Center both horizontally and vertically.
             * 3. Center horizontally.
             * 4. Center vertically.
             * 
             * Please be aware that in order to center the game canvas, you must have specified a parent
             * that has a size set, or the canvas parent is the document.body.
             */
            autoCenter: Phaser.Scale.CenterType;

            /**
             * The current device orientation.
             * 
             * Orientation events are dispatched via the Device Orientation API, typically only on mobile browsers.
             */
            orientation: Phaser.Scale.OrientationType;

            /**
             * A reference to the Device.Fullscreen object.
             */
            fullscreen: Phaser.Device.Fullscreen;

            /**
             * The DOM Element which is sent into fullscreen mode.
             */
            fullscreenTarget: any | null;

            /**
             * The dirty state of the Scale Manager.
             * Set if there is a change between the parent size and the current size.
             */
            dirty: boolean;

            /**
             * How many milliseconds should elapse before checking if the browser size has changed?
             * 
             * Most modern browsers dispatch a 'resize' event, which the Scale Manager will listen for.
             * However, older browsers fail to do this, or do it consistently, so we fall back to a
             * more traditional 'size check' based on a time interval. You can control how often it is
             * checked here.
             */
            resizeInterval: number;

            /**
             * Called _before_ the canvas object is created and added to the DOM.
             */
            protected preBoot(): void;

            /**
             * The Boot handler is called by Phaser.Game when it first starts up.
             * The renderer is available by now and the canvas has been added to the DOM.
             */
            protected boot(): void;

            /**
             * Parses the game configuration to set-up the scale defaults.
             * @param config The Game configuration object.
             */
            protected parseConfig(config: Phaser.Types.Core.GameConfig): void;

            /**
             * Determines the parent element of the game canvas, if any, based on the game configuration.
             * @param config The Game configuration object.
             */
            getParent(config: Phaser.Types.Core.GameConfig): void;

            /**
             * Calculates the size of the parent bounds and updates the `parentSize`
             * properties, only if the canvas has a dom parent.undefined
             * @returns `true` if the parent bounds have changed size or position, otherwise `false`.
             */
            getParentBounds(): boolean;

            /**
             * Attempts to lock the orientation of the web browser using the Screen Orientation API.
             * 
             * This API is only available on modern mobile browsers.
             * See https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation for details.
             * @param orientation The orientation you'd like to lock the browser in. Should be an API string such as 'landscape', 'landscape-primary', 'portrait', etc.
             * @returns `true` if the orientation was successfully locked, otherwise `false`.
             */
            lockOrientation(orientation: string): boolean;

            /**
             * This method will set the size of the Parent Size component, which is used in scaling
             * and centering calculations. You only need to call this method if you have explicitly
             * disabled the use of a parent in your game config, but still wish to take advantage of
             * other Scale Manager features.
             * @param width The new width of the parent.
             * @param height The new height of the parent.
             * @returns The Scale Manager instance.
             */
            setParentSize(width: number, height: number): this;

            /**
             * This method will set a new size for your game.
             * 
             * It should only be used if you're looking to change the base size of your game and are using
             * one of the Scale Manager scaling modes, i.e. `FIT`. If you're using `NONE` and wish to
             * change the game and canvas size directly, then please use the `resize` method instead.
             * @param width The new width of the game.
             * @param height The new height of the game.
             * @returns The Scale Manager instance.
             */
            setGameSize(width: number, height: number): this;

            /**
             * Call this to modify the size of the Phaser canvas element directly.
             * You should only use this if you are using the `NONE` scale mode,
             * it will update all internal components completely.
             * 
             * If all you want to do is change the size of the parent, see the `setParentSize` method.
             * 
             * If all you want is to change the base size of the game, but still have the Scale Manager
             * manage all the scaling (i.e. you're **not** using `NONE`), then see the `setGameSize` method.
             * 
             * This method will set the `gameSize`, `baseSize` and `displaySize` components to the given
             * dimensions. It will then resize the canvas width and height to the values given, by
             * directly setting the properties. Finally, if you have set the Scale Manager zoom value
             * to anything other than 1 (the default), it will set the canvas CSS width and height to
             * be the given size multiplied by the zoom factor (the canvas pixel size remains untouched).
             * 
             * If you have enabled `autoCenter`, it is then passed to the `updateCenter` method and
             * the margins are set, allowing the canvas to be centered based on its parent element
             * alone. Finally, the `displayScale` is adjusted and the RESIZE event dispatched.
             * @param width The new width of the game.
             * @param height The new height of the game.
             * @returns The Scale Manager instance.
             */
            resize(width: number, height: number): this;

            /**
             * Sets the zoom value of the Scale Manager.
             * @param value The new zoom value of the game.
             * @returns The Scale Manager instance.
             */
            setZoom(value: number): this;

            /**
             * Sets the zoom to be the maximum possible based on the _current_ parent size.undefined
             * @returns The Scale Manager instance.
             */
            setMaxZoom(): this;

            /**
             * By setting a Snap value, when the browser size is modified, its dimensions will automatically
             * be snapped to the nearest grid slice, using floor. For example, if you have snap value of 16,
             * and the width changes to 68, then it will snap down to 64 (the closest multiple of 16 when floored)
             * 
             * This mode is best used with the `FIT` scale mode.
             * 
             * Call this method with no arguments to reset the snap values.
             * 
             * Calling this method automatically invokes `ScaleManager.refresh` which emits a `RESIZE` event.
             * @param snapWidth The amount to snap the width to. If you don't want to snap the width, pass a value of zero. Default 0.
             * @param snapHeight The amount to snap the height to. If not provided it will use the `snapWidth` value. If you don't want to snap the height, pass a value of zero. Default snapWidth.
             * @returns The Scale Manager instance.
             */
            setSnap(snapWidth?: number, snapHeight?: number): this;

            /**
             * Refreshes the internal scale values, bounds sizes and orientation checks.
             * 
             * Once finished, dispatches the resize event.
             * 
             * This is called automatically by the Scale Manager when the browser window size changes,
             * as long as it is using a Scale Mode other than 'NONE'.
             * @param previousWidth The previous width of the game. Only set if the gameSize has changed.
             * @param previousHeight The previous height of the game. Only set if the gameSize has changed.
             * @returns The Scale Manager instance.
             */
            refresh(previousWidth?: number, previousHeight?: number): this;

            /**
             * Internal method that checks the current screen orientation, only if the internal check flag is set.
             * 
             * If the orientation has changed it updates the orientation property and then dispatches the orientation change event.
             */
            updateOrientation(): void;

            /**
             * Internal method that manages updating the size components based on the scale mode.
             */
            updateScale(): void;

            /**
             * Calculates and returns the largest possible zoom factor, based on the current
             * parent and game sizes. If the parent has no dimensions (i.e. an unstyled div),
             * or is smaller than the un-zoomed game, then this will return a value of 1 (no zoom)undefined
             * @returns The maximum possible zoom factor. At a minimum this value is always at least 1.
             */
            getMaxZoom(): number;

            /**
             * Calculates and updates the canvas CSS style in order to center it within the
             * bounds of its parent. If you have explicitly set parent to be `null` in your
             * game config then this method will likely give incorrect results unless you have called the
             * `setParentSize` method first.
             * 
             * It works by modifying the canvas CSS `marginLeft` and `marginTop` properties.
             * 
             * If they have already been set by your own style sheet, or code, this will overwrite them.
             * 
             * To prevent the Scale Manager from centering the canvas, either do not set the
             * `autoCenter` property in your game config, or make sure it is set to `NO_CENTER`.
             */
            updateCenter(): void;

            /**
             * Updates the `canvasBounds` rectangle to match the bounding client rectangle of the
             * canvas element being used to track input events.
             */
            updateBounds(): void;

            /**
             * Transforms the pageX value into the scaled coordinate space of the Scale Manager.
             * @param pageX The DOM pageX value.
             * @returns The translated value.
             */
            transformX(pageX: number): number;

            /**
             * Transforms the pageY value into the scaled coordinate space of the Scale Manager.
             * @param pageY The DOM pageY value.
             * @returns The translated value.
             */
            transformY(pageY: number): number;

            /**
             * Sends a request to the browser to ask it to go in to full screen mode, using the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API Fullscreen API}.
             * 
             * If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.
             * 
             * This method _must_ be called from a `pointerup` user-input gesture (**not** `pointerdown`). You cannot launch
             * games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked
             * from fullscreen unless the iframe has the `allowfullscreen` attribute.
             * 
             * On touch devices, such as Android and iOS Safari, you should always use `pointerup` and NOT `pointerdown`,
             * otherwise the request will fail unless the document in which your game is embedded has already received
             * some form of touch input, which you cannot guarantee. Activating fullscreen via `pointerup` circumvents
             * this issue.
             * 
             * Performing an action that navigates to another page, or opens another tab, will automatically cancel
             * fullscreen mode, as will the user pressing the ESC key. To cancel fullscreen mode directly from your game,
             * i.e. by clicking an icon, call the `stopFullscreen` method.
             * 
             * A browser can only send one DOM element into fullscreen. You can control which element this is by
             * setting the `fullscreenTarget` property in your game config, or changing the property in the Scale Manager.
             * Note that the game canvas _must_ be a child of the target. If you do not give a target, Phaser will
             * automatically create a blank `<div>` element and move the canvas into it, before going fullscreen.
             * When it leaves fullscreen, the div will be removed.
             * @param fullscreenOptions The FullscreenOptions dictionary is used to provide configuration options when entering full screen.
             */
            startFullscreen(fullscreenOptions?: object): void;

            /**
             * An internal method that gets the target element that is used when entering fullscreen mode.undefined
             * @returns The fullscreen target element.
             */
            getFullscreenTarget(): object;

            /**
             * Removes the fullscreen target that was added to the DOM.
             */
            removeFullscreenTarget(): void;

            /**
             * Calling this method will cancel fullscreen mode, if the browser has entered it.
             */
            stopFullscreen(): void;

            /**
             * The browser has successfully left fullscreen mode.
             */
            leaveFullScreenSuccessHandler(): void;

            /**
             * Toggles the fullscreen mode. If already in fullscreen, calling this will cancel it.
             * If not in fullscreen, this will request the browser to enter fullscreen mode.
             * 
             * If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.
             * 
             * This method _must_ be called from a `pointerup` user-input gesture (**not** `pointerdown`). You cannot launch
             * games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked
             * from fullscreen unless the iframe has the `allowfullscreen` attribute.
             * @param fullscreenOptions The FullscreenOptions dictionary is used to provide configuration options when entering full screen.
             */
            toggleFullscreen(fullscreenOptions?: object): void;

            /**
             * An internal method that starts the different DOM event listeners running.
             */
            startListeners(): void;

            /**
             * Triggered when a fullscreenchange event is dispatched by the DOM.
             */
            protected onFullScreenChange(): void;

            /**
             * Triggered when a fullscreenerror event is dispatched by the DOM.
             */
            onFullScreenError(): void;

            /**
             * Calculates and returns a Rectangle representing the currently visible area of the game canvas,
             * accounting for the canvas position, parent bounds, and display scale. If the canvas extends
             * beyond the visible area of the parent, the rectangle is clipped accordingly.
             * 
             * An optional Camera can be provided, in which case the returned rectangle is further adjusted
             * to account for the camera's zoom level and scroll position.
             * @param camera The camera to factor into the viewport calculation. If provided, the rectangle is adjusted for the camera's zoom and scroll.
             * @param out An optional Rectangle to store the result in. If not provided, a new Rectangle is created.
             * @returns The Rectangle of visible area.
             */
            getViewPort(camera?: Phaser.Cameras.Scene2D.Camera, out?: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle;

            /**
             * Internal method, called automatically by the game step.
             * Monitors the elapsed time and resize interval to see if a parent bounds check needs to take place.
             * @param time The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now().
             * @param delta The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class.
             */
            step(time: number, delta: number): void;

            /**
             * Stops all DOM event listeners.
             */
            stopListeners(): void;

            /**
             * Destroys this Scale Manager, releasing all references to external resources.
             * Once destroyed, the Scale Manager cannot be used again.
             */
            destroy(): void;

            /**
             * Is the browser currently in fullscreen mode or not?
             */
            readonly isFullscreen: boolean;

            /**
             * The game width.
             * 
             * This is typically the size given in the game configuration.
             */
            readonly width: number;

            /**
             * The game height.
             * 
             * This is typically the size given in the game configuration.
             */
            readonly height: number;

            /**
             * Is the device in a portrait orientation as reported by the Orientation API?
             * This value is usually only available on mobile devices.
             */
            readonly isPortrait: boolean;

            /**
             * Is the device in a landscape orientation as reported by the Orientation API?
             * This value is usually only available on mobile devices.
             */
            readonly isLandscape: boolean;

            /**
             * Are the game dimensions portrait? (i.e. taller than they are wide)
             * 
             * This is different to the device itself being in a portrait orientation.
             */
            readonly isGamePortrait: boolean;

            /**
             * Are the game dimensions landscape? (i.e. wider than they are tall)
             * 
             * This is different to the device itself being in a landscape orientation.
             */
            readonly isGameLandscape: boolean;

        }

        /**
         * Phaser Scale Manager constants for centering the game canvas.
         */
        enum Center {
            /**
             * The game canvas is not centered within the parent by Phaser.
             * You can still center it yourself via CSS.
             */
            NO_CENTER,
            /**
             * The game canvas is centered both horizontally and vertically within the parent.
             * To do this, the parent has to have a bounds that can be calculated and not be empty.
             * 
             * Centering is achieved by setting the margin left and top properties of the
             * game canvas, and does not factor in any other CSS styles you may have applied.
             */
            CENTER_BOTH,
            /**
             * The game canvas is centered horizontally within the parent.
             * To do this, the parent has to have a bounds that can be calculated and not be empty.
             * 
             * Centering is achieved by setting the margin left property of the
             * game canvas, and does not factor in any other CSS styles you may have applied.
             */
            CENTER_HORIZONTALLY,
            /**
             * The game canvas is centered vertically within the parent.
             * To do this, the parent has to have a bounds that can be calculated and not be empty.
             * 
             * Centering is achieved by setting the margin top property of the
             * game canvas, and does not factor in any other CSS styles you may have applied.
             */
            CENTER_VERTICALLY,
        }

        /**
         * Phaser Scale Manager constants for centering the game canvas.
         * 
         * To find out what each mode does please see [Phaser.Scale.Center]{@link Phaser.Scale.Center}.
         */
        type CenterType = Phaser.Scale.Center;

        /**
         * Phaser Scale Manager constants for orientation.
         */
        enum Orientation {
            /**
             * The primary landscape orientation.
             */
            LANDSCAPE,
            /**
             * The secondary landscape orientation.
             */
            LANDSCAPE_SECONDARY,
            /**
             * The primary portrait orientation.
             */
            PORTRAIT,
            /**
             * The secondary portrait orientation.
             */
            PORTRAIT_SECONDARY,
        }

        /**
         * Phaser Scale Manager constants for orientation.
         * 
         * To find out what each mode does please see [Phaser.Scale.Orientation]{@link Phaser.Scale.Orientation}.
         */
        type OrientationType = Phaser.Scale.Orientation;

        /**
         * Phaser Scale Manager constants for the different scale modes available.
         */
        enum ScaleModes {
            /**
             * No scaling happens at all. The canvas is set to the size given in the game config and Phaser doesn't change it
             * again from that point on. If you change the canvas size, either via CSS, or directly via code, then you need
             * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working.
             */
            NONE,
            /**
             * The height is automatically adjusted based on the width.
             */
            WIDTH_CONTROLS_HEIGHT,
            /**
             * The width is automatically adjusted based on the height.
             */
            HEIGHT_CONTROLS_WIDTH,
            /**
             * The width and height are automatically adjusted to fit inside the given target area,
             * while keeping the aspect ratio. Depending on the aspect ratio there may be some space
             * inside the area which is not covered.
             */
            FIT,
            /**
             * The width and height are automatically adjusted to make the size cover the entire target
             * area while keeping the aspect ratio. This may extend further out than the target size.
             */
            ENVELOP,
            /**
             * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio.
             */
            RESIZE,
            /**
             * The Canvas's visible area is resized to fit all available _parent_ space like RESIZE mode,
             * and scales the canvas size to fit inside the visible area like FIT mode.
             */
            EXPAND,
        }

        /**
         * Phaser Scale Manager constants for the different scale modes available.
         * 
         * To find out what each mode does please see [Phaser.Scale.ScaleModes]{@link Phaser.Scale.ScaleModes}.
         */
        type ScaleModeType = Phaser.Scale.ScaleModes;

        /**
         * Phaser Scale Manager constants for zoom modes.
         */
        enum Zoom {
            /**
             * The game canvas will not be zoomed by Phaser.
             */
            NO_ZOOM,
            /**
             * The game canvas will be 2x zoomed by Phaser.
             */
            ZOOM_2X,
            /**
             * The game canvas will be 4x zoomed by Phaser.
             */
            ZOOM_4X,
            /**
             * Calculate the zoom value based on the maximum multiplied game size that will
             * fit into the parent, or browser window if no parent is set.
             */
            MAX_ZOOM,
        }

        /**
         * Phaser Scale Manager constants for zoom modes.
         * 
         * To find out what each mode does please see [Phaser.Scale.Zoom]{@link Phaser.Scale.Zoom}.
         */
        type ZoomType = Phaser.Scale.Zoom;

        namespace Events {
            /**
             * The Scale Manager has successfully entered fullscreen mode.
             */
            const ENTER_FULLSCREEN: string;

            /**
             * The Scale Manager tried to enter fullscreen mode but failed.
             */
            const FULLSCREEN_FAILED: string;

            /**
             * The Scale Manager tried to enter fullscreen mode, but it is unsupported by the browser.
             */
            const FULLSCREEN_UNSUPPORTED: string;

            /**
             * The Scale Manager was in fullscreen mode, but has since left, either directly via game code,
             * or via a user gestured, such as pressing the ESC key.
             */
            const LEAVE_FULLSCREEN: string;

            /**
             * The Scale Manager Orientation Change Event.
             * 
             * This event is dispatched whenever the Scale Manager detects an orientation change event from the browser.
             */
            const ORIENTATION_CHANGE: string;

            /**
             * The Scale Manager Resize Event.
             * 
             * This event is dispatched whenever the Scale Manager detects a resize event from the browser.
             * It sends three parameters to the callback, each of them being Size components. You can read
             * the `width`, `height`, `aspectRatio` and other properties of these components to help with
             * scaling your own game content.
             */
            const RESIZE: string;

        }

        /**
         * The game canvas is not centered within the parent by Phaser.
         * You can still center it yourself via CSS.
         */
        const NO_CENTER: number;

        /**
         * The game canvas is centered both horizontally and vertically within the parent.
         * To do this, the parent has to have a bounds that can be calculated and not be empty.
         * 
         * Centering is achieved by setting the margin left and top properties of the
         * game canvas, and does not factor in any other CSS styles you may have applied.
         */
        const CENTER_BOTH: number;

        /**
         * The game canvas is centered horizontally within the parent.
         * To do this, the parent has to have a bounds that can be calculated and not be empty.
         * 
         * Centering is achieved by setting the margin left property of the
         * game canvas, and does not factor in any other CSS styles you may have applied.
         */
        const CENTER_HORIZONTALLY: number;

        /**
         * The game canvas is centered vertically within the parent.
         * To do this, the parent has to have a bounds that can be calculated and not be empty.
         * 
         * Centering is achieved by setting the margin top property of the
         * game canvas, and does not factor in any other CSS styles you may have applied.
         */
        const CENTER_VERTICALLY: number;

        /**
         * The primary landscape orientation.
         */
        const LANDSCAPE: string;

        /**
         * The primary portrait orientation.
         */
        const PORTRAIT: string;

        /**
         * No scaling happens at all. The canvas is set to the size given in the game config and Phaser doesn't change it
         * again from that point on. If you change the canvas size, either via CSS, or directly via code, then you need
         * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working.
         */
        const NONE: number;

        /**
         * The height is automatically adjusted based on the width.
         */
        const WIDTH_CONTROLS_HEIGHT: number;

        /**
         * The width is automatically adjusted based on the height.
         */
        const HEIGHT_CONTROLS_WIDTH: number;

        /**
         * The width and height are automatically adjusted to fit inside the given target area,
         * while keeping the aspect ratio. Depending on the aspect ratio there may be some space
         * inside the area which is not covered.
         */
        const FIT: number;

        /**
         * The width and height are automatically adjusted to make the size cover the entire target
         * area while keeping the aspect ratio. This may extend further out than the target size.
         */
        const ENVELOP: number;

        /**
         * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio.
         */
        const RESIZE: number;

        /**
         * The Canvas's visible area is resized to fit all available _parent_ space like RESIZE mode,
         * and scales the canvas size to fit inside the visible area like FIT mode.
         */
        const EXPAND: number;

        /**
         * The game canvas will not be zoomed by Phaser.
         */
        const NO_ZOOM: number;

        /**
         * The game canvas will be 2x zoomed by Phaser.
         */
        const ZOOM_2X: number;

        /**
         * The game canvas will be 4x zoomed by Phaser.
         */
        const ZOOM_4X: number;

        /**
         * Calculate the zoom value based on the maximum multiplied game size that will
         * fit into the parent, or browser window if no parent is set.
         */
        const MAX_ZOOM: number;

    }

    /**
     * A base Phaser.Scene class which can be extended for your own use.
     * 
     * A Scene is the fundamental organizational unit in Phaser. Each Scene has its own
     * display list, update loop, cameras, input handling, and loader. Multiple Scenes
     * can run simultaneously (e.g., a game scene with a UI overlay scene). Scenes are
     * managed by the SceneManager and communicate with each other via the ScenePlugin.
     * 
     * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}.
     */
    class Scene {
        /**
         * 
         * @param config The scene key or scene specific configuration settings.
         */
        constructor(config?: string | Phaser.Types.Scenes.SettingsConfig);

        /**
         * The Scene Systems. You must never overwrite this property, or all hell will break loose.
         */
        sys: Phaser.Scenes.Systems;

        /**
         * A reference to the Phaser.Game instance.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        game: Phaser.Game;

        /**
         * A reference to the global Animation Manager.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        anims: Phaser.Animations.AnimationManager;

        /**
         * A reference to the global Cache.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        cache: Phaser.Cache.CacheManager;

        /**
         * A reference to the global Data Manager.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        registry: Phaser.Data.DataManager;

        /**
         * A reference to the Sound Manager.
         * 
         * This property will only be available if defined in the Scene Injection Map and the plugin is installed.
         */
        sound: Phaser.Sound.NoAudioSoundManager | Phaser.Sound.HTML5AudioSoundManager | Phaser.Sound.WebAudioSoundManager;

        /**
         * A reference to the Texture Manager.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        textures: Phaser.Textures.TextureManager;

        /**
         * A Scene specific Event Emitter.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        events: Phaser.Events.EventEmitter;

        /**
         * The Scene Camera Manager.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        cameras: Phaser.Cameras.Scene2D.CameraManager;

        /**
         * The Scene Game Object Factory.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        add: Phaser.GameObjects.GameObjectFactory;

        /**
         * The Scene Game Object Creator.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        make: Phaser.GameObjects.GameObjectCreator;

        /**
         * A reference to the Scene Manager Plugin.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        scene: Phaser.Scenes.ScenePlugin;

        /**
         * The Game Object Display List belonging to this Scene.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        children: Phaser.GameObjects.DisplayList;

        /**
         * The Scene Lights Manager Plugin.
         * 
         * This property will only be available if defined in the Scene Injection Map and the plugin is installed.
         */
        lights: Phaser.GameObjects.LightsManager;

        /**
         * A Scene specific Data Manager Plugin.
         * 
         * See the `registry` property for the global Data Manager.
         * 
         * This property will only be available if defined in the Scene Injection Map and the plugin is installed.
         */
        data: Phaser.Data.DataManager;

        /**
         * The Scene Input Manager Plugin.
         * 
         * This property will only be available if defined in the Scene Injection Map and the plugin is installed.
         */
        input: Phaser.Input.InputPlugin;

        /**
         * The Scene Loader Plugin.
         * 
         * This property will only be available if defined in the Scene Injection Map and the plugin is installed.
         */
        load: Phaser.Loader.LoaderPlugin;

        /**
         * The Scene Time and Clock Plugin.
         * 
         * This property will only be available if defined in the Scene Injection Map and the plugin is installed.
         */
        time: Phaser.Time.Clock;

        /**
         * The Scene Tween Manager Plugin.
         * 
         * This property will only be available if defined in the Scene Injection Map and the plugin is installed.
         */
        tweens: Phaser.Tweens.TweenManager;

        /**
         * The Scene Arcade Physics Plugin.
         * 
         * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
         */
        physics: Phaser.Physics.Arcade.ArcadePhysics;

        /**
         * The Scene Matter Physics Plugin.
         * 
         * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
         */
        matter: Phaser.Physics.Matter.MatterPhysics;

        /**
         * A reference to the global Scale Manager.
         * 
         * This property will only be available if defined in the Scene Injection Map.
         */
        scale: Phaser.Scale.ScaleManager;

        /**
         * A reference to the global Plugin Manager.
         * 
         * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install
         * those plugins into Scenes as required.
         */
        plugins: Phaser.Plugins.PluginManager;

        /**
         * A reference to the renderer instance Phaser is using, either Canvas Renderer or WebGL Renderer.
         */
        renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer;

        /**
         * Override this method in your own Scene subclass to implement per-frame game logic.
         * 
         * This method is called automatically once per game step while the scene is running.
         * It is empty by default and is the primary place to put logic that needs to run every frame,
         * such as updating game object positions, checking collisions, or reading input state.
         * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
         * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
         */
        update(time: number, delta: number): void;

    }

    namespace Scenes {
        /**
         * Builds an array of which physics plugins should be activated for the given Scene.
         * 
         * It checks both the global default physics system defined in the Game configuration
         * and any scene-specific physics settings. Each unique physics plugin key is formatted
         * as a title-cased string with 'Physics' appended (e.g. 'arcade' becomes 'ArcadePhysics').
         * Returns `undefined` if neither a default system nor scene-level physics settings are found.
         * @param sys The Scene Systems instance for which to resolve active physics plugins.
         * @returns An array of physics plugin keys to start for this Scene, or `undefined` if none are configured.
         */
        function GetPhysicsPlugins(sys: Phaser.Scenes.Systems): any[];

        /**
         * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene.
         * 
         * The function checks the Scene's own settings for a `plugins` array first. If one is defined, it takes
         * priority and is returned immediately. Otherwise, the global default Scene plugins registered with the
         * Plugin Manager are returned. If neither is available, an empty array is returned.
         * @param sys The Scene Systems object to check for plugins.
         * @returns An array of plugin keys to activate for the Scene. Scene-level plugins take priority over global defaults. Returns an empty array if no plugins are configured.
         */
        function GetScenePlugins(sys: Phaser.Scenes.Systems): any[];

        /**
         * The Scene Manager.
         * 
         * The Scene Manager is a Game level system, responsible for creating, processing and updating all of the
         * Scenes in a Game instance.
         * 
         * You should not usually interact directly with the Scene Manager at all. Instead, you should use
         * the Scene Plugin, which is available from every Scene in your game via the `this.scene` property.
         * 
         * Using methods in this Scene Manager directly will break queued operations and can cause runtime
         * errors. Instead, go via the Scene Plugin. Every feature this Scene Manager provides is also
         * available via the Scene Plugin.
         */
        class SceneManager {
            /**
             * 
             * @param game The Phaser.Game instance this Scene Manager belongs to.
             * @param sceneConfig Scene specific configuration settings.
             */
            constructor(game: Phaser.Game, sceneConfig: object);

            /**
             * The Game that this SceneManager belongs to.
             */
            game: Phaser.Game;

            /**
             * An object that maps the keys to the scene so we can quickly get a scene from a key without iteration.
             */
            keys: Record<string, Phaser.Scene>;

            /**
             * The array in which all of the scenes are kept.
             */
            scenes: Phaser.Scene[];

            /**
             * Is the Scene Manager actively processing the Scenes list?
             */
            readonly isProcessing: boolean;

            /**
             * Has the Scene Manager properly started?
             */
            readonly isBooted: boolean;

            /**
             * Do any of the Cameras in any of the Scenes require a custom viewport?
             * If not we can skip scissor tests.
             */
            customViewports: number;

            /**
             * This system Scene is created during `bootQueue` and is a default
             * empty Scene that lives outside of the Scene list, but can be used
             * by plugins and managers that need access to a live Scene, without
             * being tied to one.
             */
            systemScene: Phaser.Scene;

            /**
             * Processes any pending Scene additions from the `_pending` list and executes any queued
             * Scene operations from the `_queue` list, such as start, stop, sleep, wake, and ordering
             * changes. This method is called automatically at the start of each game step and should
             * not be called directly.
             */
            processQueue(): void;

            /**
             * Adds a new Scene into the SceneManager.
             * You must give each Scene a unique key by which you'll identify it.
             * 
             * The `sceneConfig` can be:
             * 
             * * A `Phaser.Scene` object, or an object that extends it.
             * * A plain JavaScript object
             * * A JavaScript ES6 Class that extends `Phaser.Scene`
             * * A JavaScript ES5 prototype based Class
             * * A JavaScript function
             * 
             * If a function is given then a new Scene will be created by calling it.
             * @param key A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`.
             * @param sceneConfig The config for the Scene
             * @param autoStart If `true` the Scene will be started immediately after being added. Default false.
             * @param data Optional data object. This will be set as `Scene.settings.data` and passed to `Scene.init`, and `Scene.create`.
             * @returns The added Scene, if it was added immediately, otherwise `null`.
             */
            add(key: string, sceneConfig: Phaser.Types.Scenes.SceneType, autoStart?: boolean, data?: object): Phaser.Scene | null;

            /**
             * Removes a Scene from the SceneManager.
             * 
             * The Scene is removed from the local scenes array, its key is cleared from the keys
             * cache and Scene.Systems.destroy is then called on it.
             * 
             * If the SceneManager is processing the Scenes when this method is called it will
             * queue the operation for the next update sequence.
             * @param key A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`.
             * @returns This Scene Manager instance.
             */
            remove(key: string): this;

            /**
             * Updates the Scenes.
             * @param time The current game timestamp, in milliseconds.
             * @param delta The delta time, in milliseconds, elapsed since the last game step.
             */
            update(time: number, delta: number): void;

            /**
             * Renders the Scenes.
             * @param renderer The renderer to use.
             */
            render(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer): void;

            /**
             * Returns an array of all the current Scenes being managed by this Scene Manager.
             * 
             * You can filter the output by the active state of the Scene and choose to have
             * the array returned in normal or reversed order.
             * @param isActive Only include Scene's that are currently active? Default true.
             * @param inReverse Return the array of Scenes in reverse? Default false.
             * @returns An array containing all of the Scenes in the Scene Manager.
             */
            getScenes<T extends Phaser.Scene[]>(isActive?: boolean, inReverse?: boolean): T;

            /**
             * Retrieves a Scene based on the given key.
             * 
             * If an actual Scene is passed to this method, it can be used to check if
             * its currently within the Scene Manager, or not.
             * @param key The key of the Scene to retrieve.
             * @returns The Scene, or `null` if no matching Scene was found.
             */
            getScene<T extends Phaser.Scene>(key: (T|string)): T;

            /**
             * Determines whether a Scene is running.
             * @param key The Scene to check.
             * @returns Whether the Scene is running, or `null` if no matching Scene was found.
             */
            isActive<T extends Phaser.Scene>(key: (T|string)): boolean;

            /**
             * Determines whether a Scene is paused.
             * @param key The Scene to check.
             * @returns Whether the Scene is paused, or `null` if no matching Scene was found.
             */
            isPaused<T extends Phaser.Scene>(key: (T|string)): boolean;

            /**
             * Determines whether a Scene is visible.
             * @param key The Scene to check.
             * @returns Whether the Scene is visible, or `null` if no matching Scene was found.
             */
            isVisible<T extends Phaser.Scene>(key: (T|string)): boolean;

            /**
             * Determines whether a Scene is sleeping.
             * @param key The Scene to check.
             * @returns Whether the Scene is sleeping, or `null` if no matching Scene was found.
             */
            isSleeping<T extends Phaser.Scene>(key: (T|string)): boolean;

            /**
             * Pauses the given Scene.
             * @param key The Scene to pause.
             * @param data An optional data object that will be passed to the Scene and emitted by its pause event.
             * @returns This Scene Manager instance.
             */
            pause<T extends Phaser.Scene>(key: (T|string), data?: object): this;

            /**
             * Resumes the given Scene.
             * @param key The Scene to resume.
             * @param data An optional data object that will be passed to the Scene and emitted by its resume event.
             * @returns This Scene Manager instance.
             */
            resume<T extends Phaser.Scene>(key: (T|string), data?: object): this;

            /**
             * Puts the given Scene to sleep.
             * @param key The Scene to put to sleep.
             * @param data An optional data object that will be passed to the Scene and emitted by its sleep event.
             * @returns This Scene Manager instance.
             */
            sleep<T extends Phaser.Scene>(key: (T|string), data?: object): this;

            /**
             * Awakens the given Scene.
             * @param key The Scene to wake up.
             * @param data An optional data object that will be passed to the Scene and emitted by its wake event.
             * @returns This Scene Manager instance.
             */
            wake<T extends Phaser.Scene>(key: (T|string), data?: object): this;

            /**
             * Runs the given Scene.
             * 
             * If the given Scene is paused, it will resume it. If sleeping, it will wake it.
             * If not running at all, it will be started.
             * 
             * Use this if you wish to open a modal Scene by calling `pause` on the current
             * Scene, then `run` on the modal Scene.
             * @param key The Scene to run.
             * @param data A data object that will be passed to the Scene on start, wake, or resume.
             * @returns This Scene Manager instance.
             */
            run<T extends Phaser.Scene>(key: (T|string), data?: object): this;

            /**
             * Starts the given Scene, if it is not starting, loading, or creating.
             * 
             * If the Scene is running, paused, or sleeping, it will be shutdown and then started.
             * @param key The Scene to start.
             * @param data Optional data object to pass to `Scene.Settings` and `Scene.init`, and `Scene.create`.
             * @returns This Scene Manager instance.
             */
            start<T extends Phaser.Scene>(key: (T|string), data?: object): this;

            /**
             * Stops the given Scene.
             * @param key The Scene to stop.
             * @param data Optional data object to pass to Scene.shutdown.
             * @returns This Scene Manager instance.
             */
            stop<T extends Phaser.Scene>(key: (T|string), data?: object): this;

            /**
             * Sleeps one Scene and starts the other.
             * @param from The Scene to sleep.
             * @param to The Scene to start.
             * @param data Optional data object to pass to `Scene.Settings` and `Scene.init`, and `Scene.create`. It is only passed when the scene starts for the first time.
             * @returns This Scene Manager instance.
             */
            switch<T extends Phaser.Scene>(from: (T|string), to: (T|string), data?: object): this;

            /**
             * Retrieves a Scene by numeric index.
             * @param index The index of the Scene to retrieve.
             * @returns The Scene.
             */
            getAt<T extends Phaser.Scene>(index: number): T;

            /**
             * Retrieves the numeric index of a Scene.
             * @param key The key of the Scene.
             * @returns The index of the Scene.
             */
            getIndex<T extends Phaser.Scene>(key: (T|string)): number;

            /**
             * Brings a Scene to the top of the Scenes list.
             * 
             * This means it will render above all other Scenes.
             * @param key The Scene to move.
             * @returns This Scene Manager instance.
             */
            bringToTop<T extends Phaser.Scene>(key: (T|string)): this;

            /**
             * Sends a Scene to the back of the Scenes list.
             * 
             * This means it will render below all other Scenes.
             * @param key The Scene to move.
             * @returns This Scene Manager instance.
             */
            sendToBack<T extends Phaser.Scene>(key: (T|string)): this;

            /**
             * Moves a Scene down one position in the Scenes list.
             * @param key The Scene to move.
             * @returns This Scene Manager instance.
             */
            moveDown<T extends Phaser.Scene>(key: (T|string)): this;

            /**
             * Moves a Scene up one position in the Scenes list.
             * @param key The Scene to move.
             * @returns This Scene Manager instance.
             */
            moveUp<T extends Phaser.Scene>(key: (T|string)): this;

            /**
             * Moves a Scene so it is immediately above another Scene in the Scenes list.
             * If the Scene is already above the other, it isn't moved.
             * 
             * This means it will render over the top of the other Scene.
             * @param keyA The Scene that Scene B will be moved above.
             * @param keyB The Scene to be moved.
             * @returns This Scene Manager instance.
             */
            moveAbove<T extends Phaser.Scene>(keyA: (T|string), keyB: (T|string)): this;

            /**
             * Moves a Scene so it is immediately below another Scene in the Scenes list.
             * If the Scene is already below the other, it isn't moved.
             * 
             * This means it will render behind the other Scene.
             * @param keyA The Scene that Scene B will be moved below.
             * @param keyB The Scene to be moved.
             * @returns This Scene Manager instance.
             */
            moveBelow<T extends Phaser.Scene>(keyA: (T|string), keyB: (T|string)): this;

            /**
             * Swaps the positions of two Scenes in the Scenes list.
             * @param keyA The first Scene to swap.
             * @param keyB The second Scene to swap.
             * @returns This Scene Manager instance.
             */
            swapPosition<T extends Phaser.Scene>(keyA: (T|string), keyB: (T|string)): this;

            /**
             * Dumps debug information about each Scene to the developer console.
             */
            dump(): void;

            /**
             * Destroy this Scene Manager and all of its systems.
             * 
             * This process cannot be reversed.
             * 
             * This method is called automatically when a Phaser Game instance is destroyed.
             */
            destroy(): void;

        }

        /**
         * The Scene Plugin is the main interface to the Scene Manager and allows you to control
         * any Scene running in your game. You should always use this plugin. By default, it is
         * mapped to the Scene property `this.scene`. Meaning, from within a Scene, you can call
         * methods such as `this.scene.start()`.
         * 
         * Note that nearly all methods in this class are run on a queue-basis and not
         * immediately. For example, calling `this.scene.launch('SceneB')` will try to
         * launch SceneB when the Scene Manager next updates, which is at the start of the game
         * step. All operations are queued and run in the order in which they are invoked here.
         */
        class ScenePlugin {
            /**
             * 
             * @param scene The Scene that this ScenePlugin belongs to.
             */
            constructor(scene: Phaser.Scene);

            /**
             * The Scene that this ScenePlugin belongs to.
             */
            scene: Phaser.Scene;

            /**
             * The Scene Systems instance of the Scene that this ScenePlugin belongs to.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * The settings of the Scene this ScenePlugin belongs to.
             */
            settings: Phaser.Types.Scenes.SettingsObject;

            /**
             * The key of the Scene this ScenePlugin belongs to.
             */
            key: string;

            /**
             * The Game's SceneManager.
             */
            manager: Phaser.Scenes.SceneManager;

            /**
             * If this Scene is currently transitioning to another, this holds
             * the current percentage of the transition progress, between 0 and 1.
             */
            transitionProgress: number;

            /**
             * Shutdown this Scene and run the given one.
             * 
             * This will happen at the next Scene Manager update, not immediately.
             * @param key The Scene to start.
             * @param data The Scene data. If no value is given it will not overwrite any previous data that may exist.
             * @returns This Scene Plugin instance.
             */
            start<T extends Phaser.Scene>(key?: (T|string), data?: object): this;

            /**
             * Restarts this Scene.
             * 
             * This will happen at the next Scene Manager update, not immediately.
             * @param data The Scene data. If no value is given it will not overwrite any previous data that may exist.
             * @returns This Scene Plugin instance.
             */
            restart(data?: object): this;

            /**
             * This will start a transition from the current Scene to the target Scene given.
             * 
             * The target Scene cannot be the same as the current Scene.
             * 
             * The transition will last for the duration specified in milliseconds.
             * 
             * You can have the target Scene moved above or below this one in the display list.
             * 
             * You can specify an update callback. This callback will be invoked _every frame_ for the duration
             * of the transition.
             * 
             * This Scene can either be sent to sleep at the end of the transition, or stopped. The default is to stop.
             * 
             * There are also 5 transition related events: This scene will emit the event `transitionout` when
             * the transition begins, which is typically the frame after calling this method.
             * 
             * The target Scene will emit the event `transitioninit` when that Scene's `init` method is called.
             * It will then emit the event `transitionstart` when its `create` method is called.
             * If the Scene was sleeping and has been woken up, it will emit the event `transitionwake` instead of these two,
             * as the Scenes `init` and `create` methods are not invoked when a Scene wakes up.
             * 
             * When the duration of the transition has elapsed it will emit the event `transitioncomplete`.
             * These events are cleared of all listeners when the Scene shuts down, but not if it is sent to sleep.
             * 
             * It's important to understand that the duration of the transition begins the moment you call this method.
             * If the Scene you are transitioning to includes delayed processes, such as waiting for files to load, the
             * time still counts down even while that is happening. If the game itself pauses, or something else causes
             * this Scenes update loop to stop, then the transition will also pause for that duration. There are
             * checks in place to prevent you accidentally stopping a transitioning Scene but if you've got code to
             * override this understand that until the target Scene completes it might never be unlocked for input events.
             * @param config The transition configuration object.
             * @returns `true` if the transition was started, otherwise `false`.
             */
            transition(config: Phaser.Types.Scenes.SceneTransitionConfig): boolean;

            /**
             * Add the Scene into the Scene Manager and start it if 'autoStart' is true or the Scene config 'active' property is set.
             * @param key A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`.
             * @param sceneConfig The config for the Scene
             * @param autoStart If `true` the Scene will be started immediately after being added. Default false.
             * @param data Optional data object. This will be set as `Scene.settings.data` and passed to `Scene.init`, and `Scene.create`.
             * @returns The added Scene, if it was added immediately, otherwise `null`.
             */
            add(key: string, sceneConfig: Phaser.Types.Scenes.SceneType, autoStart?: boolean, data?: object): Phaser.Scene | null;

            /**
             * Launch the given Scene and run it in parallel with this one.
             * 
             * This will happen at the next Scene Manager update, not immediately.
             * @param key The Scene to launch.
             * @param data The Scene data.
             * @returns This Scene Plugin instance.
             */
            launch<T extends Phaser.Scene>(key: (T|string), data?: object): this;

            /**
             * Runs the given Scene, but does not change the state of this Scene.
             * 
             * This will happen at the next Scene Manager update, not immediately.
             * 
             * If the given Scene is paused, it will resume it. If sleeping, it will wake it.
             * If not running at all, it will be started.
             * 
             * Use this if you wish to open a modal Scene by calling `pause` on the current
             * Scene, then `run` on the modal Scene.
             * @param key The Scene to run.
             * @param data A data object that will be passed to the Scene and emitted in its start, wake, or resume events.
             * @returns This Scene Plugin instance.
             */
            run<T extends Phaser.Scene>(key: (T|string), data?: object): this;

            /**
             * Pause the Scene - this stops the update step from happening but it still renders.
             * 
             * This will happen at the next Scene Manager update, not immediately.
             * @param key The Scene to pause.
             * @param data An optional data object that will be passed to the Scene and emitted in its pause event.
             * @returns This Scene Plugin instance.
             */
            pause<T extends Phaser.Scene>(key?: (T|string), data?: object): this;

            /**
             * Resume the Scene - starts the update loop again.
             * 
             * This will happen at the next Scene Manager update, not immediately.
             * @param key The Scene to resume.
             * @param data An optional data object that will be passed to the Scene and emitted in its resume event.
             * @returns This Scene Plugin instance.
             */
            resume<T extends Phaser.Scene>(key?: (T|string), data?: object): this;

            /**
             * Makes the Scene sleep (no update, no render) but doesn't shutdown.
             * 
             * This will happen at the next Scene Manager update, not immediately.
             * @param key The Scene to put to sleep.
             * @param data An optional data object that will be passed to the Scene and emitted in its sleep event.
             * @returns This Scene Plugin instance.
             */
            sleep<T extends Phaser.Scene>(key?: (T|string), data?: object): this;

            /**
             * Makes the Scene wake-up (starts update and render).
             * 
             * This will happen at the next Scene Manager update, not immediately.
             * @param key The Scene to wake up.
             * @param data An optional data object that will be passed to the Scene and emitted in its wake event.
             * @returns This Scene Plugin instance.
             */
            wake<T extends Phaser.Scene>(key?: (T|string), data?: object): this;

            /**
             * Makes this Scene sleep then starts the Scene given.
             * 
             * This will happen at the next Scene Manager update, not immediately.
             * @param key The Scene to start.
             * @param data Optional data object to pass to either the Scene `wake` or `start` method.
             * @returns This Scene Plugin instance.
             */
            switch<T extends Phaser.Scene>(key: (T|string), data?: any): this;

            /**
             * Shutdown the Scene, clearing display list, timers, etc.
             * 
             * This happens at the next Scene Manager update, not immediately.
             * @param key The Scene to stop.
             * @param data Optional data object to pass to Scene.Systems.shutdown.
             * @returns This Scene Plugin instance.
             */
            stop<T extends Phaser.Scene>(key?: (T|string), data?: any): this;

            /**
             * Sets the active state of the given Scene.
             * @param value If `true` the Scene will be resumed. If `false` it will be paused.
             * @param key The Scene to set the active state of.
             * @param data An optional data object that will be passed to the Scene and emitted with its events.
             * @returns This Scene Plugin instance.
             */
            setActive<T extends Phaser.Scene>(value: boolean, key?: (T|string), data?: object): this;

            /**
             * Sets the visible state of the given Scene.
             * @param value If `true` the Scene will be made visible. If `false` it will be hidden.
             * @param key The Scene to set the visible state for.
             * @returns This Scene Plugin instance.
             */
            setVisible<T extends Phaser.Scene>(value: boolean, key?: (T|string)): this;

            /**
             * Checks if the given Scene is sleeping or not.
             * @param key The Scene to check.
             * @returns Whether the Scene is sleeping, or `null` if no matching Scene was found.
             */
            isSleeping<T extends Phaser.Scene>(key?: (T|string)): boolean;

            /**
             * Checks if the given Scene is running or not.
             * @param key The Scene to check.
             * @returns Whether the Scene is running, or `null` if no matching Scene was found.
             */
            isActive<T extends Phaser.Scene>(key?: (T|string)): boolean;

            /**
             * Checks if the given Scene is paused or not.
             * @param key The Scene to check.
             * @returns Whether the Scene is paused, or `null` if no matching Scene was found.
             */
            isPaused<T extends Phaser.Scene>(key?: (T|string)): boolean;

            /**
             * Checks if the given Scene is visible or not.
             * @param key The Scene to check.
             * @returns Whether the Scene is visible, or `null` if no matching Scene was found.
             */
            isVisible<T extends Phaser.Scene>(key?: (T|string)): boolean;

            /**
             * Swaps the position of two scenes in the Scenes list.
             * 
             * This controls the order in which they are rendered and updated.
             * @param keyA The first Scene to swap.
             * @param keyB The second Scene to swap. If none is given it defaults to this Scene.
             * @returns This Scene Plugin instance.
             */
            swapPosition<T extends Phaser.Scene>(keyA: (T|string), keyB?: (T|string)): this;

            /**
             * Moves a Scene so it is immediately above another Scene in the Scenes list.
             * If the Scene is already above the other, it isn't moved.
             * 
             * This means it will render over the top of the other Scene.
             * @param keyA The Scene that Scene B will be moved to be above.
             * @param keyB The Scene to be moved. If none is given it defaults to this Scene.
             * @returns This Scene Plugin instance.
             */
            moveAbove<T extends Phaser.Scene>(keyA: (T|string), keyB?: (T|string)): this;

            /**
             * Moves a Scene so it is immediately below another Scene in the Scenes list.
             * If the Scene is already below the other, it isn't moved.
             * 
             * This means it will render behind the other Scene.
             * @param keyA The Scene that Scene B will be moved to be below.
             * @param keyB The Scene to be moved. If none is given it defaults to this Scene.
             * @returns This Scene Plugin instance.
             */
            moveBelow<T extends Phaser.Scene>(keyA: (T|string), keyB?: (T|string)): this;

            /**
             * Removes a Scene from the SceneManager.
             * 
             * The Scene is removed from the local scenes array, its key is cleared from the keys
             * cache and Scene.Systems.destroy is then called on it.
             * 
             * If the SceneManager is processing the Scenes when this method is called it will
             * queue the operation for the next update sequence.
             * @param key The Scene to be removed.
             * @returns This Scene Plugin instance.
             */
            remove<T extends Phaser.Scene>(key?: (T|string)): this;

            /**
             * Moves a Scene up one position in the Scenes list.
             * @param key The Scene to move.
             * @returns This Scene Plugin instance.
             */
            moveUp<T extends Phaser.Scene>(key?: (T|string)): this;

            /**
             * Moves a Scene down one position in the Scenes list.
             * @param key The Scene to move.
             * @returns This Scene Plugin instance.
             */
            moveDown<T extends Phaser.Scene>(key?: (T|string)): this;

            /**
             * Brings a Scene to the top of the Scenes list.
             * 
             * This means it will render above all other Scenes.
             * @param key The Scene to move.
             * @returns This Scene Plugin instance.
             */
            bringToTop<T extends Phaser.Scene>(key?: (T|string)): this;

            /**
             * Sends a Scene to the back of the Scenes list.
             * 
             * This means it will render below all other Scenes.
             * @param key The Scene to move.
             * @returns This Scene Plugin instance.
             */
            sendToBack<T extends Phaser.Scene>(key?: (T|string)): this;

            /**
             * Retrieves a Scene based on the given key.
             * 
             * If an actual Scene is passed to this method, it can be used to check if
             * its currently within the Scene Manager, or not.
             * @param key The Scene to retrieve.
             * @returns The Scene.
             */
            get<T extends Phaser.Scene>(key: (T|string)): T;

            /**
             * Return the status of the Scene.
             * @param key The Scene to get the status from.
             * @returns The Scene status. This maps to the `Phaser.Scene` constants, such as `Phaser.Scene.LOADING`.
             */
            getStatus<T extends Phaser.Scene>(key: (T|string)): number;

            /**
             * Retrieves the numeric index of a Scene in the Scenes list.
             * @param key The Scene to get the index of.
             * @returns The index of the Scene.
             */
            getIndex<T extends Phaser.Scene>(key?: (T|string)): number;

        }

        namespace Settings {
            /**
             * Takes a Scene configuration object and returns a fully formed System Settings object.
             * @param config The Scene configuration object used to create this Scene Settings.
             * @returns The Scene Settings object created as a result of the config and default settings.
             */
            function create(config: string | Phaser.Types.Scenes.SettingsConfig): Phaser.Types.Scenes.SettingsObject;

        }

        /**
         * The Scene Systems class is the backbone of every Scene in Phaser. It is created automatically
         * by the Scene Manager and is accessible from within a Scene via the `sys` property (e.g. `this.sys`).
         * 
         * Systems manages the lifecycle of a Scene — booting it, stepping it each frame, rendering it, and
         * shutting it down or destroying it when required. It owns references to all of the core Scene plugins
         * (such as the Display List, Update List, Camera Manager, and Event Emitter) as well as read-only
         * references to the global Game-level managers (such as the Texture Manager, Sound Manager, and Cache).
         * 
         * You will rarely need to interact with Systems directly; instead, use the convenience properties that
         * Phaser injects into each Scene (e.g. `this.add`, `this.cameras`, `this.events`). However, Systems is
         * the authoritative place to query a Scene's current status, pause, resume, sleep, or wake it.
         */
        class Systems {
            /**
             * 
             * @param scene The Scene that owns this Systems instance.
             * @param config Scene specific configuration settings.
             */
            constructor(scene: Phaser.Scene, config: string | Phaser.Types.Scenes.SettingsConfig);

            /**
             * A reference to the Scene that these Systems belong to.
             */
            scene: Phaser.Scene;

            /**
             * A reference to the Phaser Game instance.
             */
            game: Phaser.Game;

            /**
             * A reference to either the Canvas or WebGL Renderer that this Game is using.
             */
            renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer;

            /**
             * The Scene Configuration object, as passed in when creating the Scene.
             */
            config: string | Phaser.Types.Scenes.SettingsConfig;

            /**
             * The Scene Settings. This is the parsed output based on the Scene configuration.
             */
            settings: Phaser.Types.Scenes.SettingsObject;

            /**
             * A reference to the HTML Canvas Element that Phaser renders to.
             */
            canvas: HTMLCanvasElement;

            /**
             * A reference to the Canvas Rendering Context being used by the renderer.
             */
            context: CanvasRenderingContext2D;

            /**
             * A reference to the global Animations Manager.
             * 
             * In the default set-up you can access this from within a Scene via the `this.anims` property.
             */
            anims: Phaser.Animations.AnimationManager;

            /**
             * A reference to the global Cache. The Cache stores all files brought in to Phaser via
             * the Loader, with the exception of images. Images are stored in the Texture Manager.
             * 
             * In the default set-up you can access this from within a Scene via the `this.cache` property.
             */
            cache: Phaser.Cache.CacheManager;

            /**
             * A reference to the global Plugins Manager.
             * 
             * In the default set-up you can access this from within a Scene via the `this.plugins` property.
             */
            plugins: Phaser.Plugins.PluginManager;

            /**
             * A reference to the global registry. This is a game-wide instance of the Data Manager, allowing
             * you to exchange data between Scenes via a universal and shared point.
             * 
             * In the default set-up you can access this from within a Scene via the `this.registry` property.
             */
            registry: Phaser.Data.DataManager;

            /**
             * A reference to the global Scale Manager.
             * 
             * In the default set-up you can access this from within a Scene via the `this.scale` property.
             */
            scale: Phaser.Scale.ScaleManager;

            /**
             * A reference to the global Sound Manager.
             * 
             * In the default set-up you can access this from within a Scene via the `this.sound` property.
             */
            sound: Phaser.Sound.NoAudioSoundManager | Phaser.Sound.HTML5AudioSoundManager | Phaser.Sound.WebAudioSoundManager;

            /**
             * A reference to the global Texture Manager.
             * 
             * In the default set-up you can access this from within a Scene via the `this.textures` property.
             */
            textures: Phaser.Textures.TextureManager;

            /**
             * A reference to the Scene's Game Object Factory.
             * 
             * Use this to quickly and easily create new Game Objects.
             * 
             * In the default set-up you can access this from within a Scene via the `this.add` property.
             */
            add: Phaser.GameObjects.GameObjectFactory;

            /**
             * A reference to the Scene's Camera Manager.
             * 
             * Use this to manipulate and create Cameras for this specific Scene.
             * 
             * In the default set-up you can access this from within a Scene via the `this.cameras` property.
             */
            cameras: Phaser.Cameras.Scene2D.CameraManager;

            /**
             * A reference to the Scene's Display List.
             * 
             * Use this to organize the children contained in the display list.
             * 
             * In the default set-up you can access this from within a Scene via the `this.children` property.
             */
            displayList: Phaser.GameObjects.DisplayList;

            /**
             * A reference to the Scene's Event Manager.
             * 
             * Use this to listen for Scene specific events, such as `pause` and `shutdown`.
             * 
             * In the default set-up you can access this from within a Scene via the `this.events` property.
             */
            events: Phaser.Events.EventEmitter;

            /**
             * A reference to the Scene's Game Object Creator.
             * 
             * Use this to quickly and easily create new Game Objects. The difference between this and the
             * Game Object Factory, is that the Creator just creates and returns Game Object instances, it
             * doesn't then add them to the Display List or Update List.
             * 
             * In the default set-up you can access this from within a Scene via the `this.make` property.
             */
            make: Phaser.GameObjects.GameObjectCreator;

            /**
             * A reference to the Scene Manager Plugin.
             * 
             * Use this to manipulate both this and other Scenes in your game. For example, to launch a parallel Scene,
             * or pause or resume a Scene, or switch from this Scene to another.
             * 
             * In the default set-up you can access this from within a Scene via the `this.scene` property.
             */
            scenePlugin: Phaser.Scenes.ScenePlugin;

            /**
             * A reference to the Scene's Update List.
             * 
             * Use this to organize the children contained in the update list.
             * 
             * The Update List is responsible for managing children that need their `preUpdate` methods called,
             * in order to process internal components - such as Sprites with Animations.
             * 
             * In the default set-up there is no reference to this from within the Scene itself.
             */
            updateList: Phaser.GameObjects.UpdateList;

            /**
             * This method is called only once by the Scene Manager when the Scene is instantiated.
             * It is responsible for setting up all of the Scene plugins and references.
             * It should never be called directly.
             * @param game A reference to the Phaser Game instance.
             */
            protected init(game: Phaser.Game): void;

            /**
             * A single game step. Called automatically by the Scene Manager as a result of a Request Animation
             * Frame or Set Timeout call to the main Game instance.
             * @param time The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now().
             * @param delta The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class.
             */
            step(time: number, delta: number): void;

            /**
             * Called automatically by the Scene Manager.
             * Instructs the Scene to render itself via its Camera Manager to the renderer given.
             * @param renderer The renderer that invoked the render call.
             */
            render(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer): void;

            /**
             * Force a sort of the display list on the next render.
             */
            queueDepthSort(): void;

            /**
             * Immediately sorts the display list if the flag is set.
             */
            depthSort(): void;

            /**
             * Pause this Scene.
             * 
             * A paused Scene still renders, it just doesn't run any of its update handlers or systems.
             * @param data A data object that will be passed in the 'pause' event.
             * @returns This Systems object.
             */
            pause(data?: object): Phaser.Scenes.Systems;

            /**
             * Resume this Scene from a paused state.
             * 
             * Resuming a Scene sets its status back to RUNNING and marks it as active, allowing its
             * update loop to execute again. It has no effect if the Scene is not currently paused.
             * @param data A data object that will be passed in the 'resume' event.
             * @returns This Systems object.
             */
            resume(data?: object): Phaser.Scenes.Systems;

            /**
             * Send this Scene to sleep.
             * 
             * A sleeping Scene doesn't run its update step or render anything, but it also isn't shut down
             * or has any of its systems or children removed, meaning it can be re-activated at any point and
             * will carry on from where it left off. It also keeps everything in memory and events and callbacks
             * from other Scenes may still invoke changes within it, so be careful what is left active.
             * @param data A data object that will be passed in the 'sleep' event.
             * @returns This Systems object.
             */
            sleep(data?: object): Phaser.Scenes.Systems;

            /**
             * Wake this Scene if it was previously sent to sleep.
             * 
             * Waking a Scene sets its status back to RUNNING and marks it as both active and visible,
             * allowing its update loop to execute and its camera(s) to render again. Unlike `resume`,
             * which only restores the active flag, `wake` also restores visibility. If the Scene is
             * part of an ongoing transition, a `TRANSITION_WAKE` event is also emitted.
             * @param data A data object that will be passed in the 'wake' event.
             * @returns This Systems object.
             */
            wake(data?: object): Phaser.Scenes.Systems;

            /**
             * Returns any data that was sent to this Scene by another Scene.
             * 
             * The data is also passed to `Scene.init` and in various Scene events, but
             * you can access it at any point via this method.undefined
             * @returns The Scene Data.
             */
            getData(): any;

            /**
             * Returns the current status of this Scene.undefined
             * @returns The status of this Scene. One of the `Phaser.Scene` constants.
             */
            getStatus(): number;

            /**
             * Can this Scene receive Input events?undefined
             * @returns `true` if this Scene can receive Input events.
             */
            canInput(): boolean;

            /**
             * Is this Scene sleeping?undefined
             * @returns `true` if this Scene is asleep, otherwise `false`.
             */
            isSleeping(): boolean;

            /**
             * Is this Scene running?undefined
             * @returns `true` if this Scene is running, otherwise `false`.
             */
            isActive(): boolean;

            /**
             * Is this Scene paused?undefined
             * @returns `true` if this Scene is paused, otherwise `false`.
             */
            isPaused(): boolean;

            /**
             * Is this Scene currently transitioning out to, or in from another Scene?undefined
             * @returns `true` if this Scene is currently transitioning, otherwise `false`.
             */
            isTransitioning(): boolean;

            /**
             * Is this Scene currently transitioning out from itself to another Scene?undefined
             * @returns `true` if this Scene is in transition to another Scene, otherwise `false`.
             */
            isTransitionOut(): boolean;

            /**
             * Is this Scene currently transitioning in from another Scene?undefined
             * @returns `true` if this Scene is transitioning in from another Scene, otherwise `false`.
             */
            isTransitionIn(): boolean;

            /**
             * Is this Scene visible and rendering?undefined
             * @returns `true` if this Scene is visible, otherwise `false`.
             */
            isVisible(): boolean;

            /**
             * Sets the visible state of this Scene.
             * An invisible Scene will not render, but will still process updates.
             * @param value `true` to render this Scene, otherwise `false`.
             * @returns This Systems object.
             */
            setVisible(value: boolean): Phaser.Scenes.Systems;

            /**
             * Set the active state of this Scene.
             * 
             * An active Scene will run its core update loop.
             * @param value If `true` the Scene will be resumed, if previously paused. If `false` it will be paused.
             * @param data A data object that will be passed in the 'resume' or 'pause' events.
             * @returns This Systems object.
             */
            setActive(value: boolean, data?: object): Phaser.Scenes.Systems;

            /**
             * Start this Scene running and rendering.
             * Called automatically by the SceneManager.
             * @param data Optional data object that may have been passed to this Scene from another.
             */
            start(data: object): void;

            /**
             * Shutdown this Scene and send a shutdown event to all of its systems.
             * A Scene that has been shutdown will not run its update loop or render, but it does
             * not destroy any of its plugins or references. It is put into hibernation for later use.
             * If you don't ever plan to use this Scene again, then it should be destroyed instead
             * to free-up resources.
             * @param data A data object that will be passed in the 'shutdown' event.
             */
            shutdown(data?: object): void;

        }

        /**
         * Scene has been added to the Scene Manager but has not yet been started or initialized.
         */
        var PENDING: number;

        /**
         * Scene is currently being initialized by the Scene Manager. The init method is being called.
         */
        var INIT: number;

        /**
         * Scene is starting up. The create method has not yet been called.
         */
        var START: number;

        /**
         * Scene is loading assets via its Loader Plugin. The create method will be called after loading completes.
         */
        var LOADING: number;

        /**
         * Scene is executing its create method.
         */
        var CREATING: number;

        /**
         * Scene is fully running. Both the update and render methods are being called each frame.
         */
        var RUNNING: number;

        /**
         * Scene has been paused via the Scene Manager or Scene Plugin. The update method is not being called, but the scene is still rendering.
         */
        var PAUSED: number;

        /**
         * Scene has been put to sleep. Neither the update nor the render methods are being called, but the scene is not shut down.
         */
        var SLEEPING: number;

        /**
         * Scene is being shut down. All Game Objects and plugins belonging to it are being destroyed.
         */
        var SHUTDOWN: number;

        /**
         * Scene has been fully destroyed. It can no longer be started or used.
         */
        var DESTROYED: number;

        namespace Events {
            /**
             * The Game Object Added to Scene Event.
             * 
             * This event is dispatched when a Game Object is added to a Scene.
             * 
             * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.
             */
            const ADDED_TO_SCENE: string;

            /**
             * The Scene Systems Boot Event.
             * 
             * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.
             * 
             * Listen to it from a Scene using `this.events.on('boot', listener)`.
             */
            const BOOT: string;

            /**
             * The Scene Create Event.
             * 
             * This event is dispatched by a Scene after it has been created by the Scene Manager.
             * 
             * If a Scene has a `create` method then this event is emitted _after_ that has run.
             * 
             * If there is a transition, this event will be fired after the `TRANSITION_START` event.
             * 
             * Listen to it from a Scene using `this.events.on('create', listener)`.
             */
            const CREATE: string;

            /**
             * The Scene Systems Destroy Event.
             * 
             * This event is dispatched by a Scene during the Scene Systems destroy process.
             * 
             * Listen to it from a Scene using `this.events.on('destroy', listener)`.
             * 
             * You should destroy any resources that may be in use by your Scene in this event handler.
             */
            const DESTROY: string;

            /**
             * The Scene Systems Pause Event.
             * 
             * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an
             * action from another Scene.
             * 
             * Listen to it from a Scene using `this.events.on('pause', listener)`.
             */
            const PAUSE: string;

            /**
             * The Scene Systems Post Update Event.
             * 
             * This event is dispatched by a Scene during the main game loop step.
             * 
             * The event flow for a single step of a Scene is as follows:
             * 
             * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}
             * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}
             * 3. The `Scene.update` method is called, if it exists
             * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}
             * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}
             * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}
             * 
             * Listen to it from a Scene using `this.events.on('postupdate', listener)`.
             * 
             * A Scene will only run its step if it is active.
             */
            const POST_UPDATE: string;

            /**
             * The Scene Systems Pre-Render Event.
             * 
             * This event is dispatched by a Scene during the main game loop step.
             * 
             * The event flow for a single step of a Scene is as follows:
             * 
             * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}
             * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}
             * 3. The `Scene.update` method is called, if it exists
             * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}
             * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}
             * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}
             * 
             * Listen to this event from a Scene using `this.events.on('prerender', listener)`.
             * 
             * A Scene will only render if it is visible.
             * 
             * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.
             */
            const PRE_RENDER: string;

            /**
             * The Scene Systems Pre Update Event.
             * 
             * This event is dispatched by a Scene during the main game loop step.
             * 
             * The event flow for a single step of a Scene is as follows:
             * 
             * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}
             * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}
             * 3. The `Scene.update` method is called, if it exists
             * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}
             * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}
             * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}
             * 
             * Listen to it from a Scene using `this.events.on('preupdate', listener)`.
             * 
             * A Scene will only run its step if it is active.
             */
            const PRE_UPDATE: string;

            /**
             * The Scene Systems Ready Event.
             * 
             * This event is dispatched by a Scene during the Scene Systems start process.
             * By this point in the process the Scene is now fully active and rendering.
             * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.
             * 
             * Listen to it from a Scene using `this.events.on('ready', listener)`.
             */
            const READY: string;

            /**
             * The Game Object Removed from Scene Event.
             * 
             * This event is dispatched when a Game Object is removed from a Scene.
             * 
             * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.
             */
            const REMOVED_FROM_SCENE: string;

            /**
             * The Scene Systems Render Event.
             * 
             * This event is dispatched by a Scene during the main game loop step.
             * 
             * The event flow for a single step of a Scene is as follows:
             * 
             * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}
             * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}
             * 3. The `Scene.update` method is called, if it exists
             * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}
             * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}
             * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}
             * 
             * Listen to it from a Scene using `this.events.on('render', listener)`.
             * 
             * A Scene will only render if it is visible.
             * 
             * By the time this event is dispatched, the Scene will have already been rendered.
             */
            const RENDER: string;

            /**
             * The Scene Systems Resume Event.
             * 
             * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,
             * or as an action from another Scene.
             * 
             * Listen to it from a Scene using `this.events.on('resume', listener)`.
             */
            const RESUME: string;

            /**
             * The Scene Systems Shutdown Event.
             * 
             * This event is dispatched by a Scene during the Scene Systems shutdown process.
             * 
             * Listen to it from a Scene using `this.events.on('shutdown', listener)`.
             * 
             * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding
             * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not
             * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.
             */
            const SHUTDOWN: string;

            /**
             * The Scene Systems Sleep Event.
             * 
             * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,
             * or as an action from another Scene.
             * 
             * Listen to it from a Scene using `this.events.on('sleep', listener)`.
             */
            const SLEEP: string;

            /**
             * The Scene Systems Start Event.
             * 
             * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.
             * 
             * Listen to it from a Scene using `this.events.on('start', listener)`.
             */
            const START: string;

            /**
             * The Scene Transition Complete Event.
             * 
             * This event is dispatched by the Target Scene of a transition.
             * 
             * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration
             * of the transition.
             * 
             * Listen to it from a Scene using `this.events.on('transitioncomplete', listener)`.
             * 
             * The Scene Transition event flow is as follows:
             * 
             * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.
             * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
             * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
             * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
             * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
             */
            const TRANSITION_COMPLETE: string;

            /**
             * The Scene Transition Init Event.
             * 
             * This event is dispatched by the Target Scene of a transition.
             * 
             * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,
             * this event is not dispatched.
             * 
             * Listen to it from a Scene using `this.events.on('transitioninit', listener)`.
             * 
             * The Scene Transition event flow is as follows:
             * 
             * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.
             * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
             * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
             * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
             * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
             */
            const TRANSITION_INIT: string;

            /**
             * The Scene Transition Out Event.
             * 
             * This event is dispatched by a Scene when it initiates a transition to another Scene.
             * 
             * Listen to it from a Scene using `this.events.on('transitionout', listener)`.
             * 
             * The Scene Transition event flow is as follows:
             * 
             * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.
             * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
             * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
             * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
             * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
             */
            const TRANSITION_OUT: string;

            /**
             * The Scene Transition Start Event.
             * 
             * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.
             * 
             * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,
             * this event is dispatched anyway.
             * 
             * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is
             * dispatched instead of this event.
             * 
             * Listen to it from a Scene using `this.events.on('transitionstart', listener)`.
             * 
             * The Scene Transition event flow is as follows:
             * 
             * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.
             * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
             * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
             * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
             * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
             */
            const TRANSITION_START: string;

            /**
             * The Scene Transition Wake Event.
             * 
             * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before
             * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.
             * 
             * Listen to it from a Scene using `this.events.on('transitionwake', listener)`.
             * 
             * The Scene Transition event flow is as follows:
             * 
             * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.
             * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.
             * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...
             * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.
             * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.
             */
            const TRANSITION_WAKE: string;

            /**
             * The Scene Systems Update Event.
             * 
             * This event is dispatched by a Scene during the main game loop step.
             * 
             * The event flow for a single step of a Scene is as follows:
             * 
             * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}
             * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}
             * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped.
             * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}
             * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}
             * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}
             * 
             * Listen to it from a Scene using `this.events.on('update', listener)`.
             * 
             * A Scene will only run its step if it is active.
             */
            const UPDATE: string;

            /**
             * The Scene Systems Wake Event.
             * 
             * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,
             * or as an action from another Scene.
             * 
             * Listen to it from a Scene using `this.events.on('wake', listener)`.
             */
            const WAKE: string;

        }

    }

    namespace Sound {
        /**
         * Base class containing all the shared state and behavior of a sound object, independent
         * of the audio implementation (Web Audio or HTML5 Audio). Manages playback state (play,
         * pause, stop, seek), looping, volume, rate, detune, markers for playing sub-sections
         * of audio, and event emission for playback lifecycle changes.
         */
        class BaseSound extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param manager Reference to the current sound manager instance.
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings.
             */
            constructor(manager: Phaser.Sound.BaseSoundManager, key: string, config?: Phaser.Types.Sound.SoundConfig);

            /**
             * Local reference to the sound manager.
             */
            manager: Phaser.Sound.BaseSoundManager;

            /**
             * Asset key for the sound.
             */
            readonly key: string;

            /**
             * Flag indicating if sound is currently playing.
             */
            readonly isPlaying: boolean;

            /**
             * Flag indicating if sound is currently paused.
             */
            readonly isPaused: boolean;

            /**
             * A property that holds the value of sound's actual playback rate,
             * after its rate and detune values have been combined with global
             * rate and detune values.
             */
            readonly totalRate: number;

            /**
             * A value representing the duration, in seconds.
             * It could be total sound duration or a marker duration.
             */
            readonly duration: number;

            /**
             * The total duration of the sound in seconds.
             */
            readonly totalDuration: number;

            /**
             * Object containing markers definitions.
             */
            readonly markers: {[key: string]:  Phaser.Types.Sound.SoundMarker};

            /**
             * Currently playing marker.
             * 'null' if whole sound is playing.
             */
            readonly currentMarker: Phaser.Types.Sound.SoundMarker;

            /**
             * Flag indicating if destroy method was called on this sound.
             */
            pendingRemove: boolean;

            /**
             * Adds a marker into the current sound. A marker is represented by name, start time, duration, and optionally config object.
             * This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.
             * @param marker Marker object.
             * @returns Whether the marker was added successfully.
             */
            addMarker(marker: Phaser.Types.Sound.SoundMarker): boolean;

            /**
             * Updates a previously added marker with new values from the provided marker object.
             * @param marker Marker object with updated values.
             * @returns Whether the marker was updated successfully.
             */
            updateMarker(marker: Phaser.Types.Sound.SoundMarker): boolean;

            /**
             * Removes a marker from the sound.
             * @param markerName The name of the marker to remove.
             * @returns Removed marker object or 'null' if there was no marker with provided name.
             */
            removeMarker(markerName: string): Phaser.Types.Sound.SoundMarker | null;

            /**
             * Play this sound, or a marked section of it.
             * 
             * It always plays the sound from the start. If you want to start playback from a specific time
             * you can set 'seek' setting of the config object, provided to this call, to that value.
             * @param markerName If you want to play a marker then provide the marker name here. Alternatively, this parameter can be a SoundConfig object. Default ''.
             * @param config Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.
             * @returns Whether the sound started playing successfully.
             */
            play(markerName?: string | Phaser.Types.Sound.SoundConfig, config?: Phaser.Types.Sound.SoundConfig): boolean;

            /**
             * Pauses the sound. This only works if the sound is currently playing.
             * 
             * You can inspect the `isPlaying` and `isPaused` properties to check the state.undefined
             * @returns Whether the sound was paused successfully.
             */
            pause(): boolean;

            /**
             * Resumes the sound. This only works if the sound is paused and not already playing.
             * 
             * You can inspect the `isPlaying` and `isPaused` properties to check the state.undefined
             * @returns Whether the sound was resumed successfully.
             */
            resume(): boolean;

            /**
             * Stop playing this sound.undefined
             * @returns Whether the sound was stopped successfully.
             */
            stop(): boolean;

            /**
             * Method used internally for applying config values to some of the sound properties.
             */
            applyConfig(): void;

            /**
             * Method used internally for resetting values of some of the config properties.
             */
            resetConfig(): void;

            /**
             * Update method called automatically by sound manager on every game step.
             * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
             * @param delta The delta time elapsed since the last frame.
             */
            update(time: number, delta: number): void;

            /**
             * Method used internally to calculate total playback rate of the sound.
             */
            calculateRate(): void;

            /**
             * Destroys this sound and all associated events and marks it for removal from the sound manager.
             */
            destroy(): void;

        }

        /**
         * Base class for the Web Audio and HTML5 Audio Sound Manager implementations.
         * It manages a collection of sound instances, handles global volume, mute, rate,
         * and detune settings, provides spatial audio listener positioning (Web Audio only),
         * and coordinates with the game lifecycle for pausing and resuming audio when the
         * game loses or regains focus.
         */
        class BaseSoundManager extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param game Reference to the current game instance.
             */
            constructor(game: Phaser.Game);

            /**
             * Local reference to game.
             */
            readonly game: Phaser.Game;

            /**
             * Local reference to the JSON Cache, as used by Audio Sprites.
             */
            readonly jsonCache: Phaser.Cache.BaseCache;

            /**
             * Global mute setting.
             */
            mute: boolean;

            /**
             * Global volume setting.
             */
            volume: number;

            /**
             * Flag indicating if sounds should be paused when game loses focus,
             * for instance when user switches to another tab/program/app.
             */
            pauseOnBlur: boolean;

            /**
             * Mobile devices require sounds to be triggered from an explicit user action,
             * such as a tap, before any sound can be loaded/played on a web page.
             * Set to true if the audio system is currently locked awaiting user interaction.
             */
            readonly locked: boolean;

            /**
             * Flag used to track if the game has lost focus.
             */
            gameLostFocus: boolean;

            /**
             * The Spatial Audio listener position.
             * 
             * Only available with WebAudio.
             * 
             * You can modify the x/y properties of this Vec2 directly to
             * adjust the listener position within the game world.
             */
            listenerPosition: Phaser.Math.Vector2;

            /**
             * Adds a new sound into the sound manager.
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings.
             * @returns The new sound instance.
             */
            add(key: string, config?: Phaser.Types.Sound.SoundConfig): Phaser.Sound.BaseSound;

            /**
             * Adds a new audio sprite sound into the sound manager.
             * Audio Sprites are a combination of audio files and a JSON configuration.
             * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings.
             * @returns The new audio sprite sound instance.
             */
            addAudioSprite(key: string, config?: Phaser.Types.Sound.SoundConfig): Phaser.Sound.NoAudioSound | Phaser.Sound.HTML5AudioSound | Phaser.Sound.WebAudioSound;

            /**
             * Gets the first sound in this Sound Manager that matches the given key.
             * If none can be found it returns `null`.
             * @param key Sound asset key.
             * @returns - The sound, or null.
             */
            get<T extends Phaser.Sound.BaseSound>(key: string): T;

            /**
             * Gets all sounds in this Sound Manager.
             * 
             * You can optionally specify a key, in which case only Sound instances that match the given key
             * will be returned.
             * @param key Optional asset key. If given, only Sound instances with this key will be returned.
             * @returns - The sounds, or an empty array.
             */
            getAll<T extends Phaser.Sound.BaseSound>(key?: string): T[];

            /**
             * Returns all sounds from this Sound Manager that are currently
             * playing. That is, Sound instances that have their `isPlaying`
             * property set to `true`.undefined
             * @returns - All currently playing sounds, or an empty array.
             */
            getAllPlaying<T extends Phaser.Sound.BaseSound>(): T[];

            /**
             * Adds a new sound to the sound manager and plays it.
             * 
             * The sound will be automatically removed (destroyed) once playback ends.
             * 
             * This lets you play a new sound on the fly without the need to keep a reference to it.
             * @param key Asset key for the sound.
             * @param extra An optional additional object containing settings to be applied to the sound. It could be either config or marker object.
             * @returns Whether the sound started playing successfully.
             */
            play(key: string, extra?: Phaser.Types.Sound.SoundConfig | Phaser.Types.Sound.SoundMarker): boolean;

            /**
             * Adds a new audio sprite sound to the sound manager and plays it.
             * The sprite will be automatically removed (destroyed) once playback ends.
             * This lets you play a new sound on the fly without the need to keep a reference to it.
             * @param key Asset key for the sound.
             * @param spriteName The name of the sound sprite to play.
             * @param config An optional config object containing default sound settings.
             * @returns Whether the audio sprite sound started playing successfully.
             */
            playAudioSprite(key: string, spriteName: string, config?: Phaser.Types.Sound.SoundConfig): boolean;

            /**
             * Removes a sound from the sound manager.
             * The removed sound is destroyed before removal.
             * @param sound The sound object to remove.
             * @returns True if the sound was removed successfully, otherwise false.
             */
            remove(sound: Phaser.Sound.BaseSound): boolean;

            /**
             * Removes all sounds from the manager, destroying the sounds.
             */
            removeAll(): void;

            /**
             * Removes all sounds from the sound manager that have an asset key matching the given value.
             * The removed sounds are destroyed before removal.
             * @param key The key to match when removing sound objects.
             * @returns The number of matching sound objects that were removed.
             */
            removeByKey(key: string): number;

            /**
             * Pauses all the sounds in the game.
             */
            pauseAll(): void;

            /**
             * Resumes all the sounds in the game.
             */
            resumeAll(): void;

            /**
             * Sets the X and Y position of the Spatial Audio listener on this Web Audio context.
             * 
             * If you call this method with no parameters it will default to the center-point of
             * the game canvas. Depending on the type of game you're making, you may need to call
             * this method constantly to reset the listener position as the camera scrolls.
             * 
             * Calling this method does nothing on HTML5Audio.
             * @param x The x position of the Spatial Audio listener.
             * @param y The y position of the Spatial Audio listener.
             */
            setListenerPosition(x?: number, y?: number): void;

            /**
             * Stops all the sounds in the game.
             */
            stopAll(): void;

            /**
             * Stops any sounds matching the given key.
             * @param key Sound asset key.
             * @returns - How many sounds were stopped.
             */
            stopByKey(key: string): number;

            /**
             * When a key is given, returns true if any sound with that key is playing.
             * 
             * When no key is given, returns true if any sound is playing.
             * @param key Sound asset key.
             * @returns - Per the key argument, true if any matching sound is playing, otherwise false.
             */
            isPlaying(key: string | undefined): boolean;

            /**
             * Method used internally for unlocking audio playback on devices that
             * require user interaction before any sound can be played on a web page.
             * 
             * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).
             */
            protected unlock(): void;

            /**
             * Method used internally for pausing sound manager if
             * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.
             */
            protected onBlur(): void;

            /**
             * Method used internally for resuming sound manager if
             * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.
             */
            protected onFocus(): void;

            /**
             * Update method called on every game step.
             * Removes destroyed sounds and updates every active sound in the game.
             * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
             * @param delta The delta time elapsed since the last frame.
             */
            protected update(time: number, delta: number): void;

            /**
             * Destroys all the sounds in the game and all associated events.
             */
            destroy(): void;

            /**
             * Sets the global playback rate at which all the sounds will be played.
             * 
             * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
             * and 2.0 doubles the audios playback speed.
             * @param value Global playback rate at which all the sounds will be played.
             * @returns This Sound Manager.
             */
            setRate(value: number): this;

            /**
             * Global playback rate at which all the sounds will be played.
             * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
             * and 2.0 doubles the audio's playback speed.
             */
            rate: number;

            /**
             * Sets the global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
             * The range of the value is -1200 to 1200, but we recommend keeping it within a reasonable range for musical purposes.
             * @param value The detuning value in cents. The range is -1200 to 1200, but we recommend keeping it within a reasonable range for musical purposes.
             * @returns This Sound Manager.
             */
            setDetune(value: number): this;

            /**
             * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
             * The range of the value is -1200 to 1200, but we recommend keeping it within a reasonable range for musical purposes.
             */
            detune: number;

        }

        /**
         * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings.
         * 
         * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
         */
        namespace SoundManagerCreator {
            /**
             * Determines the most appropriate Sound Manager to use based on the game configuration
             * and the audio capabilities of the current device, then creates and returns an instance
             * of it.
             * 
             * If the game config has `audio.noAudio` set to `true`, or if the device supports neither
             * Web Audio nor HTML5 Audio, a `NoAudioSoundManager` is returned, which silently stubs all
             * sound calls. If Web Audio is supported and not explicitly disabled via
             * `audio.disableWebAudio`, a `WebAudioSoundManager` is returned. Otherwise, an
             * `HTML5AudioSoundManager` is returned as a fallback.
             * 
             * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
             * @param game Reference to the current game instance.
             * @returns The Sound Manager instance that was created.
             */
            function create(game: Phaser.Game): Phaser.Sound.HTML5AudioSoundManager | Phaser.Sound.WebAudioSoundManager | Phaser.Sound.NoAudioSoundManager;

        }

        namespace Events {
            /**
             * The Sound Complete Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they complete playback.
             * 
             * Listen to it from a Sound instance using `Sound.on('complete', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('complete', listener);
             * music.play();
             * ```
             */
            const COMPLETE: string;

            /**
             * The Audio Data Decoded All Event.
             * 
             * This event is dispatched by the Web Audio Sound Manager as a result of calling the `decodeAudio` method,
             * once all files passed to the method have been decoded (or errored).
             * 
             * Use `Phaser.Sound.Events#DECODED` to listen for single sounds being decoded, and `DECODED_ALL` to
             * listen for them all completing.
             * 
             * Listen to it from the Sound Manager in a Scene using `this.sound.on('decodedall', listener)`, i.e.:
             * 
             * ```javascript
             * this.sound.once('decodedall', handler);
             * this.sound.decodeAudio([ audioFiles ]);
             * ```
             */
            const DECODED_ALL: string;

            /**
             * The Audio Data Decoded Event.
             * 
             * This event is dispatched by the Web Audio Sound Manager as a result of calling the `decodeAudio` method.
             * 
             * Listen to it from the Sound Manager in a Scene using `this.sound.on('decoded', listener)`, i.e.:
             * 
             * ```javascript
             * this.sound.on('decoded', handler);
             * this.sound.decodeAudio(key, audioData);
             * ```
             */
            const DECODED: string;

            /**
             * The Sound Destroy Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are destroyed, either
             * directly or via a Sound Manager.
             * 
             * Listen to it from a Sound instance using `Sound.on('destroy', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('destroy', listener);
             * music.destroy();
             * ```
             */
            const DESTROY: string;

            /**
             * The Sound Detune Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their detune value changes.
             * 
             * Listen to it from a Sound instance using `Sound.on('detune', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('detune', listener);
             * music.play();
             * music.setDetune(200);
             * ```
             */
            const DETUNE: string;

            /**
             * The Sound Manager Global Detune Event.
             * 
             * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,
             * or the HTML5 Audio Manager. It is dispatched when the `detune` property of the Sound Manager is changed, which globally
             * adjusts the detuning of all active sounds.
             * 
             * Listen to it from a Scene using: `this.sound.on('detune', listener)`.
             */
            const GLOBAL_DETUNE: string;

            /**
             * The Sound Manager Global Mute Event.
             * 
             * This event is dispatched by the Sound Manager when its `mute` property is changed, either directly
             * or via the `setMute` method. This changes the mute state of all active sounds.
             * 
             * Listen to it from a Scene using: `this.sound.on('mute', listener)`.
             */
            const GLOBAL_MUTE: string;

            /**
             * The Sound Manager Global Rate Event.
             * 
             * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,
             * or the HTML5 Audio Manager. It is dispatched when the `rate` property of the Sound Manager is changed, which globally
             * adjusts the playback rate of all active sounds.
             * 
             * Listen to it from a Scene using: `this.sound.on('rate', listener)`.
             */
            const GLOBAL_RATE: string;

            /**
             * The Sound Manager Global Volume Event.
             * 
             * This event is dispatched by the Sound Manager when its `volume` property is changed, either directly
             * or via the `setVolume` method. This changes the volume of all active sounds.
             * 
             * Listen to it from a Scene using: `this.sound.on('volume', listener)`.
             */
            const GLOBAL_VOLUME: string;

            /**
             * The Sound Looped Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they loop during playback.
             * 
             * Listen to it from a Sound instance using `Sound.on('looped', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('looped', listener);
             * music.setLoop(true);
             * music.play();
             * ```
             * 
             * This is not to be confused with the [LOOP]{@linkcode Phaser.Sound.Events#event:LOOP} event, which only emits when the loop state of a Sound is changed.
             */
            const LOOPED: string;

            /**
             * The Sound Loop Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their loop state is changed.
             * 
             * Listen to it from a Sound instance using `Sound.on('loop', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('loop', listener);
             * music.setLoop(true);
             * ```
             * 
             * This is not to be confused with the [LOOPED]{@linkcode Phaser.Sound.Events#event:LOOPED} event, which emits each time a Sound loops during playback.
             */
            const LOOP: string;

            /**
             * The Sound Mute Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their mute state changes.
             * 
             * Listen to it from a Sound instance using `Sound.on('mute', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('mute', listener);
             * music.play();
             * music.setMute(true);
             * ```
             */
            const MUTE: string;

            /**
             * The Sound Pan Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their pan changes.
             * 
             * Listen to it from a Sound instance using `Sound.on('pan', listener)`, i.e.:
             * 
             * ```javascript
             * var sound = this.sound.add('key');
             * sound.on('pan', listener);
             * sound.play();
             * sound.setPan(0.5);
             * ```
             */
            const PAN: string;

            /**
             * The Pause All Sounds Event.
             * 
             * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,
             * or the HTML5 Audio Manager. It is dispatched when the `pauseAll` method is invoked and after all current Sounds
             * have been paused.
             * 
             * Listen to it from a Scene using: `this.sound.on('pauseall', listener)`.
             */
            const PAUSE_ALL: string;

            /**
             * The Sound Pause Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are paused.
             * 
             * Listen to it from a Sound instance using `Sound.on('pause', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('pause', listener);
             * music.play();
             * music.pause();
             * ```
             */
            const PAUSE: string;

            /**
             * The Sound Play Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are played.
             * 
             * Listen to it from a Sound instance using `Sound.on('play', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('play', listener);
             * music.play();
             * ```
             */
            const PLAY: string;

            /**
             * The Sound Rate Change Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their rate changes.
             * 
             * Listen to it from a Sound instance using `Sound.on('rate', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('rate', listener);
             * music.play();
             * music.setRate(0.5);
             * ```
             */
            const RATE: string;

            /**
             * The Resume All Sounds Event.
             * 
             * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,
             * or the HTML5 Audio Manager. It is dispatched when the `resumeAll` method is invoked and after all current Sounds
             * have been resumed.
             * 
             * Listen to it from a Scene using: `this.sound.on('resumeall', listener)`.
             */
            const RESUME_ALL: string;

            /**
             * The Sound Resume Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are resumed from a paused state.
             * 
             * Listen to it from a Sound instance using `Sound.on('resume', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('resume', listener);
             * music.play();
             * music.pause();
             * music.resume();
             * ```
             */
            const RESUME: string;

            /**
             * The Sound Seek Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are seeked to a new position.
             * 
             * Listen to it from a Sound instance using `Sound.on('seek', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('seek', listener);
             * music.play();
             * music.setSeek(5000);
             * ```
             */
            const SEEK: string;

            /**
             * The Stop All Sounds Event.
             * 
             * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,
             * or the HTML5 Audio Manager. It is dispatched when the `stopAll` method is invoked and after all current Sounds
             * have been stopped.
             * 
             * Listen to it from a Scene using: `this.sound.on('stopall', listener)`.
             */
            const STOP_ALL: string;

            /**
             * The Sound Stop Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are stopped.
             * 
             * Listen to it from a Sound instance using `Sound.on('stop', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('stop', listener);
             * music.play();
             * music.stop();
             * ```
             */
            const STOP: string;

            /**
             * The Sound Manager Unlocked Event.
             * 
             * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,
             * or the HTML5 Audio Manager. It is dispatched during the update loop when the Sound Manager becomes unlocked. For
             * Web Audio this is on the first user gesture on the page.
             * 
             * Listen to it from a Scene using: `this.sound.on('unlocked', listener)`.
             */
            const UNLOCKED: string;

            /**
             * The Sound Volume Event.
             * 
             * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their volume changes.
             * 
             * Listen to it from a Sound instance using `Sound.on('volume', listener)`, i.e.:
             * 
             * ```javascript
             * var music = this.sound.add('key');
             * music.on('volume', listener);
             * music.play();
             * music.setVolume(0.5);
             * ```
             */
            const VOLUME: string;

        }

        /**
         * HTML5AudioSound is the HTML5 Audio API implementation of a sound within Phaser.
         * 
         * It is used automatically by the HTML5AudioSoundManager when the Web Audio API is unavailable,
         * typically in environments that do not support it or where it has been disabled. Unlike the
         * WebAudioSound class, HTML5AudioSound relies on native `<audio>` elements for playback, which
         * means it has more limited capabilities, such as no support for audio panning.
         * 
         * Each sound maintains a pool of `HTMLAudioElement` tags loaded via `Loader.audio`. Because HTML5
         * Audio cannot share a single element across simultaneous playbacks, you must load multiple
         * instances of the asset if you want to play the same sound more than once at the same time.
         * 
         * You do not create instances of this class directly. Instead, use
         * `this.sound.add(key)` from within a Scene, which will return the correct sound type based on
         * the audio system in use.
         */
        class HTML5AudioSound extends Phaser.Sound.BaseSound {
            /**
             * 
             * @param manager Reference to the current sound manager instance.
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings. Default {}.
             */
            constructor(manager: Phaser.Sound.HTML5AudioSoundManager, key: string, config?: Phaser.Types.Sound.SoundConfig);

            /**
             * An array containing all HTML5 Audio tags that could be used for individual
             * sound playback. Number of instances depends on the config value passed
             * to the `Loader#audio` method call, default is 1.
             */
            tags: HTMLAudioElement[];

            /**
             * Reference to an HTML5 Audio tag used for playing sound.
             */
            audio: HTMLAudioElement;

            /**
             * Timestamp as generated by the Request Animation Frame or SetTimeout
             * representing the time at which the delayed sound playback should start.
             * Set to 0 if sound playback is not delayed.
             */
            startTime: number;

            /**
             * Audio tag's playback position recorded on previous
             * update method call. Set to 0 if sound is not playing.
             */
            previousTime: number;

            /**
             * Play this sound, or a marked section of it.
             * 
             * It always plays the sound from the start. If you want to start playback from a specific time
             * you can set 'seek' setting of the config object, provided to this call, to that value.
             * 
             * If you want to play the same sound simultaneously, then you need to create another instance
             * of it and play that Sound. For HTML5 Audio this also requires creating multiple audio instances
             * when loading the audio files.
             * @param markerName If you want to play a marker then provide the marker name here. Alternatively, this parameter can be a SoundConfig object. Default ''.
             * @param config Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.
             * @returns Whether the sound started playing successfully.
             */
            play(markerName?: string | Phaser.Types.Sound.SoundConfig, config?: Phaser.Types.Sound.SoundConfig): boolean;

            /**
             * Pauses the sound.undefined
             * @returns Whether the sound was paused successfully.
             */
            pause(): boolean;

            /**
             * Resumes the sound.undefined
             * @returns Whether the sound was resumed successfully.
             */
            resume(): boolean;

            /**
             * Stop playing this sound.undefined
             * @returns Whether the sound was stopped successfully.
             */
            stop(): boolean;

            /**
             * This method is used internally to pick and play the next available audio tag.undefined
             * @returns Whether the sound was assigned an audio tag successfully.
             */
            pickAndPlayAudioTag(): boolean;

            /**
             * This method performs the audio tag pooling logic. It first looks for
             * unused audio tag to assign to this sound object. If there are no unused
             * audio tags, based on HTML5AudioSoundManager#override property value, it
             * looks for sound with most advanced playback and hijacks its audio tag or
             * does nothing.undefined
             * @returns Whether the sound was assigned an audio tag successfully.
             */
            pickAudioTag(): boolean;

            /**
             * Method used for playing audio tag and catching possible exceptions
             * thrown from rejected Promise returned from play method call.
             */
            playCatchPromise(): void;

            /**
             * This method is used internally to stop and release the current audio tag.
             */
            stopAndReleaseAudioTag(): void;

            /**
             * Method used internally to reset sound state, usually when stopping sound
             * or when hijacking audio tag from another sound.
             */
            reset(): void;

            /**
             * Method used internally by sound manager for pausing sound if
             * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.
             */
            onBlur(): void;

            /**
             * Method used internally by sound manager for resuming sound if
             * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.
             */
            onFocus(): void;

            /**
             * Update method called automatically by sound manager on every game step.
             * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
             */
            update(time: number): void;

            /**
             * Calls Phaser.Sound.BaseSound#destroy method
             * and cleans up all HTML5 Audio related resources.
             */
            destroy(): void;

            /**
             * This method is used internally to update the mute setting of this sound.
             */
            updateMute(): void;

            /**
             * This method is used internally to update the volume of this sound.
             */
            updateVolume(): void;

            /**
             * This method is used internally to update the playback rate of this sound.
             */
            calculateRate(): void;

            /**
             * Boolean indicating whether the sound is muted or not.
             * Gets or sets the muted state of this sound.
             */
            mute: boolean;

            /**
             * Sets the muted state of this Sound.
             * @param value `true` to mute this sound, `false` to unmute it.
             * @returns This Sound instance.
             */
            setMute(value: boolean): this;

            /**
             * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).
             */
            volume: number;

            /**
             * Sets the volume of this Sound.
             * @param value The volume of the sound. A value between 0 (silence) and 1 (full volume).
             * @returns This Sound instance.
             */
            setVolume(value: number): this;

            /**
             * Rate at which this Sound will be played.
             * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
             * and 2.0 doubles the audio's playback speed.
             */
            rate: number;

            /**
             * Sets the playback rate of this Sound.
             * 
             * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
             * and 2.0 doubles the audio's playback speed.
             * @param value The playback rate of this Sound.
             * @returns This Sound instance.
             */
            setRate(value: number): this;

            /**
             * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
             * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
             */
            detune: number;

            /**
             * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
             * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
             * @param value The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
             * @returns This Sound instance.
             */
            setDetune(value: number): this;

            /**
             * Property representing the position of playback for this sound, in seconds.
             * Setting it to a specific value moves current playback to that position.
             * The value given is clamped to the range 0 to current marker duration.
             * Setting seek of a stopped sound has no effect.
             */
            seek: number;

            /**
             * Seeks to a specific point in this sound.
             * @param value The point in the sound to seek to, in seconds.
             * @returns This Sound instance.
             */
            setSeek(value: number): this;

            /**
             * Flag indicating whether or not the sound or current sound marker will loop.
             */
            loop: boolean;

            /**
             * Sets the loop state of this Sound.
             * @param value `true` to loop this sound, `false` to not loop it.
             * @returns This Sound instance.
             */
            setLoop(value: boolean): Phaser.Sound.HTML5AudioSound;

            /**
             * Gets or sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).
             * 
             * Has no audible effect on HTML5 Audio Sound, but still generates the PAN Event.
             */
            pan: number;

            /**
             * Sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).
             * 
             * Has no audible effect on HTML5 Audio Sound, but still generates the PAN Event.
             * @param value The pan of the sound. A value between -1 (full left pan) and 1 (full right pan).
             * @returns This Sound instance.
             */
            setPan(value: number): this;

        }

        /**
         * HTML5AudioSoundManager
         */
        class HTML5AudioSoundManager extends Phaser.Sound.BaseSoundManager {
            /**
             * 
             * @param game Reference to the current game instance.
             */
            constructor(game: Phaser.Game);

            /**
             * Flag indicating whether if there are no idle instances of HTML5 Audio tag,
             * for any particular sound, if one of the used tags should be hijacked and used
             * for succeeding playback or if succeeding Phaser.Sound.HTML5AudioSound#play
             * call should be ignored.
             */
            override: boolean;

            /**
             * Value representing time difference, in seconds, between calling
             * play method on an audio tag and when it actually starts playing.
             * It is used to achieve more accurate delayed sound playback.
             * 
             * You might need to tweak this value to get the desired results
             * since audio play delay varies depending on the browser/platform.
             */
            audioPlayDelay: number;

            /**
             * A value by which we should offset the loop end marker of the
             * looping sound to compensate for lag, caused by changing audio
             * tag playback position, in order to achieve gapless looping.
             * 
             * You might need to tweak this value to get the desired results
             * since loop lag varies depending on the browser/platform.
             */
            loopEndOffset: number;

            /**
             * Adds a new sound into the sound manager.
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings.
             * @returns The new sound instance.
             */
            add(key: string, config?: Phaser.Types.Sound.SoundConfig): Phaser.Sound.HTML5AudioSound;

            /**
             * Unlocks HTML5 Audio loading and playback on mobile
             * devices on the initial explicit user interaction.
             */
            unlock(): void;

            /**
             * Method used internally for pausing sound manager if
             * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.
             */
            protected onBlur(): void;

            /**
             * Method used internally for resuming sound manager if
             * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.
             */
            protected onFocus(): void;

            /**
             * Calls Phaser.Sound.BaseSoundManager#destroy method
             * and cleans up all HTML5 Audio related resources.
             */
            destroy(): void;

            /**
             * Method used internally by Phaser.Sound.HTML5AudioSound class methods and property setters
             * to check if sound manager is locked and then either perform action immediately or queue it
             * to be performed once the sound manager gets unlocked.
             * @param sound Sound object on which to perform queued action.
             * @param prop Name of the method to be called or property to be assigned a value to.
             * @param value An optional parameter that either holds an array of arguments to be passed to the method call or value to be set to the property.
             * @returns Whether the sound manager is locked.
             */
            protected isLocked(sound: Phaser.Sound.HTML5AudioSound, prop: string, value?: any): boolean;

            /**
             * Sets the muted state of this Sound Manager.
             * @param value `true` to mute all sounds, `false` to unmute them.
             * @returns This Sound Manager.
             */
            setMute(value: boolean): Phaser.Sound.HTML5AudioSoundManager;

            /**
             * Gets or sets the muted state of this Sound Manager. Setting this to `true` mutes all
             * active sounds, while setting it to `false` restores their volume. Fires the
             * `GLOBAL_MUTE` event when changed.
             */
            mute: boolean;

            /**
             * Sets the volume of this Sound Manager.
             * @param value The global volume of this Sound Manager.
             * @returns This Sound Manager.
             */
            setVolume(value: number): Phaser.Sound.HTML5AudioSoundManager;

            /**
             * Gets or sets the global volume of this Sound Manager. All active sounds will have their
             * volume scaled by this value. Must be between 0 (silent) and 1 (full volume). Fires the
             * `GLOBAL_VOLUME` event when changed.
             */
            volume: number;

        }

        /**
         * No audio implementation of the sound. It is used if audio has been
         * disabled in the game config or the device doesn't support any audio.
         * 
         * It represents a graceful degradation of sound logic that provides
         * minimal functionality and prevents Phaser projects that use audio from
         * breaking on devices that don't support any audio playback technologies.
         */
        class NoAudioSound extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param manager Reference to the current sound manager instance.
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings. Default {}.
             */
            constructor(manager: Phaser.Sound.NoAudioSoundManager, key: string, config?: Phaser.Types.Sound.SoundConfig);

            /**
             * Local reference to the sound manager.
             */
            manager: Phaser.Sound.BaseSoundManager;

            /**
             * Asset key for the sound.
             */
            readonly key: string;

            /**
             * Flag indicating if sound is currently playing.
             */
            readonly isPlaying: boolean;

            /**
             * Flag indicating if sound is currently paused.
             */
            readonly isPaused: boolean;

            /**
             * A property that holds the value of sound's actual playback rate,
             * after its rate and detune values has been combined with global
             * rate and detune values.
             */
            readonly totalRate: number;

            /**
             * A value representing the duration, in seconds.
             * It could be total sound duration or a marker duration.
             */
            readonly duration: number;

            /**
             * The total duration of the sound in seconds.
             */
            readonly totalDuration: number;

            /**
             * A config object used to store default sound settings' values.
             * Default values will be set by properties' setters.
             */
            config: Phaser.Types.Sound.SoundConfig;

            /**
             * Reference to the currently used config.
             * It could be default config or marker config.
             */
            currentConfig: Phaser.Types.Sound.SoundConfig;

            /**
             * Boolean indicating whether the sound is muted or not.
             * Gets or sets the muted state of this sound.
             */
            mute: boolean;

            /**
             * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).
             */
            volume: number;

            /**
             * Rate at which this Sound will be played.
             * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
             * and 2.0 doubles the audios playback speed.
             */
            rate: number;

            /**
             * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
             * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
             */
            detune: number;

            /**
             * Property representing the position of playback for this sound, in seconds.
             * Setting it to a specific value moves current playback to that position.
             * The value given is clamped to the range 0 to current marker duration.
             * Setting seek of a stopped sound has no effect.
             */
            seek: number;

            /**
             * Flag indicating whether or not the sound or current sound marker will loop.
             */
            loop: boolean;

            /**
             * Gets or sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).
             * 
             * Always returns zero on iOS / Safari as it doesn't support the stereo panner node.
             */
            pan: number;

            /**
             * Object containing markers definitions.
             */
            readonly markers: {[key: string]:  Phaser.Types.Sound.SoundMarker};

            /**
             * Currently playing marker.
             * 'null' if whole sound is playing.
             */
            readonly currentMarker: Phaser.Types.Sound.SoundMarker;

            /**
             * Flag indicating if destroy method was called on this sound.
             */
            pendingRemove: boolean;

            /**
             * Adds a marker to this sound. Markers allow you to define sections within a sound clip and play them back independently.
             * @param marker Marker object.
             * @returns false
             */
            addMarker(marker: Phaser.Types.Sound.SoundMarker): boolean;

            /**
             * Updates the values of an existing marker in this sound.
             * @param marker Marker object with updated values.
             * @returns false
             */
            updateMarker(marker: Phaser.Types.Sound.SoundMarker): boolean;

            /**
             * Removes a marker from this sound by name.
             * @param markerName The name of the marker to remove.
             * @returns null
             */
            removeMarker(markerName: string): null;

            /**
             * Plays this sound, or a specific marker within it. An optional config object can override default playback settings for this call.
             * @param markerName If you want to play a marker then provide the marker name here. Alternatively, this parameter can be a SoundConfig object. Default ''.
             * @param config Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.
             * @returns false
             */
            play(markerName?: string | Phaser.Types.Sound.SoundConfig, config?: Phaser.Types.Sound.SoundConfig): boolean;

            /**
             * Pauses this sound.undefined
             * @returns false
             */
            pause(): boolean;

            /**
             * Resumes the sound.undefined
             * @returns false
             */
            resume(): boolean;

            /**
             * Stop playing this sound.undefined
             * @returns false
             */
            stop(): boolean;

            /**
             * Sets the muted state of this Sound.
             * @param value `true` to mute this sound, `false` to unmute it.
             * @returns This Sound instance.
             */
            setMute(value: boolean): this;

            /**
             * Sets the volume of this Sound.
             * @param value The volume of the sound, between 0 (silence) and 1 (full volume).
             * @returns This Sound instance.
             */
            setVolume(value: number): this;

            /**
             * Sets the playback rate of this Sound.
             * 
             * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
             * and 2.0 doubles the audios playback speed.
             * @param value The playback rate of this Sound.
             * @returns This Sound instance.
             */
            setRate(value: number): this;

            /**
             * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
             * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
             * @param value The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
             * @returns This Sound instance.
             */
            setDetune(value: number): this;

            /**
             * Seeks to a specific point in this sound.
             * @param value The point in the sound to seek to, in seconds.
             * @returns This Sound instance.
             */
            setSeek(value: number): this;

            /**
             * Sets the loop state of this Sound.
             * @param value `true` to loop this sound, `false` to not loop it.
             * @returns This Sound instance.
             */
            setLoop(value: boolean): this;

            /**
             * Sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).
             * 
             * Note: iOS / Safari doesn't support the stereo panner node.
             * @param value The pan of the sound. A value between -1 (full left pan) and 1 (full right pan).
             * @returns This Sound instance.
             */
            setPan(value: number): this;

            /**
             * Method used internally for applying config values to some of the sound properties.
             */
            applyConfig(): void;

            /**
             * Method used internally for resetting values of some of the config properties.
             */
            resetConfig(): void;

            /**
             * Update method called automatically by sound manager on every game step.
             * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
             * @param delta The delta time elapsed since the last frame.
             */
            update(time: number, delta: number): void;

            /**
             * Method used internally to calculate total playback rate of the sound.
             */
            calculateRate(): void;

            /**
             * Destroys this sound and all associated events and marks it for removal from the sound manager.
             */
            destroy(): void;

        }

        /**
         * No-audio implementation of the Sound Manager. It is used if audio has been
         * disabled in the game config or the device doesn't support any audio.
         * 
         * It represents a graceful degradation of Sound Manager logic that provides
         * minimal functionality and prevents Phaser projects that use audio from
         * breaking on devices that don't support any audio playback technologies.
         */
        class NoAudioSoundManager extends Phaser.Sound.BaseSoundManager {
            /**
             * 
             * @param game Reference to the current game instance.
             */
            constructor(game: Phaser.Game);

            /**
             * Adds a new sound into the sound manager.
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings.
             * @returns The new sound instance.
             */
            add(key: string, config?: Phaser.Types.Sound.SoundConfig): Phaser.Sound.NoAudioSound;

            /**
             * Adds a new audio sprite sound into the sound manager.
             * Audio Sprites are a combination of audio files and a JSON configuration.
             * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings.
             * @returns The new audio sprite sound instance.
             */
            addAudioSprite(key: string, config?: Phaser.Types.Sound.SoundConfig): Phaser.Sound.NoAudioSound;

            /**
             * Gets the first sound in the manager matching the given key, if any.
             * @param key Sound asset key.
             * @returns - The sound, or null.
             */
            get<T extends Phaser.Sound.BaseSound>(key: string): T;

            /**
             * Gets any sounds in the manager matching the given key.
             * @param key Sound asset key.
             * @returns - The sounds, or an empty array.
             */
            getAll<T extends Phaser.Sound.BaseSound>(key: string): T[];

            /**
             * This method does nothing but return 'false' for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * @param key Asset key for the sound.
             * @param extra An optional additional object containing settings to be applied to the sound. It could be either config or marker object.
             * @returns Always 'false' for the No Audio Sound Manager.
             */
            play(key: string, extra?: Phaser.Types.Sound.SoundConfig | Phaser.Types.Sound.SoundMarker): boolean;

            /**
             * This method does nothing but return 'false' for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * @param key Asset key for the sound.
             * @param spriteName The name of the sound sprite to play.
             * @param config An optional config object containing default sound settings.
             * @returns Always 'false' for the No Audio Sound Manager.
             */
            playAudioSprite(key: string, spriteName: string, config?: Phaser.Types.Sound.SoundConfig): boolean;

            /**
             * Removes a sound from the sound manager.
             * The removed sound is destroyed before removal.
             * @param sound The sound object to remove.
             * @returns True if the sound was removed successfully, otherwise false.
             */
            remove(sound: Phaser.Sound.BaseSound): boolean;

            /**
             * Removes all sounds from the manager, destroying the sounds.
             */
            removeAll(): void;

            /**
             * Removes all sounds from the sound manager that have an asset key matching the given value.
             * The removed sounds are destroyed before removal.
             * @param key The key to match when removing sound objects.
             * @returns The number of matching sound objects that were removed.
             */
            removeByKey(key: string): number;

            /**
             * Stops any sounds matching the given key.
             * @param key Sound asset key.
             * @returns - How many sounds were stopped.
             */
            stopByKey(key: string): number;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would be called when the browser window loses focus
             * and would pause all playing sounds if `pauseOnBlur` is enabled.
             */
            onBlur(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would be called when the browser window regains focus
             * and would resume any sounds that were paused when focus was lost.
             */
            onFocus(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would be called when the Phaser Game instance loses
             * focus (e.g. the canvas loses the pointer) and would pause sounds accordingly.
             */
            onGameBlur(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would be called when the Phaser Game instance
             * regains focus and would resume any sounds that were paused on blur.
             */
            onGameFocus(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would pause all currently playing sounds.
             */
            pauseAll(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would resume all paused sounds.
             */
            resumeAll(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would stop all currently playing sounds.
             */
            stopAll(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would be called on each game step to update
             * the state of all active sounds.
             */
            update(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would set the global playback rate for all sounds,
             * where 1 is normal speed, 0.5 is half speed, and 2 is double speed.undefined
             * @returns This Sound Manager.
             */
            setRate(): this;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would set the global detune value for all sounds,
             * measured in cents, where 100 cents equals one semitone.undefined
             * @returns This Sound Manager.
             */
            setDetune(): this;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would mute or unmute all sounds in the manager.
             */
            setMute(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would set the global volume for all sounds in the
             * manager, where 0 is silent and 1 is full volume.
             */
            setVolume(): void;

            /**
             * This method does nothing for the No Audio Sound Manager, to maintain
             * compatibility with the other Sound Managers.
             * 
             * In a real Sound Manager, this would attempt to unlock the audio context after
             * a user gesture, which is required by modern browsers before audio playback
             * can begin.
             */
            unlock(): void;

            /**
             * Destroys all the sounds in the game and all associated events.
             */
            destroy(): void;

        }

        /**
         * A Web Audio API based Sound instance that can be played, paused, stopped, looped, and have
         * its volume, rate, detune, pan, and spatial position controlled in real time.
         * 
         * This is the default sound implementation used by Phaser when the Web Audio API is available in
         * the browser. It uses an AudioBufferSourceNode internally, with a chain of GainNodes for volume
         * and muting, an optional StereoPannerNode for stereo panning, and an optional PannerNode for
         * 3D spatial audio positioning.
         * 
         * If the Web Audio API is unavailable, Phaser will fall back to the HTML5 Audio implementation.
         * You do not typically create WebAudioSound instances directly; instead, use the Sound Manager
         * via `this.sound.add(key)` within a Scene.
         */
        class WebAudioSound extends Phaser.Sound.BaseSound {
            /**
             * 
             * @param manager Reference to the WebAudio Sound Manager that owns this Sound instance.
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings. Default {}.
             */
            constructor(manager: Phaser.Sound.WebAudioSoundManager, key: string, config?: Phaser.Types.Sound.SoundConfig);

            /**
             * Audio buffer containing decoded data of the audio asset to be played.
             */
            audioBuffer: AudioBuffer;

            /**
             * A reference to an audio source node used for playing back audio from
             * audio data stored in Phaser.Sound.WebAudioSound#audioBuffer.
             */
            source: AudioBufferSourceNode | null;

            /**
             * A reference to a second audio source used for gapless looped playback.
             */
            loopSource: AudioBufferSourceNode | null;

            /**
             * Gain node responsible for controlling this sound's muting.
             */
            muteNode: GainNode;

            /**
             * Gain node responsible for controlling this sound's volume.
             */
            volumeNode: GainNode;

            /**
             * Panner node responsible for controlling this sound's pan.
             * 
             * Only created if the device supports it.
             * Might not work on iOS / Safari.
             */
            pannerNode: StereoPannerNode | null;

            /**
             * The Stereo Spatial Panner node.
             */
            spatialNode: PannerNode | null;

            /**
             * If the Spatial Panner node has been set to track a vector or
             * Game Object, this retains a reference to it.
             */
            spatialSource: Phaser.Types.Math.Vector2Like | null;

            /**
             * The time at which the sound should have started playback from the beginning.
             * 
             * Treat this property as read-only.
             * 
             * Based on `BaseAudioContext.currentTime` value.
             */
            playTime: number;

            /**
             * The time at which the sound source should have actually started playback.
             * 
             * Treat this property as read-only.
             * 
             * Based on `BaseAudioContext.currentTime` value.
             */
            startTime: number;

            /**
             * The time at which the sound loop source should actually start playback.
             * 
             * Based on `BaseAudioContext.currentTime` value.
             */
            loopTime: number;

            /**
             * An array where we keep track of all rate updates during playback.
             * 
             * Treat this property as read-only.
             * 
             * Array of object types: `{ time: number, rate: number }`
             */
            rateUpdates: any[];

            /**
             * Used for keeping track when sound source playback has ended
             * so its state can be updated accordingly.
             */
            readonly hasEnded: boolean;

            /**
             * Used for keeping track when sound source has looped
             * so its state can be updated accordingly.
             */
            readonly hasLooped: boolean;

            /**
             * Play this sound, or a marked section of it.
             * 
             * It always plays the sound from the start. If you want to start playback from a specific time
             * you can set 'seek' setting of the config object, provided to this call, to that value.
             * 
             * If you want to play the same sound simultaneously, then you need to create another instance
             * of it and play that Sound.
             * @param markerName If you want to play a marker then provide the marker name here. Alternatively, this parameter can be a SoundConfig object. Default ''.
             * @param config Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.
             * @returns Whether the sound started playing successfully.
             */
            play(markerName?: string | Phaser.Types.Sound.SoundConfig, config?: Phaser.Types.Sound.SoundConfig): boolean;

            /**
             * Pauses the sound.undefined
             * @returns Whether the sound was paused successfully.
             */
            pause(): boolean;

            /**
             * Resumes the sound.undefined
             * @returns Whether the sound was resumed successfully.
             */
            resume(): boolean;

            /**
             * Stop playing this sound.undefined
             * @returns Whether the sound was stopped successfully.
             */
            stop(): boolean;

            /**
             * This method is only used internally and it creates a looping buffer source.
             */
            createAndStartLoopBufferSource(): void;

            /**
             * This method is only used internally and it creates a buffer source.undefined
             * @returns undefined
             */
            createBufferSource(): AudioBufferSourceNode;

            /**
             * This method is only used internally and it stops and removes a buffer source.
             */
            stopAndRemoveBufferSource(): void;

            /**
             * This method is only used internally and it stops and removes a looping buffer source.
             */
            stopAndRemoveLoopBufferSource(): void;

            /**
             * Method used internally for applying config values to some of the sound properties.
             */
            applyConfig(): void;

            /**
             * Gets or sets the x position of this Sound in Spatial Audio space.
             * 
             * This only has any effect if the sound was created with a SpatialSoundConfig object.
             * 
             * Also see the `WebAudioSoundManager.setListenerPosition` method.
             * 
             * If you find that the sound becomes too quiet, too quickly, as it moves away from
             * the listener, then try different `refDistance` property values when configuring
             * the spatial sound.
             */
            x: number;

            /**
             * Gets or sets the y position of this Sound in Spatial Audio space.
             * 
             * This only has any effect if the sound was created with a SpatialSoundConfig object.
             * 
             * Also see the `WebAudioSoundManager.setListenerPosition` method.
             * 
             * If you find that the sound becomes too quiet, too quickly, as it moves away from
             * the listener, then try different `refDistance` property values when configuring
             * the spatial sound.
             */
            y: number;

            /**
             * Update method called automatically by sound manager on every game step.
             */
            update(): void;

            /**
             * Calls Phaser.Sound.BaseSound#destroy method
             * and disconnects all Web Audio API nodes, releasing all references to audio resources.
             */
            destroy(): void;

            /**
             * Method used internally to calculate total playback rate of the sound.
             */
            calculateRate(): void;

            /**
             * Method used internally for calculating current playback time of a playing sound.
             */
            getCurrentTime(): void;

            /**
             * Method used internally for calculating the time
             * at which the loop source should start playing.
             */
            getLoopTime(): void;

            /**
             * Rate at which this Sound will be played.
             * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
             * and 2.0 doubles the audio's playback speed.
             */
            rate: number;

            /**
             * Sets the playback rate of this Sound.
             * 
             * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
             * and 2.0 doubles the audio's playback speed.
             * @param value The playback rate of this Sound.
             * @returns This Sound instance.
             */
            setRate(value: number): this;

            /**
             * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
             * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
             */
            detune: number;

            /**
             * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
             * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
             * @param value The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).
             * @returns This Sound instance.
             */
            setDetune(value: number): this;

            /**
             * Gets or sets the muted state of this sound.
             */
            mute: boolean;

            /**
             * Sets the muted state of this Sound.
             * @param value `true` to mute this sound, `false` to unmute it.
             * @returns This Sound instance.
             */
            setMute(value: boolean): this;

            /**
             * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).
             */
            volume: number;

            /**
             * Sets the volume of this Sound.
             * @param value The volume of the sound, between 0 (silence) and 1 (full volume).
             * @returns This Sound instance.
             */
            setVolume(value: number): this;

            /**
             * Property representing the position of playback for this sound, in seconds.
             * Setting it to a specific value moves current playback to that position.
             * The value given is clamped to the range 0 to current marker duration.
             * Setting seek of a stopped sound has no effect.
             */
            seek: number;

            /**
             * Seeks to a specific point in this sound.
             * @param value The point in the sound to seek to, in seconds.
             * @returns This Sound instance.
             */
            setSeek(value: number): this;

            /**
             * Flag indicating whether or not the sound or current sound marker will loop.
             */
            loop: boolean;

            /**
             * Sets the loop state of this Sound.
             * @param value `true` to loop this sound, `false` to not loop it.
             * @returns This Sound instance.
             */
            setLoop(value: boolean): this;

            /**
             * Gets or sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).
             * 
             * Always returns zero on iOS / Safari as it doesn't support the stereo panner node.
             */
            pan: number;

            /**
             * Sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).
             * 
             * Note: iOS / Safari doesn't support the stereo panner node.
             * @param value The pan of the sound. A value between -1 (full left pan) and 1 (full right pan).
             * @returns This Sound instance.
             */
            setPan(value: number): this;

        }

        /**
         * The Web Audio API implementation of the Phaser Sound Manager.
         * 
         * This is the default Sound Manager used in Phaser when the browser supports the Web Audio API.
         * It creates and manages an `AudioContext`, routes all sounds through a master gain node chain
         * for global mute and volume control, and handles the browser autoplay policy by unlocking
         * audio on the first user interaction.
         * 
         * Use this manager to add, play, and control sounds in your game. It is accessed via
         * `this.sound` from within a Scene. If the browser does not support the Web Audio API,
         * Phaser will fall back to the `HTML5AudioSoundManager` instead.
         * 
         * Not all browsers can play all audio formats.
         * 
         * There is a good guide to what's supported: [Cross-browser audio basics: Audio codec support](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support).
         */
        class WebAudioSoundManager extends Phaser.Sound.BaseSoundManager {
            /**
             * 
             * @param game Reference to the current game instance.
             */
            constructor(game: Phaser.Game);

            /**
             * The AudioContext being used for playback.
             */
            context: AudioContext;

            /**
             * Gain node responsible for controlling global muting.
             */
            masterMuteNode: GainNode;

            /**
             * Gain node responsible for controlling global volume.
             */
            masterVolumeNode: GainNode;

            /**
             * Destination node for connecting individual sounds to.
             */
            destination: AudioNode;

            /**
             * Method responsible for instantiating and returning AudioContext instance.
             * If an instance of an AudioContext class was provided through the game config,
             * that instance will be returned instead. This can come in handy if you are reloading
             * a Phaser game on a page that never properly refreshes (such as in an SPA project)
             * and you want to reuse already instantiated AudioContext.
             * @param game Reference to the current game instance.
             * @returns The AudioContext instance to be used for playback.
             */
            createAudioContext(game: Phaser.Game): AudioContext;

            /**
             * This method takes a new AudioContext reference and then sets
             * this Sound Manager to use that context for all playback.
             * 
             * As part of this call it also disconnects the master mute and volume
             * nodes and then re-creates them on the new given context.
             * @param context Reference to an already created AudioContext instance.
             * @returns The WebAudioSoundManager instance.
             */
            setAudioContext(context: AudioContext): this;

            /**
             * Adds a new sound into the sound manager.
             * @param key Asset key for the sound.
             * @param config An optional config object containing default sound settings.
             * @returns The new sound instance.
             */
            add(key: string, config?: Phaser.Types.Sound.SoundConfig): Phaser.Sound.WebAudioSound;

            /**
             * Decode audio data into a format ready for playback via Web Audio.
             * 
             * The audio data can be a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.
             * 
             * The `audioKey` is the key that will be used to save the decoded audio to the audio cache.
             * 
             * Instead of passing a single entry you can instead pass an array of `Phaser.Types.Sound.DecodeAudioConfig`
             * objects as the first and only argument.
             * 
             * Decoding is an async process, so be sure to listen for the events to know when decoding has completed.
             * 
             * Once the audio has decoded it can be added to the Sound Manager or played via its key.
             * @param audioKey The string-based key to be used to reference the decoded audio in the audio cache, or an array of audio config objects.
             * @param audioData The audio data, either a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.
             */
            decodeAudio(audioKey?: Phaser.Types.Sound.DecodeAudioConfig[] | string, audioData?: ArrayBuffer | string): void;

            /**
             * Sets the X and Y position of the Spatial Audio listener on this Web Audio context.
             * 
             * If you call this method with no parameters it will default to the center-point of
             * the game canvas. Depending on the type of game you're making, you may need to call
             * this method constantly to reset the listener position as the camera scrolls.
             * 
             * Calling this method does nothing on HTML5Audio.
             * @param x The x position of the Spatial Audio listener.
             * @param y The y position of the Spatial Audio listener.
             */
            setListenerPosition(x?: number, y?: number): void;

            /**
             * Unlocks Web Audio API on the initial input event.
             * 
             * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).
             */
            unlock(): void;

            /**
             * Method used internally for pausing sound manager if
             * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.
             */
            protected onBlur(): void;

            /**
             * Method used internally for resuming sound manager if
             * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.
             */
            protected onFocus(): void;

            /**
             * Update method called on every game step.
             * 
             * Removes destroyed sounds and updates every active sound in the game.
             * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout.
             * @param delta The delta time elapsed since the last frame.
             */
            protected update(time: number, delta: number): void;

            /**
             * Calls Phaser.Sound.BaseSoundManager#destroy method
             * and cleans up all Web Audio API related resources.
             */
            destroy(): void;

            /**
             * Sets the muted state of this Sound Manager.
             * @param value `true` to mute all sounds, `false` to unmute them.
             * @returns This Sound Manager.
             */
            setMute(value: boolean): Phaser.Sound.WebAudioSoundManager;

            mute: boolean;

            /**
             * Sets the volume of this Sound Manager.
             * @param value The global volume of this Sound Manager.
             * @returns This Sound Manager.
             */
            setVolume(value: number): Phaser.Sound.WebAudioSoundManager;

            volume: number;

        }

    }

    namespace Structs {
        /**
         * A List is a generic, ordered collection of items that provides a rich set of utility methods for
         * adding, removing, sorting, searching, and iterating its contents. Unlike a plain array, a List
         * supports optional add and remove callbacks, stable sorting, named item lookup, positional
         * traversal via the `first`, `last`, `next`, and `previous` properties, and safe in-place
         * manipulation (swap, move, replace, shuffle). It is used throughout Phaser as the backing
         * structure for display lists, camera lists, and other ordered collections where items must
         * remain unique and ordered.
         */
        class List<T> {
            /**
             * 
             * @param parent The parent of this list.
             */
            constructor(parent: any);

            /**
             * The parent of this list.
             */
            parent: any;

            /**
             * The objects that belong to this collection.
             */
            list: T[];

            /**
             * The index of the current element.
             * 
             * This is used internally when iterating through the list with the {@link #first}, {@link #last}, {@link #next}, and {@link #previous} properties.
             */
            position: number;

            /**
             * A callback that is invoked every time a child is added to this list.
             */
            addCallback: Function;

            /**
             * A callback that is invoked every time a child is removed from this list.
             */
            removeCallback: Function;

            /**
             * The property key to sort by.
             */
            _sortKey: string;

            /**
             * Adds the given item to the end of the list. Each item must be unique.
             * @param child The item, or array of items, to add to the list.
             * @param skipCallback Skip calling the List.addCallback if this child is added successfully. Default false.
             * @returns The list's underlying array.
             */
            add(child: any | any[], skipCallback?: boolean): any;

            /**
             * Adds an item to list, starting at a specified index. Each item must be unique within the list.
             * @param child The item, or array of items, to add to the list.
             * @param index The index in the list at which the element(s) will be inserted. Default 0.
             * @param skipCallback Skip calling the List.addCallback if this child is added successfully. Default false.
             * @returns The List's underlying array.
             */
            addAt(child: (T|T[]), index?: number, skipCallback?: boolean): (T|T[]);

            /**
             * Retrieves the item at a given position inside the List.
             * @param index The index of the item.
             * @returns The retrieved item, or `undefined` if it's outside the List's bounds.
             */
            getAt(index: number): T;

            /**
             * Locates an item within the List and returns its index.
             * @param child The item to locate.
             * @returns The index of the item within the List, or -1 if it's not in the List.
             */
            getIndex(child: T): number;

            /**
             * Sort the contents of this List so the items are in order based on the given property.
             * For example, `sort('alpha')` would sort the List contents based on the value of their `alpha` property.
             * @param property The property to lexically sort by.
             * @param handler Provide your own custom handler function. Will receive 2 children which it should compare and return a number (negative if the first should come before the second, positive if after, zero if equal).
             * @returns This List object.
             */
            sort(property: string, handler?: Function): T[];

            /**
             * Searches for the first instance of a child with its `name`
             * property matching the given argument. Should more than one child have
             * the same name only the first is returned.
             * @param name The name to search for.
             * @returns The first child with a matching name, or null if none were found.
             */
            getByName(name: string): T | null;

            /**
             * Returns a random child from the list.
             * @param startIndex Offset from the front of the list (lowest child). Default 0.
             * @param length Restriction on the number of values you want to randomly select from. Default (to top).
             * @returns A random child of this List.
             */
            getRandom(startIndex?: number, length?: number): T | null;

            /**
             * Returns the first element in a given part of the List which matches a specific criterion.
             * @param property The name of the property to test or a falsey value to have no criterion.
             * @param value The value to test the `property` against, or `undefined` to allow any value and only check for existence.
             * @param startIndex The position in the List to start the search at. Default 0.
             * @param endIndex The position in the List to optionally stop the search at. It won't be checked.
             * @returns The first item which matches the given criterion, or `null` if no such item exists.
             */
            getFirst(property: string, value: any, startIndex?: number, endIndex?: number): T | null;

            /**
             * Returns all children in this List.
             * 
             * You can optionally specify a matching criteria using the `property` and `value` arguments.
             * 
             * For example: `getAll('parent')` would return only children that have a property called `parent`.
             * 
             * You can also specify a value to compare the property to:
             * 
             * `getAll('visible', true)` would return only children that have their visible property set to `true`.
             * 
             * Optionally you can specify a start and end index. For example if this List had 100 children,
             * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only
             * the first 50 children in the List.
             * @param property An optional property to test against the value argument.
             * @param value If property is set then Child.property must strictly equal this value to be included in the results.
             * @param startIndex The first child index to start the search from.
             * @param endIndex The last child index to search up until.
             * @returns All items of the List which match the given criterion, if any.
             */
            getAll(property?: string, value?: any, startIndex?: number, endIndex?: number): T[];

            /**
             * Returns the total number of items in the List which have a property matching the given value.
             * @param property The property to test on each item.
             * @param value The value to test the property against.
             * @returns The total number of matching elements.
             */
            count(property: string, value: T): number;

            /**
             * Swaps the positions of two items in the list.
             * @param child1 The first item to swap.
             * @param child2 The second item to swap.
             */
            swap(child1: T, child2: T): void;

            /**
             * Moves an item in the List to a new position.
             * @param child The item to move.
             * @param index The new position to move the item to.
             * @returns The item that was moved.
             */
            moveTo(child: T, index: number): T;

            /**
             * Moves an item above another one in the List.
             * If the given item is already above the other, it isn't moved.
             * Above means toward the end of the List.
             * @param child1 The element to move above base element.
             * @param child2 The base element.
             */
            moveAbove(child1: T, child2: T): void;

            /**
             * Moves an item below another one in the List.
             * If the given item is already below the other, it isn't moved.
             * Below means toward the start of the List.
             * @param child1 The element to move below base element.
             * @param child2 The base element.
             */
            moveBelow(child1: T, child2: T): void;

            /**
             * Removes one or many items from the List.
             * @param child The item, or array of items, to remove.
             * @param skipCallback Skip calling the List.removeCallback. Default false.
             * @returns The item, or array of items, which were successfully removed from the List.
             */
            remove(child: any, skipCallback?: boolean): any;

            /**
             * Removes the item at the given position in the List.
             * @param index The position to remove the item from.
             * @param skipCallback Skip calling the List.removeCallback. Default false.
             * @returns The item that was removed.
             */
            removeAt(index: number, skipCallback?: boolean): T;

            /**
             * Removes the items within the given range in the List.
             * @param startIndex The index to start removing from. Default 0.
             * @param endIndex The position to stop removing at. The item at this position won't be removed.
             * @param skipCallback Skip calling the List.removeCallback. Default false.
             * @returns An array of the items which were removed.
             */
            removeBetween(startIndex?: number, endIndex?: number, skipCallback?: boolean): T[];

            /**
             * Removes all the items.
             * @param skipCallback Skip calling the List.removeCallback. Default false.
             * @returns This List object.
             */
            removeAll(skipCallback?: boolean): this;

            /**
             * Brings the given child to the top of this List.
             * @param child The item to bring to the top of the List.
             * @returns The item which was moved.
             */
            bringToTop(child: T): T;

            /**
             * Sends the given child to the bottom of this List.
             * @param child The item to send to the back of the list.
             * @returns The item which was moved.
             */
            sendToBack(child: T): T;

            /**
             * Moves the given child up one place in this List unless it's already at the top.
             * @param child The item to move up.
             * @returns The item which was moved.
             */
            moveUp(child: T): T;

            /**
             * Moves the given child down one place in this List unless it's already at the bottom.
             * @param child The item to move down.
             * @returns The item which was moved.
             */
            moveDown(child: T): T;

            /**
             * Reverses the order of all children in this List.undefined
             * @returns This List object.
             */
            reverse(): Phaser.Structs.List<T>;

            /**
             * Shuffles the items in the list.undefined
             * @returns This List object.
             */
            shuffle(): Phaser.Structs.List<T>;

            /**
             * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List.
             * @param oldChild The child in this List that will be replaced.
             * @param newChild The child to be inserted into this List.
             * @returns Returns the oldChild that was replaced within this List.
             */
            replace(oldChild: T, newChild: T): T;

            /**
             * Checks if an item exists within the List.
             * @param child The item to check for the existence of.
             * @returns `true` if the item is found in the list, otherwise `false`.
             */
            exists(child: T): boolean;

            /**
             * Sets the property `key` to the given value on all members of this List.
             * @param property The name of the property to set.
             * @param value The value to set the property to.
             * @param startIndex The first child index to start the search from.
             * @param endIndex The last child index to search up until.
             */
            setAll(property: string, value: T, startIndex?: number, endIndex?: number): void;

            /**
             * Passes all children to the given callback.
             * @param callback The function to call.
             * @param context Value to use as `this` when executing callback.
             * @param args Additional arguments that will be passed to the callback, after the child.
             */
            each(callback: EachListCallback<T>, context?: any, ...args: any[]): void;

            /**
             * Clears the List and recreates its internal array.
             */
            shutdown(): void;

            /**
             * Destroys this List.
             */
            destroy(): void;

            /**
             * The number of items inside the List.
             */
            readonly length: number;

            /**
             * The first item in the List or `null` for an empty List.
             */
            readonly first: T;

            /**
             * The last item in the List, or `null` for an empty List.
             */
            readonly last: T;

            /**
             * The next item in the List, or `null` if the entire List has been traversed.
             * 
             * This property can be read successively after reading {@link #first} or manually setting the {@link #position} to iterate the List.
             */
            readonly next: T;

            /**
             * The previous item in the List, or `null` if the entire List has been traversed.
             * 
             * This property can be read successively after reading {@link #last} or manually setting the {@link #position} to iterate the List backwards.
             */
            readonly previous: T;

        }

        /**
         * A custom Map implementation that stores entries as key-value pairs with ordered iteration.
         * Unlike a native JavaScript Map, it also maintains an internal array of entries for efficient
         * indexed access and iteration. Supports filtering, merging, and contains/size operations.
         * Used internally by various Phaser systems for managing collections.
         * 
         * ```javascript
         * var map = new Map([
         *    [ 1, 'one' ],
         *    [ 2, 'two' ],
         *    [ 3, 'three' ]
         * ]);
         * ```
         */
        class Map<K, V> {
            /**
             * 
             * @param elements An optional array of key-value pairs to populate this Map with.
             */
            constructor(elements: V[]);

            /**
             * The entries in this Map.
             */
            entries: {[key: string]:  V};

            /**
             * The number of key / value pairs in this Map.
             */
            size: number;

            /**
             * Adds all the elements in the given array to this Map.
             * 
             * If the key already exists, the value will be replaced.
             * @param elements An array of key-value pairs to populate this Map with.
             * @returns This Map object.
             */
            setAll<K, V>(elements: V[]): this;

            /**
             * Adds an element with a specified `key` and `value` to this Map.
             * 
             * If the `key` already exists, the value will be replaced.
             * 
             * If you wish to add multiple elements in a single call, use the `setAll` method instead.
             * @param key The key of the element to be added to this Map.
             * @param value The value of the element to be added to this Map.
             * @returns This Map object.
             */
            set(key: K, value: V): Phaser.Structs.Map<K, V>;

            /**
             * Returns the value associated to the `key`, or `undefined` if there is none.
             * @param key The key of the element to return from the `Map` object.
             * @returns The element associated with the specified key or `undefined` if the key can't be found in this Map object.
             */
            get(key: K): V;

            /**
             * Returns an `Array` of all the values stored in this Map.undefined
             * @returns An array of the values stored in this Map.
             */
            getArray(): V[];

            /**
             * Returns a boolean indicating whether an element with the specified key exists or not.
             * @param key The key of the element to test for presence of in this Map.
             * @returns Returns `true` if an element with the specified key exists in this Map, otherwise `false`.
             */
            has(key: K): boolean;

            /**
             * Delete the specified element from this Map.
             * @param key The key of the element to delete from this Map.
             * @returns This Map object.
             */
            delete(key: K): Phaser.Structs.Map<K, V>;

            /**
             * Delete all entries from this Map.undefined
             * @returns This Map object.
             */
            clear(): Phaser.Structs.Map<K, V>;

            /**
             * Returns an array of all entry keys in this Map.undefined
             * @returns Array containing entries' keys.
             */
            keys(): K[];

            /**
             * Returns an `Array` of all values stored in this Map.undefined
             * @returns An `Array` of values.
             */
            values(): V[];

            /**
             * Dumps the contents of this Map to the console via `console.group`.
             */
            dump(): void;

            /**
             * Iterates through all entries in this Map, passing each one to the given callback.
             * 
             * If the callback returns `false`, the iteration will break.
             * @param callback The callback which will receive the keys and entries held in this Map.
             * @returns This Map object.
             */
            each(callback: EachMapCallback<V>): Phaser.Structs.Map<K, V>;

            /**
             * Returns `true` if the value exists within this Map. Otherwise, returns `false`.
             * @param value The value to search for.
             * @returns `true` if the value is found, otherwise `false`.
             */
            contains(value: V): boolean;

            /**
             * Merges all new keys from the given Map into this one.
             * If it encounters a key that already exists it will be skipped unless override is set to `true`.
             * @param map The Map to merge in to this Map.
             * @param override Set to `true` to replace values in this Map with those from the source map, or `false` to skip them. Default false.
             * @returns This Map object.
             */
            merge(map: Phaser.Structs.Map<K, V>, override?: boolean): Phaser.Structs.Map<K, V>;

        }

        /**
         * A Process Queue maintains three internal lists.
         * 
         * The `pending` list is a selection of items which are due to be made 'active' in the next update.
         * The `active` list is a selection of items which are considered active and should be updated.
         * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update.
         * 
         * When new items are added to a Process Queue they are put in the pending list, rather than being added
         * immediately to the active list. Equally, items that are removed are put into the destroy list, rather than
         * being destroyed immediately. This allows the Process Queue to carefully process each item at a specific, fixed
         * time, rather than at the time of the request from the API.
         * 
         * Process Queue is used extensively within Phaser to safely manage collections of objects such as Cameras,
         * Plugins, and Scene Systems, where items may be added or removed during an active update loop. By deferring
         * additions and removals to a controlled point between updates, it avoids the bugs that would result from
         * modifying a list while it is being iterated over.
         * 
         * The queue extends EventEmitter and fires `Phaser.Structs.Events#PROCESS_QUEUE_ADD` when an item becomes
         * active and `Phaser.Structs.Events#PROCESS_QUEUE_REMOVE` when an item is removed.
         */
        class ProcessQueue<T> extends Phaser.Events.EventEmitter {
            /**
             * If `true` only unique objects will be allowed in the queue, preventing the same item from being added more than once.
             */
            checkQueue: boolean;

            /**
             * Checks the given item to see if it is already active within this Process Queue.
             * @param item The item to check.
             * @returns `true` if the item is active, otherwise `false`.
             */
            isActive(item: T): Phaser.Structs.ProcessQueue<T>;

            /**
             * Checks the given item to see if it is already pending addition to this Process Queue.
             * @param item The item to check.
             * @returns `true` if the item is pending insertion, otherwise `false`.
             */
            isPending(item: T): Phaser.Structs.ProcessQueue<T>;

            /**
             * Checks the given item to see if it is already pending destruction from this Process Queue.
             * @param item The item to check.
             * @returns `true` if the item is pending destruction, otherwise `false`.
             */
            isDestroying(item: T): Phaser.Structs.ProcessQueue<T>;

            /**
             * Adds a new item to the Process Queue.
             * 
             * The item is added to the pending list and made active in the next update.
             * @param item The item to add to the queue.
             * @returns The item that was added.
             */
            add(item: T): Phaser.Structs.ProcessQueue<T>;

            /**
             * Removes an item from the Process Queue.
             * 
             * The item is added to the 'destroy' list and is fully removed in the next update.
             * @param item The item to be removed from the queue.
             * @returns The item that was removed.
             */
            remove(item: T): Phaser.Structs.ProcessQueue<T>;

            /**
             * Removes all active items from this Process Queue.
             * 
             * All the items are marked as 'pending destroy' and fully removed in the next update.undefined
             * @returns This Process Queue object.
             */
            removeAll(): this;

            /**
             * Update this queue. First it will process any items awaiting destruction, and remove them.
             * 
             * Then it will check to see if there are any items pending insertion, and move them to an
             * active state. Finally, it will return a list of active items for further processing.undefined
             * @returns A list of active items.
             */
            update(): T[];

            /**
             * Returns the current list of active items.
             * 
             * This method returns a reference to the active list array, not a copy of it.
             * Therefore, be careful to not modify this array outside of the ProcessQueue.undefined
             * @returns A list of active items.
             */
            getActive(): T[];

            /**
             * The number of entries in the active list.
             */
            readonly length: number;

            /**
             * Immediately destroys this process queue, clearing all of its internal arrays and resetting the process totals.
             */
            destroy(): void;

        }

        /**
         * RBush is a high-performance JavaScript library for 2D spatial indexing of points and rectangles.
         * It's based on an optimized R-tree data structure with bulk insertion support.
         * 
         * Spatial index is a special data structure for points and rectangles that allows you to perform queries like
         * "all items within this bounding box" very efficiently (e.g. hundreds of times faster than looping over all items).
         * 
         * This version of RBush uses a fixed min/max accessor structure of `[ '.left', '.top', '.right', '.bottom' ]`.
         * This is to avoid the eval-like function creation that the original library used, which caused CSP policy violations.
         * 
         * rbush is forked from https://github.com/mourner/rbush by Vladimir Agafonkin
         */
        class RTree {
            /**
             * Returns all items stored in the RTree as a flat array.undefined
             * @returns An array containing all items currently stored in the tree.
             */
            all(): any[];

            /**
             * Searches the RTree for all items that intersect with the given bounding box and returns them as an array.
             * @param bbox The bounding box to search within. Must have `minX`, `minY`, `maxX`, and `maxY` properties.
             * @returns An array of all items in the tree that intersect with the given bounding box.
             */
            search(bbox: Object): any[];

            /**
             * Tests whether any item in the RTree intersects with the given bounding box.
             * 
             * Unlike `search`, this method stops as soon as the first intersection is found, making it more
             * efficient when you only need to know whether a collision exists rather than retrieving all results.
             * @param bbox The bounding box to test against. Must have `minX`, `minY`, `maxX`, and `maxY` properties.
             * @returns `true` if any item in the tree intersects with the bounding box, otherwise `false`.
             */
            collides(bbox: Object): boolean;

            /**
             * Bulk loads an array of items into the RTree.
             * 
             * Bulk loading is significantly more efficient than inserting items one by one when adding large
             * datasets, as it builds an optimally structured tree in a single pass using the OMT algorithm.
             * If the array is smaller than the minimum entry threshold, items are inserted individually instead.
             * @param data An array of items to insert. Each item must have `left`, `top`, `right`, and `bottom` properties.
             * @returns This RTree instance, for chaining.
             */
            load(data: any[]): Phaser.Structs.RTree;

            /**
             * Inserts a single item into the RTree.
             * @param item The item to insert. Must have `left`, `top`, `right`, and `bottom` properties.
             * @returns This RTree instance, for chaining.
             */
            insert(item: any): Phaser.Structs.RTree;

            /**
             * Removes all items from the RTree, resetting it to an empty state.undefined
             * @returns This RTree instance, for chaining.
             */
            clear(): Phaser.Structs.RTree;

            /**
             * Removes a single item from the RTree.
             * 
             * An optional equality function can be provided to compare items by value rather than by reference,
             * which is useful when the original item reference is not available. The function receives two items
             * and should return `true` if they are considered equal.
             * @param item The item to remove.
             * @param equalsFn An optional custom equality function taking two items and returning a boolean.
             * @returns This RTree instance, for chaining.
             */
            remove(item: any, equalsFn?: Function): Phaser.Structs.RTree;

            /**
             * Returns the raw internal tree data as a JSON-compatible object.
             * 
             * The returned value can be passed to `fromJSON` to restore the tree state at a later point.undefined
             * @returns The internal tree data object.
             */
            toJSON(): Object;

            /**
             * Populates this RTree with data previously exported via `toJSON`.
             * 
             * This allows a tree to be serialized and restored without re-inserting every item individually.
             * @param data The tree data to import, as returned by `toJSON`.
             * @returns This RTree instance, for chaining.
             */
            fromJSON(data: Object): Phaser.Structs.RTree;

            /**
             * Comparator function used to sort items by their minimum X boundary (`left` property).
             * 
             * Returns a negative number if `a` should sort before `b`, a positive number if after, or zero if equal.
             * @param a The first item to compare.
             * @param b The second item to compare.
             * @returns The difference between the `left` values of the two items.
             */
            compareMinX(a: Object, b: Object): number;

            /**
             * Comparator function used to sort items by their minimum Y boundary (`top` property).
             * 
             * Returns a negative number if `a` should sort before `b`, a positive number if after, or zero if equal.
             * @param a The first item to compare.
             * @param b The second item to compare.
             * @returns The difference between the `top` values of the two items.
             */
            compareMinY(a: Object, b: Object): number;

            /**
             * Converts a Phaser-style bounds object into the internal bounding box format used by the RTree.
             * 
             * Maps the `left`, `top`, `right`, and `bottom` properties of the input to `minX`, `minY`, `maxX`,
             * and `maxY` respectively, which is the format expected by the R-tree algorithms.
             * @param a The object to convert. Must have `left`, `top`, `right`, and `bottom` properties.
             * @returns A bounding box object with `minX`, `minY`, `maxX`, and `maxY` properties.
             */
            toBBox(a: Object): Object;

        }

        /**
         * The Size component allows you to set `width` and `height` properties and define the relationship between them.
         * 
         * The component can automatically maintain the aspect ratios between the two values, and clamp them
         * to a defined min-max range. You can also control the dominant axis. When dimensions are given to the Size component
         * that would cause it to exceed its min-max range, the dimensions are adjusted based on the dominant axis.
         */
        class Size {
            /**
             * 
             * @param width The width of the Size component. Default 0.
             * @param height The height of the Size component. If not given, it will use the `width`. Default width.
             * @param aspectMode The aspect mode of the Size component. Defaults to 0, no mode. Default 0.
             * @param parent The parent of this Size component. Can be any object with public `width` and `height` properties. Dimensions are clamped to keep them within the parent bounds where possible. Default null.
             */
            constructor(width?: number, height?: number, aspectMode?: number, parent?: any);

            /**
             * The aspect mode this Size component will use when calculating its dimensions.
             * This property is read-only. To change it use the `setAspectMode` method.
             */
            readonly aspectMode: number;

            /**
             * The proportional relationship between the width and height.
             * 
             * This property is read-only and is updated automatically when either the `width` or `height` properties are changed,
             * depending on the aspect mode.
             */
            readonly aspectRatio: number;

            /**
             * The minimum allowed width.
             * Cannot be less than zero.
             * This value is read-only. To change it see the `setMin` method.
             */
            readonly minWidth: number;

            /**
             * The minimum allowed height.
             * Cannot be less than zero.
             * This value is read-only. To change it see the `setMin` method.
             */
            readonly minHeight: number;

            /**
             * The maximum allowed width.
             * This value is read-only. To change it see the `setMax` method.
             */
            readonly maxWidth: number;

            /**
             * The maximum allowed height.
             * This value is read-only. To change it see the `setMax` method.
             */
            readonly maxHeight: number;

            /**
             * A Vector2 containing the horizontal and vertical snap values, which the width and height are snapped to during resizing.
             * 
             * By default this is disabled.
             * 
             * This property is read-only. To change it see the `setSnap` method.
             */
            readonly snapTo: Phaser.Math.Vector2;

            /**
             * Sets the aspect mode of this Size component.
             * 
             * The aspect mode controls what happens when you modify the `width` or `height` properties, or call `setSize`.
             * 
             * It can be a number from 0 to 4, or a Size constant:
             * 
             * 0. NONE = Do not make the size fit the aspect ratio. Change the ratio when the size changes.
             * 1. WIDTH_CONTROLS_HEIGHT = The height is automatically adjusted based on the width.
             * 2. HEIGHT_CONTROLS_WIDTH = The width is automatically adjusted based on the height.
             * 3. FIT = The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.
             * 4. ENVELOP = The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.
             * 
             * Calling this method automatically recalculates the `width` and the `height`, if required.
             * @param value The aspect mode value. Default 0.
             * @returns This Size component instance.
             */
            setAspectMode(value?: number): this;

            /**
             * By setting snap values, when this Size component is modified its dimensions will automatically
             * be snapped to the nearest grid slice, using floor. For example, if you have snap value of 16,
             * and the width changes to 68, then it will snap down to 64 (the closest multiple of 16 when floored)
             * 
             * Note that snapping takes place before adjustments by the parent, or the min / max settings. If these
             * values are not multiples of the given snap values, then this can result in un-snapped dimensions.
             * 
             * Call this method with no arguments to reset the snap values.
             * 
             * Calling this method automatically recalculates the `width` and the `height`, if required.
             * @param snapWidth The amount to snap the width to. If you don't want to snap the width, pass a value of zero. Default 0.
             * @param snapHeight The amount to snap the height to. If not provided it will use the `snapWidth` value. If you don't want to snap the height, pass a value of zero. Default snapWidth.
             * @returns This Size component instance.
             */
            setSnap(snapWidth?: number, snapHeight?: number): this;

            /**
             * Sets, or clears, the parent of this Size component.
             * 
             * To clear the parent call this method with no arguments.
             * 
             * The parent influences the maximum extents to which this Size component can expand,
             * based on the aspect mode:
             * 
             * NONE - The parent clamps both the width and height.
             * WIDTH_CONTROLS_HEIGHT - The parent clamps just the width.
             * HEIGHT_CONTROLS_WIDTH - The parent clamps just the height.
             * FIT - The parent clamps whichever axis is required to ensure the size fits within it.
             * ENVELOP - The parent is used to ensure the size fully envelops the parent.
             * 
             * Calling this method automatically calls `setSize`.
             * @param parent Sets the parent of this Size component. Don't provide a value to clear an existing parent.
             * @returns This Size component instance.
             */
            setParent(parent?: any): this;

            /**
             * Set the minimum width and height values this Size component will allow.
             * 
             * The minimum values can never be below zero, or greater than the maximum values.
             * 
             * Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.
             * 
             * Note that based on the aspect mode, and if this Size component has a parent set or not, the minimums set here
             * _can_ be exceeded in some situations.
             * @param width The minimum allowed width of the Size component. Default 0.
             * @param height The minimum allowed height of the Size component. If not given, it will use the `width`. Default width.
             * @returns This Size component instance.
             */
            setMin(width?: number, height?: number): this;

            /**
             * Set the maximum width and height values this Size component will allow.
             * 
             * Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.
             * 
             * Note that based on the aspect mode, and if this Size component has a parent set or not, the maximums set here
             * _can_ be exceeded in some situations.
             * @param width The maximum allowed width of the Size component. Default Number.MAX_VALUE.
             * @param height The maximum allowed height of the Size component. If not given, it will use the `width`. Default width.
             * @returns This Size component instance.
             */
            setMax(width?: number, height?: number): this;

            /**
             * Sets the width and height of this Size component based on the aspect mode.
             * 
             * If the aspect mode is 'none' then calling this method will change the aspect ratio, otherwise the current
             * aspect ratio is honored across all other modes.
             * 
             * If snapTo values have been set then the given width and height are snapped first, prior to any further
             * adjustment via min/max values, or a parent.
             * 
             * If minimum and/or maximum dimensions have been specified, the values given to this method will be clamped into
             * that range prior to adjustment, but may still exceed them depending on the aspect mode.
             * 
             * If this Size component has a parent set, and the aspect mode is `fit` or `envelop`, then the given sizes will
             * be clamped to the range specified by the parent.
             * @param width The new width of the Size component. Default 0.
             * @param height The new height of the Size component. If not given, it will use the `width`. Default width.
             * @returns This Size component instance.
             */
            setSize(width?: number, height?: number): this;

            /**
             * Sets a new aspect ratio, overriding what was there previously.
             * 
             * It then calls `setSize` immediately using the current dimensions.
             * @param ratio The new aspect ratio.
             * @returns This Size component instance.
             */
            setAspectRatio(ratio: number): this;

            /**
             * Sets a new width and height for this Size component and updates the aspect ratio based on them.
             * 
             * It _doesn't_ change the `aspectMode` and still factors in size limits such as the min max and parent bounds.
             * @param width The new width of the Size component.
             * @param height The new height of the Size component. If not given, it will use the `width`. Default width.
             * @returns This Size component instance.
             */
            resize(width: number, height?: number): this;

            /**
             * Takes a new width and passes it through the min/max clamp and then checks it doesn't exceed the parent width.
             * @param value The value to clamp and check.
             * @param checkParent Check the given value against the parent, if set. Default true.
             * @returns The modified width value.
             */
            getNewWidth(value: number, checkParent?: boolean): number;

            /**
             * Takes a new height and passes it through the min/max clamp and then checks it doesn't exceed the parent height.
             * @param value The value to clamp and check.
             * @param checkParent Check the given value against the parent, if set. Default true.
             * @returns The modified height value.
             */
            getNewHeight(value: number, checkParent?: boolean): number;

            /**
             * The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.
             * 
             * If `fit` is true there may be some space inside the target area which is not covered if its aspect ratio differs.
             * If `fit` is false the size may extend further out than the target area if the aspect ratios differ.
             * 
             * If this Size component has a parent set, then the width and height passed to this method will be clamped so
             * it cannot exceed that of the parent.
             * @param width The new width of the Size component. Default 0.
             * @param height The new height of the Size component. If not given, it will use the width value.
             * @param fit Perform a `fit` (true) constraint, or an `envelop` (false) constraint. Default true.
             * @returns This Size component instance.
             */
            constrain(width?: number, height?: number, fit?: boolean): this;

            /**
             * The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.
             * 
             * There may be some space inside the target area which is not covered if its aspect ratio differs.
             * 
             * If this Size component has a parent set, then the width and height passed to this method will be clamped so
             * it cannot exceed that of the parent.
             * @param width The new width of the Size component. Default 0.
             * @param height The new height of the Size component. If not given, it will use the width value.
             * @returns This Size component instance.
             */
            fitTo(width?: number, height?: number): this;

            /**
             * The current `width` and `height` are adjusted so that they fully envelope the given dimensions, while keeping the aspect ratio.
             * 
             * The size may extend further out than the target area if the aspect ratios differ.
             * 
             * If this Size component has a parent set, then the values are clamped so that it never exceeds the parent
             * on the longest axis.
             * @param width The new width of the Size component. Default 0.
             * @param height The new height of the Size component. If not given, it will use the width value.
             * @returns This Size component instance.
             */
            envelop(width?: number, height?: number): this;

            /**
             * Sets the width of this Size component.
             * 
             * Depending on the aspect mode, changing the width may also update the height and aspect ratio.
             * @param value The new width of the Size component.
             * @returns This Size component instance.
             */
            setWidth(value: number): this;

            /**
             * Sets the height of this Size component.
             * 
             * Depending on the aspect mode, changing the height may also update the width and aspect ratio.
             * @param value The new height of the Size component.
             * @returns This Size component instance.
             */
            setHeight(value: number): this;

            /**
             * Returns a string representation of this Size component.undefined
             * @returns A string representation of this Size component.
             */
            toString(): string;

            /**
             * Sets the values of this Size component to the `element.style.width` and `height`
             * properties of the given DOM Element. The properties are set as `px` values.
             * @param element The DOM Element to set the CSS style on.
             */
            setCSS(element: HTMLElement): void;

            /**
             * Copies the aspect mode, aspect ratio, width and height from this Size component
             * to the given Size component. Note that the parent, if set, is not copied across.
             * @param destination The Size component to copy the values to.
             * @returns The updated destination Size component.
             */
            copy(destination: Phaser.Structs.Size): Phaser.Structs.Size;

            /**
             * Destroys this Size component.
             * 
             * This clears the local properties and any parent object, if set.
             * 
             * A destroyed Size component cannot be re-used.
             */
            destroy(): void;

            /**
             * The width of this Size component.
             * 
             * This value is clamped to the range specified by `minWidth` and `maxWidth`, if enabled.
             * 
             * A width can never be less than zero.
             * 
             * Changing this value will automatically update the `height` if the aspect ratio lock is enabled.
             * You can also use the `setWidth` method.
             */
            width: number;

            /**
             * The height of this Size component.
             * 
             * This value is clamped to the range specified by `minHeight` and `maxHeight`, if enabled.
             * 
             * A height can never be less than zero.
             * 
             * Changing this value will automatically update the `width` if the aspect ratio lock is enabled.
             * You can also use the `setHeight` method.
             */
            height: number;

            /**
             * Do not make the size fit the aspect ratio. Change the ratio when the size changes.
             */
            static readonly NONE: number;

            /**
             * The height is automatically adjusted based on the width.
             */
            static readonly WIDTH_CONTROLS_HEIGHT: number;

            /**
             * The width is automatically adjusted based on the height.
             */
            static readonly HEIGHT_CONTROLS_WIDTH: number;

            /**
             * The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.
             */
            static readonly FIT: number;

            /**
             * The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.
             */
            static readonly ENVELOP: number;

        }

        namespace Events {
            /**
             * The Process Queue Add Event.
             * 
             * This event is dispatched by a Process Queue when a new item is successfully moved to its active list.
             * 
             * You will most commonly see this used by a Scene's Update List when a new Game Object has been added.
             * 
             * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('add', listener)`.
             */
            const PROCESS_QUEUE_ADD: string;

            /**
             * The Process Queue Remove Event.
             * 
             * This event is dispatched by a Process Queue when a new item is successfully removed from its active list.
             * 
             * You will most commonly see this used by a Scene's Update List when a Game Object has been removed.
             * 
             * In that instance, listen to this event from within a Scene using: `this.sys.updateList.on('remove', listener)`.
             */
            const PROCESS_QUEUE_REMOVE: string;

        }

    }

    namespace Textures {
        /**
         * A Canvas Texture is a special kind of Texture that is backed by an HTML Canvas Element as its source.
         * 
         * You can use the properties of this texture to draw to the canvas element directly, using all of the standard
         * canvas operations available in the browser. Any Game Object can be given this texture and will render with it.
         * 
         * Note: When running under WebGL the Canvas Texture needs to re-generate its base WebGLTexture and reupload it to
         * the GPU every time you modify it, otherwise the changes you make to this texture will not be visible. To do this
         * you should call `CanvasTexture.refresh()` once you are finished with your changes to the canvas. Try and keep
         * this to a minimum, especially on large canvas sizes, or you may inadvertently thrash the GPU by constantly uploading
         * texture data to it. This restriction does not apply if using the Canvas Renderer.
         * 
         * It starts with only one frame that covers the whole of the canvas. You can add further frames, that specify
         * sections of the canvas using the `add` method.
         * 
         * Should you need to resize the canvas use the `setSize` method so that it accurately updates all of the underlying
         * texture data as well. Forgetting to do this (i.e. by changing the canvas size directly from your code) could cause
         * graphical errors.
         */
        class CanvasTexture extends Phaser.Textures.Texture {
            /**
             * 
             * @param manager A reference to the Texture Manager this Texture belongs to.
             * @param key The unique string-based key of this Texture.
             * @param source The canvas element that is used as the base of this texture.
             * @param width The width of the canvas.
             * @param height The height of the canvas.
             */
            constructor(manager: Phaser.Textures.TextureManager, key: string, source: HTMLCanvasElement, width: number, height: number);

            /**
             * The source Canvas Element.
             */
            readonly canvas: HTMLCanvasElement;

            /**
             * The 2D Canvas Rendering Context.
             */
            readonly context: CanvasRenderingContext2D;

            /**
             * The width of the Canvas.
             * This property is read-only, if you wish to change it use the `setSize` method.
             */
            readonly width: number;

            /**
             * The height of the Canvas.
             * This property is read-only, if you wish to change it use the `setSize` method.
             */
            readonly height: number;

            /**
             * The context image data.
             * Use the `update` method to populate this when the canvas changes.
             */
            imageData: ImageData;

            /**
             * A Uint8ClampedArray view into the `buffer`.
             * Use the `update` method to populate this when the canvas changes.
             * Note that this is unavailable in some browsers, such as Epic Browser, due to their security restrictions.
             */
            data: Uint8ClampedArray;

            /**
             * An Uint32Array view into the `buffer`.
             */
            pixels: Uint32Array;

            /**
             * An ArrayBuffer the same size as the context ImageData.
             */
            buffer: ArrayBuffer;

            /**
             * This re-creates the `imageData` from the current context.
             * It then re-builds the ArrayBuffer, the `data` Uint8ClampedArray reference and the `pixels` Uint32Array.
             * 
             * Warning: This is a very expensive operation, so use it sparingly.undefined
             * @returns This CanvasTexture.
             */
            update(): Phaser.Textures.CanvasTexture;

            /**
             * Draws the given Image or Canvas element to this CanvasTexture, then updates the internal
             * ImageData buffer and arrays.
             * @param x The x coordinate to draw the source at.
             * @param y The y coordinate to draw the source at.
             * @param source The element to draw to this canvas.
             * @param update Update the internal ImageData buffer and arrays. Default true.
             * @returns This CanvasTexture.
             */
            draw(x: number, y: number, source: HTMLImageElement | HTMLCanvasElement, update?: boolean): Phaser.Textures.CanvasTexture;

            /**
             * Draws the given texture frame to this CanvasTexture, then updates the internal
             * ImageData buffer and arrays.
             * @param key The unique string-based key of the Texture.
             * @param frame The string-based name, or integer based index, of the Frame to get from the Texture.
             * @param x The x coordinate to draw the source at. Default 0.
             * @param y The y coordinate to draw the source at. Default 0.
             * @param update Update the internal ImageData buffer and arrays. Default true.
             * @returns This CanvasTexture.
             */
            drawFrame(key: string, frame?: string | number, x?: number, y?: number, update?: boolean): Phaser.Textures.CanvasTexture;

            /**
             * Sets a pixel in the CanvasTexture to the given color and alpha values.
             * 
             * This is an expensive operation to run in large quantities, so use sparingly.
             * @param x The x coordinate of the pixel to set. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @param y The y coordinate of the pixel to set. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @param red The red color value. A number between 0 and 255.
             * @param green The green color value. A number between 0 and 255.
             * @param blue The blue color value. A number between 0 and 255.
             * @param alpha The alpha value. A number between 0 and 255. Default 255.
             * @returns This CanvasTexture.
             */
            setPixel(x: number, y: number, red: number, green: number, blue: number, alpha?: number): this;

            /**
             * Puts the ImageData into the context of this CanvasTexture at the given coordinates.
             * @param imageData The ImageData to put at the given location.
             * @param x The x coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @param y The y coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @param dirtyX Horizontal position (x coordinate) of the top-left corner from which the image data will be extracted. Default 0.
             * @param dirtyY Vertical position (y coordinate) of the top-left corner from which the image data will be extracted. Default 0.
             * @param dirtyWidth Width of the rectangle to be painted. Defaults to the width of the image data.
             * @param dirtyHeight Height of the rectangle to be painted. Defaults to the height of the image data.
             * @returns This CanvasTexture.
             */
            putData(imageData: ImageData, x: number, y: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): this;

            /**
             * Gets an ImageData region from this CanvasTexture from the position and size specified.
             * You can write this back using `CanvasTexture.putData`, or manipulate it.
             * @param x The x coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @param y The y coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @param width The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.
             * @param height The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.
             * @returns The ImageData extracted from this CanvasTexture.
             */
            getData(x: number, y: number, width: number, height: number): ImageData;

            /**
             * Get the color of a specific pixel from this texture and store it in a Color object.
             * 
             * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,
             * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
             * @param x The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @param y The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @param out A Color object to store the pixel values in. If not provided a new Color object will be created.
             * @returns An object with the red, green, blue and alpha values set in the r, g, b and a properties.
             */
            getPixel(x: number, y: number, out?: Phaser.Display.Color): Phaser.Display.Color;

            /**
             * Returns an array containing all of the pixels in the given region.
             * 
             * If the requested region extends outside the bounds of this CanvasTexture,
             * the region is truncated to fit.
             * 
             * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,
             * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
             * @param x The x coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer. Default 0.
             * @param y The y coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer. Default 0.
             * @param width The width of the region to get. Must be an integer. Defaults to the canvas width if not given.
             * @param height The height of the region to get. Must be an integer. If not given will be set to the `width`.
             * @returns A 2d array of Pixel objects.
             */
            getPixels(x?: number, y?: number, width?: number, height?: number): Phaser.Types.Textures.PixelConfig[][];

            /**
             * Returns the Image Data index for the given pixel in this CanvasTexture.
             * 
             * The index can be used to read directly from the `this.data` array.
             * 
             * The index points to the red value in the array. The subsequent 3 indexes
             * point to green, blue and alpha respectively.
             * @param x The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @param y The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.
             * @returns The index of the pixel in the image data array, or -1 if the coordinates are out of bounds.
             */
            getIndex(x: number, y: number): number;

            /**
             * This should be called manually if you are running under WebGL.
             * It will refresh the WebGLTexture from the Canvas source. Only call this if you know that the
             * canvas has changed, as there is a significant GPU texture allocation cost involved in doing so.undefined
             * @returns This CanvasTexture.
             */
            refresh(): Phaser.Textures.CanvasTexture;

            /**
             * Gets the Canvas Element.undefined
             * @returns The Canvas DOM element this texture is using.
             */
            getCanvas(): HTMLCanvasElement;

            /**
             * Gets the 2D Canvas Rendering Context.undefined
             * @returns The Canvas Rendering Context this texture is using.
             */
            getContext(): CanvasRenderingContext2D;

            /**
             * Clears the given region of this Canvas Texture, resetting it back to transparent.
             * If no region is given, the whole Canvas Texture is cleared.
             * @param x The x coordinate of the top-left of the region to clear. Default 0.
             * @param y The y coordinate of the top-left of the region to clear. Default 0.
             * @param width The width of the region.
             * @param height The height of the region.
             * @param update Update the internal ImageData buffer and arrays. Default true.
             * @returns The Canvas Texture.
             */
            clear(x?: number, y?: number, width?: number, height?: number, update?: boolean): Phaser.Textures.CanvasTexture;

            /**
             * Changes the size of this Canvas Texture.
             * @param width The new width of the Canvas.
             * @param height The new height of the Canvas. If not given it will use the width as the height.
             * @returns The Canvas Texture.
             */
            setSize(width: number, height?: number): Phaser.Textures.CanvasTexture;

            /**
             * Destroys this Texture and releases references to its sources and frames.
             */
            destroy(): void;

        }

        /**
         * A Dynamic Texture is a special texture that allows you to draw textures, frames and most kind of
         * Game Objects directly to it.
         * 
         * You can take many complex objects and draw them to this one texture, which can then be used as the
         * base texture for other Game Objects, such as Sprites. Should you then update this texture, all
         * Game Objects using it will instantly be updated as well, reflecting the changes immediately.
         * 
         * It's a powerful way to generate dynamic textures at run-time that are WebGL friendly and don't invoke
         * expensive GPU uploads on each change.
         * 
         * ```js
         * const t = this.textures.addDynamicTexture('player', 64, 128);
         * // draw objects to t
         * this.add.sprite(x, y, 'player');
         * this.render();
         * ```
         * 
         * Because this is a standard Texture within Phaser, you can add frames to it, meaning you can use it
         * to generate sprite sheets, texture atlases or tile sets.
         * 
         * Under WebGL1, a FrameBuffer, which is what this Dynamic Texture uses internally, cannot be anti-aliased.
         * This means that when drawing objects such as Shapes or Graphics instances to this texture, they may appear
         * to be drawn with no aliasing around the edges. This is a technical limitation of WebGL1. To get around it,
         * create your shape as a texture in an art package, then draw that to this texture.
         * 
         * If you activate mipmap support in your game, it will not automatically
         * be applied to DynamicTextures.
         * This is because regenerating the mipmap for a texture
         * costs over 10 microseconds, a big performance loss for a single frame.
         * If you want to render your DynamicTextures with mipmaps,
         * you must also activate the render config option `mipmapRegeneration`.
         * 
         * In the event that the WebGL context is lost, this DynamicTexture will
         * lose its contents. Once context is restored (signalled by the `restorewebgl`
         * event), you can choose to redraw the contents of the DynamicTexture.
         * You are responsible for the redrawing logic.
         */
        class DynamicTexture extends Phaser.Textures.Texture {
            /**
             * 
             * @param manager A reference to the Texture Manager this Texture belongs to.
             * @param key The unique string-based key of this Texture.
             * @param width The width of this Dynamic Texture in pixels. Defaults to 256 x 256. Default 256.
             * @param height The height of this Dynamic Texture in pixels. Defaults to 256 x 256. Default 256.
             * @param forceEven Force the given width and height to be rounded to even values. This significantly improves the rendering quality. Set to false if you know you need an odd sized texture. Default true.
             */
            constructor(manager: Phaser.Textures.TextureManager, key: string, width?: number, height?: number, forceEven?: boolean);

            /**
             * The internal data type of this object.
             */
            readonly type: string;

            /**
             * A reference to either the Canvas or WebGL Renderer that the Game instance is using.
             */
            renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer;

            /**
             * The width of this Dynamic Texture.
             * 
             * Treat this property as read-only. Use the `setSize` method to change the size.
             */
            width: number;

            /**
             * The height of this Dynamic Texture.
             * 
             * Treat this property as read-only. Use the `setSize` method to change the size.
             */
            height: number;

            /**
             * An array of commands that are used to draw to this Dynamic Texture.
             * This is flushed by the `render` method.
             * The `clear` method will also clear this array, then store itself.
             */
            commandBuffer: any[];

            /**
             * A reference to the Rendering Context belonging to the Canvas Element this Dynamic Texture is drawing to.
             */
            canvas: HTMLCanvasElement;

            /**
             * The 2D Canvas Rendering Context.
             */
            readonly context: CanvasRenderingContext2D;

            /**
             * An internal Camera that can be used to move around this Dynamic Texture.
             * 
             * Control it just like you would any Scene Camera. The difference is that it only impacts
             * the placement of **Game Objects** (not textures) that you then draw to this texture.
             * 
             * You can scroll, zoom and rotate this Camera.
             */
            camera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The drawing context of this Dynamic Texture.
             * This contains the framebuffer that the Dynamic Texture is drawing to.
             */
            drawingContext: Phaser.Renderer.WebGL.DrawingContext;

            /**
             * Resizes this Dynamic Texture to the new dimensions given.
             * 
             * In WebGL it will destroy and then re-create the frame buffer being used by this Dynamic Texture.
             * In Canvas it will resize the underlying canvas DOM element.
             * 
             * Both approaches will erase everything currently drawn to this texture.
             * 
             * If the dimensions given are the same as those already being used, calling this method will do nothing.
             * @param width The new width of this Dynamic Texture.
             * @param height The new height of this Dynamic Texture. If not specified, will be set the same as the `width`. Default width.
             * @param forceEven Force the given width and height to be rounded to even values. This significantly improves the rendering quality. Set to false if you know you need an odd sized texture. Default true.
             * @returns This Dynamic Texture.
             */
            setSize(width: number, height?: number, forceEven?: boolean): this;

            /**
             * Render the buffered drawing commands to this Dynamic Texture.
             * You must do this in order to see anything drawn to it.undefined
             * @returns This Dynamic Texture instance.
             */
            render(): this;

            /**
             * Fills this Dynamic Texture with the given color.
             * 
             * By default it will fill the entire texture, however you can set it to fill a specific
             * rectangular area by using the x, y, width and height arguments.
             * 
             * The color should be given in hex format, i.e. 0xff0000 for red, 0x00ff00 for green, etc.
             * @param rgb The color to fill this Dynamic Texture with, such as 0xff0000 for red.
             * @param alpha The alpha value used by the fill. Default 1.
             * @param x The left coordinate of the fill rectangle. Default 0.
             * @param y The top coordinate of the fill rectangle. Default 0.
             * @param width The width of the fill rectangle. Default this.width.
             * @param height The height of the fill rectangle. Default this.height.
             * @returns This Dynamic Texture instance.
             */
            fill(rgb: number, alpha?: number, x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Clears a portion or everything from this Dynamic Texture by erasing it and resetting it back to
             * a blank, transparent, texture. To clear an area, specify the `x`, `y`, `width` and `height`.
             * @param x The left coordinate of the area to clear. Default 0.
             * @param y The top coordinate of the area to clear. Default 0.
             * @param width The width of the area to clear. Default this.width.
             * @param height The height of the area to clear. Default this.height.
             * @returns This Dynamic Texture instance.
             */
            clear(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Takes the given texture key and frame and then stamps it at the given
             * x and y coordinates. You can use the optional 'config' argument to provide
             * lots more options about how the stamp is applied, including the alpha,
             * tint, angle, scale and origin.
             * 
             * By default, the frame will stamp on the x/y coordinates based on its center.
             * 
             * If you wish to stamp from the top-left, set the config `originX` and
             * `originY` properties both to zero.
             * 
             * This method ignores the `camera` property of the Dynamic Texture.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture. Set to `null` to skip this argument if not required.
             * @param x The x position to draw the frame at. Default 0.
             * @param y The y position to draw the frame at. Default 0.
             * @param config The stamp configuration object, allowing you to set the alpha, tint, angle, scale and origin of the stamp.
             * @returns This Dynamic Texture instance.
             */
            stamp(key: string, frame?: string | number, x?: number, y?: number, config?: Phaser.Types.Textures.StampConfig): this;

            /**
             * Draws the given object, or an array of objects, to this Dynamic Texture using a blend mode of ERASE.
             * This has the effect of erasing any filled pixels present in the objects from this texture.
             * 
             * This method uses the `draw` method internally,
             * and the parameters behave the same way.
             * @param entries Any renderable Game Object, or Group, Container, Display List, Render Texture, Texture Frame, or an array of any of these.
             * @param x The x position to draw the Frame at, or the offset applied to the object. Default 0.
             * @param y The y position to draw the Frame at, or the offset applied to the object. Default 0.
             * @param alpha The alpha value. Only used when drawing Texture Frames to this texture. Game Objects use their own alpha. Default 1.
             * @param tint The tint color value. Only used when drawing Texture Frames to this texture. Game Objects use their own tint. WebGL only. Default 0xffffff.
             * @returns This Dynamic Texture instance.
             */
            erase(entries: any, x?: number, y?: number, alpha?: number, tint?: number): this;

            /**
             * Draws the given object, or an array of objects, to this Dynamic Texture.
             * 
             * It can accept any of the following:
             * 
             * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.
             * * Tilemap Layers.
             * * A Group. The contents of which will be iterated and drawn in turn.
             * * A Container. The contents of which will be iterated fully, and drawn in turn.
             * * A Scene Display List. Pass in `Scene.children` to draw the whole list.
             * * Another Dynamic Texture, or a Render Texture.
             * * A Texture Frame instance.
             * * A string. This is used to look-up the texture from the Texture Manager.
             * 
             * Note 1: You cannot draw a Dynamic Texture to itself.
             * 
             * Note 2: GameObjects will use the camera, while textures and frames will not.
             * Textures and frames are drawn using the `stamp` method.
             * 
             * If passing in a Group or Container it will only draw children that return `true`
             * when their `willRender()` method is called. I.e. a Container with 10 children,
             * 5 of which have `visible=false` will only draw the 5 visible ones.
             * 
             * If passing in an array of Game Objects it will draw them all, regardless if
             * they pass a `willRender` check or not.
             * 
             * You can pass in a string in which case it will look for a texture in the Texture
             * Manager matching that string, and draw the base frame. If you need to specify
             * exactly which frame to draw then use the method `drawFrame` instead.
             * 
             * You can pass in the `x` and `y` coordinates to draw the objects at. The use of
             * the coordinates differ based on what objects are being drawn. If the object is
             * a Group, Container or Display List, the coordinates are _added_ to the positions
             * of the children. For all other types of object, the coordinates are exact.
             * For textures and frames, the `x` and `y` values are the middle of the texture.
             * 
             * The `alpha` and `tint` values are only used by Texture Frames.
             * Game Objects use their own alpha and tint values when being drawn.
             * @param entries Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these.
             * @param x The x position to draw the Frame at, or the offset applied to the object. Default 0.
             * @param y The y position to draw the Frame at, or the offset applied to the object. Default 0.
             * @param alpha The alpha value. Only used when drawing Texture Frames to this texture. Game Objects use their own alpha. Default 1.
             * @param tint The tint color value. Only used when drawing Texture Frames to this texture. Game Objects use their own tint. WebGL only. Default 0xffffff.
             * @returns This Dynamic Texture instance.
             */
            draw(entries: any, x?: number, y?: number, alpha?: number, tint?: number): this;

            /**
             * Draws the given object to this Dynamic Texture.
             * This allows you to draw the object as it appears in the game world,
             * or with various parameter overrides in the config.
             * @param entry Any renderable GameObject.
             * @param config The configuration object for the capture.
             * @returns This Dynamic Texture instance.
             */
            capture(entry: Phaser.GameObjects.GameObject, config: Phaser.Types.Textures.CaptureConfig): this;

            /**
             * Prepares an object to be rendered using the `capture` method.
             * This method is called automatically during rendering.
             * Do not call it directly.
             * @param entry The object to set up for capture.
             * @param config The configuration object for the capture.
             * @returns A configuration object containing the appropriate parent transform in `transform`, and the cached object properties in any fields that were overridden.
             */
            startCapture(entry: Phaser.GameObjects.GameObject, config: Phaser.Types.Textures.CaptureConfig): Phaser.Types.Textures.CaptureConfig;

            /**
             * Restores the object properties that were overridden during the `capture` method.
             * This method is called automatically during rendering.
             * Do not call it directly.
             * @param entry The GameObject to restore the properties on.
             * @param cacheConfig The cached properties to restore.
             */
            finishCapture(entry: Phaser.GameObjects.GameObject, cacheConfig: Phaser.Types.Textures.CaptureConfig): void;

            /**
             * Takes the given Texture Frame and draws it to this Dynamic Texture as a fill pattern,
             * i.e. in a grid-layout based on the frame dimensions.
             * It uses a `TileSprite` internally to draw the frame repeatedly.
             * 
             * Textures are referenced by their string-based keys, as stored in the Texture Manager.
             * 
             * You can optionally provide a position, width, height, alpha and tint value to apply to
             * the frames before they are drawn. The position controls the top-left where the repeating
             * fill will start from. The width and height control the size of the filled area.
             * 
             * The position can be negative if required, but the dimensions cannot.
             * 
             * This method respects the camera settings of the Dynamic Texture.
             * @param key The key of the texture to be used, as stored in the Texture Manager.
             * @param frame The name or index of the frame within the Texture. Set to `null` to skip this argument if not required.
             * @param x The x position to start drawing the frames from (can be negative to offset). Default 0.
             * @param y The y position to start drawing the frames from (can be negative to offset). Default 0.
             * @param width The width of the area to repeat the frame within. Defaults to the width of this Dynamic Texture. Default this.width.
             * @param height The height of the area to repeat the frame within. Defaults to the height of this Dynamic Texture. Default this.height.
             * @param config The configuration object for the TileSprite which repeats the texture, allowing you to set further properties on it.
             * @returns This Dynamic Texture instance.
             */
            repeat(key: string, frame?: string | number, x?: number, y?: number, width?: number, height?: number, config?: Phaser.Types.GameObjects.TileSprite.TileSpriteConfig): this;

            /**
             * Sets the preserve flag for this Dynamic Texture.
             * Ordinarily, after each render, the command buffer is cleared.
             * When this flag is set to `true`, the command buffer is preserved between renders.
             * This makes it possible to repeat the same drawing commands on each render.
             * 
             * Make sure to call `clear()` at the start if you don't want to accumulate
             * drawing detail over the top of itself.
             * @param preserve Whether to preserve the command buffer after rendering.
             * @returns This Dynamic Texture instance.
             */
            preserve(preserve: boolean): this;

            /**
             * Adds a callback to run during the render process.
             * This callback runs as a step in the command buffer.
             * It can be used to set up conditions for the next draw step.
             * 
             * Note that this will only execute after `render()` is called.
             * @param callback A callback function to run during the render process.
             * @returns This Dynamic Texture instance.
             */
            callback(callback: Function): this;

            /**
             * Takes a snapshot of the given area of this Dynamic Texture.
             * 
             * The snapshot is taken immediately, but the results are returned via the given callback.
             * 
             * To capture the whole Dynamic Texture see the `snapshot` method.
             * To capture just a specific pixel, see the `snapshotPixel` method.
             * 
             * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer
             * into an ArrayBufferView. It then parses this, copying the contents to a temporary Canvas and finally
             * creating an Image object from it, which is the image returned to the callback provided.
             * 
             * All in all, this is a computationally expensive and blocking process, which gets more expensive
             * the larger the resolution this Dynamic Texture has, so please be careful how you employ this in your game.
             * @param x The x coordinate to grab from.
             * @param y The y coordinate to grab from.
             * @param width The width of the area to grab.
             * @param height The height of the area to grab.
             * @param callback The Function to invoke after the snapshot image is created.
             * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
             * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
             * @returns This Dynamic Texture instance.
             */
            snapshotArea(x: number, y: number, width: number, height: number, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, type?: string, encoderOptions?: number): this;

            /**
             * Takes a snapshot of the whole of this Dynamic Texture.
             * 
             * The snapshot is taken immediately, but the results are returned via the given callback.
             * 
             * To capture a portion of this Dynamic Texture see the `snapshotArea` method.
             * To capture just a specific pixel, see the `snapshotPixel` method.
             * 
             * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer
             * into an ArrayBufferView. It then parses this, copying the contents to a temporary Canvas and finally
             * creating an Image object from it, which is the image returned to the callback provided.
             * 
             * All in all, this is a computationally expensive and blocking process, which gets more expensive
             * the larger the resolution this Dynamic Texture has, so please be careful how you employ this in your game.
             * @param callback The Function to invoke after the snapshot image is created.
             * @param type The format of the image to create, usually `image/png` or `image/jpeg`. Default 'image/png'.
             * @param encoderOptions The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`. Default 0.92.
             * @returns This Dynamic Texture instance.
             */
            snapshot(callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback, type?: string, encoderOptions?: number): this;

            /**
             * Takes a snapshot of the given pixel from this Dynamic Texture.
             * 
             * The snapshot is taken immediately, but the results are returned via the given callback.
             * 
             * To capture the whole Dynamic Texture see the `snapshot` method.
             * To capture a portion of this Dynamic Texture see the `snapshotArea` method.
             * 
             * Unlike the two other snapshot methods, this one will send your callback a `Color` object
             * containing the color data for the requested pixel. It doesn't need to create an internal
             * Canvas or Image object, so is a lot faster to execute, using less memory than the other snapshot methods.
             * @param x The x coordinate of the pixel to get.
             * @param y The y coordinate of the pixel to get.
             * @param callback The Function to invoke after the snapshot pixel data is extracted.
             * @returns This Dynamic Texture instance.
             */
            snapshotPixel(x: number, y: number, callback: Phaser.Types.Renderer.Snapshot.SnapshotCallback): this;

            /**
             * Returns the underlying WebGLTextureWrapper, if not running in Canvas mode.undefined
             * @returns The underlying WebGLTextureWrapper, if not running in Canvas mode.
             */
            getWebGLTexture(): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | null;

            /**
             * Sets this Dynamic Texture onto the TextureManager.Stamp
             * and then calls its render method.
             * @param renderer A reference to the current active WebGL renderer.
             * @param src The Game Object being rendered in this call.
             * @param camera The Camera that is rendering the Game Object.
             * @param parentMatrix This transform matrix is defined if the game object is nested
             */
            renderWebGL(renderer: Phaser.Renderer.WebGL.WebGLRenderer, src: Phaser.GameObjects.Image, camera: Phaser.Cameras.Scene2D.Camera, parentMatrix: Phaser.GameObjects.Components.TransformMatrix): void;

            /**
             * This is a NOOP method. Dynamic Textures cannot render themselves to the Canvas Renderer directly.
             * @param renderer The Canvas Renderer which would be rendered to.
             * @param mask The masked Game Object which would be rendered.
             * @param camera The Camera to render to.
             */
            renderCanvas(renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer, mask: Phaser.GameObjects.GameObject, camera: Phaser.Cameras.Scene2D.Camera): void;

            /**
             * Destroys this Texture and releases references to its sources and frames.
             */
            destroy(): void;

        }

        /**
         * A Frame is a section of a Texture. It defines a rectangular sub-region within a
         * Texture Source, storing its position, dimensions, UV coordinates, and optional trim
         * data (for packed atlas frames with whitespace removed). Frames are the primary unit
         * of texture addressing used by Game Objects -- when a Sprite displays a particular
         * image, it references a Frame.
         */
        class Frame {
            /**
             * 
             * @param texture The Texture this Frame is a part of.
             * @param name The name of this Frame. The name is unique within the Texture.
             * @param sourceIndex The index of the TextureSource that this Frame is a part of.
             * @param x The x coordinate of the top-left of this Frame.
             * @param y The y coordinate of the top-left of this Frame.
             * @param width The width of this Frame.
             * @param height The height of this Frame.
             */
            constructor(texture: Phaser.Textures.Texture, name: number | string, sourceIndex: number, x: number, y: number, width: number, height: number);

            /**
             * The Texture this Frame is a part of.
             */
            texture: Phaser.Textures.Texture;

            /**
             * The name of this Frame.
             * The name is unique within the Texture.
             */
            name: string;

            /**
             * The TextureSource this Frame is part of.
             */
            source: Phaser.Textures.TextureSource;

            /**
             * The index of the TextureSource in the Texture sources array.
             */
            sourceIndex: number;

            /**
             * X position within the source image to cut from.
             */
            cutX: number;

            /**
             * Y position within the source image to cut from.
             */
            cutY: number;

            /**
             * The width of the area in the source image to cut.
             */
            cutWidth: number;

            /**
             * The height of the area in the source image to cut.
             */
            cutHeight: number;

            /**
             * The X rendering offset of this Frame, taking trim into account.
             */
            x: number;

            /**
             * The Y rendering offset of this Frame, taking trim into account.
             */
            y: number;

            /**
             * The rendering width of this Frame, taking trim into account.
             */
            width: number;

            /**
             * The rendering height of this Frame, taking trim into account.
             */
            height: number;

            /**
             * Half the width, floored.
             * Precalculated for the renderer.
             */
            halfWidth: number;

            /**
             * Half the height, floored.
             * Precalculated for the renderer.
             */
            halfHeight: number;

            /**
             * The x center of this frame, floored.
             */
            centerX: number;

            /**
             * The y center of this frame, floored.
             */
            centerY: number;

            /**
             * The horizontal pivot point of this Frame.
             */
            pivotX: number;

            /**
             * The vertical pivot point of this Frame.
             */
            pivotY: number;

            /**
             * Does this Frame have a custom pivot point?
             */
            customPivot: boolean;

            /**
             * **CURRENTLY UNSUPPORTED**
             * 
             * Is this frame rotated or not in the Texture?
             * Rotation allows you to use rotated frames in texture atlas packing.
             * It has nothing to do with Sprite rotation.
             */
            rotated: boolean;

            /**
             * Overrides the Renderer setting.
             * -1 = use Renderer Setting
             * 0 = No rounding
             * 1 = Round
             */
            autoRound: number;

            /**
             * Any Frame specific custom data can be stored here.
             */
            customData: object;

            /**
             * WebGL UV u0 value.
             */
            u0: number;

            /**
             * WebGL UV v0 value.
             */
            v0: number;

            /**
             * WebGL UV u1 value.
             */
            u1: number;

            /**
             * WebGL UV v1 value.
             */
            v1: number;

            /**
             * Sets the x and y position within the source image to cut from.
             * @param x X position within the source image to cut from. Default 0.
             * @param y Y position within the source image to cut from. Default 0.
             * @returns This Frame object.
             */
            setCutPosition(x?: number, y?: number): this;

            /**
             * Sets the width and height of the area in the source image to cut.
             * @param width The width of the area in the source image to cut.
             * @param height The height of the area in the source image to cut.
             * @returns This Frame object.
             */
            setCutSize(width: number, height: number): this;

            /**
             * Sets the width, height, x and y of this Frame.
             * 
             * This is called automatically by the constructor
             * and should rarely be changed on-the-fly.
             * @param width The width of the frame before being trimmed.
             * @param height The height of the frame before being trimmed.
             * @param x The x coordinate of the top-left of this Frame. Default 0.
             * @param y The y coordinate of the top-left of this Frame. Default 0.
             * @returns This Frame object.
             */
            setSize(width: number, height: number, x?: number, y?: number): this;

            /**
             * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.
             * @param actualWidth The width of the frame before being trimmed.
             * @param actualHeight The height of the frame before being trimmed.
             * @param destX The destination X position of the trimmed frame for display.
             * @param destY The destination Y position of the trimmed frame for display.
             * @param destWidth The destination width of the trimmed frame for display.
             * @param destHeight The destination height of the trimmed frame for display.
             * @returns This Frame object.
             */
            setTrim(actualWidth: number, actualHeight: number, destX: number, destY: number, destWidth: number, destHeight: number): this;

            /**
             * Sets the scale9 center rectangle values.
             * 
             * Scale9 is a feature of Texture Packer, allowing you to define a nine-slice scaling grid.
             * 
             * This is set automatically by the JSONArray and JSONHash parsers.
             * @param x The left coordinate of the center scale9 rectangle.
             * @param y The top coordinate of the center scale9 rectangle.
             * @param width The width of the center scale9 rectangle.
             * @param height The height of the center scale9 rectangle.
             * @returns This Frame object.
             */
            setScale9(x: number, y: number, width: number, height: number): this;

            /**
             * Takes a crop data object and, based on the rectangular region given, calculates the
             * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.
             * 
             * The crop size as well as coordinates can not exceed the size of the frame.
             * 
             * This is called directly by the Game Object Texture Components `setCrop` method.
             * Please use that method to crop a Game Object.
             * @param crop The crop data object. This is the `GameObject._crop` property.
             * @param x The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.
             * @param y The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.
             * @param width The width of the crop rectangle. Cannot exceed the Frame width.
             * @param height The height of the crop rectangle. Cannot exceed the Frame height.
             * @param flipX Does the parent Game Object have flipX set?
             * @param flipY Does the parent Game Object have flipY set?
             * @returns The updated crop data object.
             */
            setCropUVs(crop: object, x: number, y: number, width: number, height: number, flipX: boolean, flipY: boolean): object;

            /**
             * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.
             * Called automatically by `setFrame`.
             * @param crop The crop data object. This is the `GameObject._crop` property.
             * @param flipX Does the parent Game Object have flipX set?
             * @param flipY Does the parent Game Object have flipY set?
             * @returns The updated crop data object.
             */
            updateCropUVs(crop: object, flipX: boolean, flipY: boolean): object;

            /**
             * Directly sets the canvas and WebGL UV data for this frame.
             * 
             * Use this if you need to override the values that are generated automatically
             * when the Frame is created.
             * @param width Width of this frame for the Canvas data.
             * @param height Height of this frame for the Canvas data.
             * @param u0 UV u0 value.
             * @param v0 UV v0 value.
             * @param u1 UV u1 value.
             * @param v1 UV v1 value.
             * @returns This Frame object.
             */
            setUVs(width: number, height: number, u0: number, v0: number, u1: number, v1: number): this;

            /**
             * Updates the internal WebGL UV cache and the drawImage cache.undefined
             * @returns This Frame object.
             */
            updateUVs(): this;

            /**
             * Updates the internal WebGL UV cache for a rotated frame, swapping the width and height
             * axes so that the UV coordinates map correctly to a frame that has been rotated 90 degrees
             * in the texture atlas.undefined
             * @returns This Frame object.
             */
            updateUVsInverted(): this;

            /**
             * Clones this Frame into a new Frame object.undefined
             * @returns A clone of this Frame.
             */
            clone(): Phaser.Textures.Frame;

            /**
             * Destroys this Frame by nulling its reference to the parent Texture and data objects.
             */
            destroy(): void;

            /**
             * A reference to the Texture Source WebGL Texture that this Frame is using.
             */
            readonly glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,
             * before being packed.
             */
            readonly realWidth: number;

            /**
             * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,
             * before being packed.
             */
            readonly realHeight: number;

            /**
             * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)
             */
            readonly radius: number;

            /**
             * Is the Frame trimmed or not?
             */
            readonly trimmed: boolean;

            /**
             * Does the Frame have scale9 border data?
             */
            readonly scale9: boolean;

            /**
             * If the Frame has scale9 border data, is it 3-slice or 9-slice data?
             */
            readonly is3Slice: boolean;

            /**
             * The Canvas drawImage data object.
             */
            readonly canvasData: object;

        }

        /**
         * A Texture consists of a source, usually an Image from the Cache, and a collection of Frames.
         * The Frames represent the different areas of the Texture. For example a texture atlas
         * may have many Frames, one for each element within the atlas. Where-as a single image would have
         * just one frame, that encompasses the whole image.
         * 
         * Every Texture, no matter where it comes from, always has at least 1 frame called the `__BASE` frame.
         * This frame represents the entirety of the source image.
         * 
         * Textures are managed by the global TextureManager. This is a singleton class that is
         * responsible for creating and delivering Textures and their corresponding Frames to Game Objects.
         * 
         * Sprites and other Game Objects get the texture data they need from the TextureManager.
         */
        class Texture {
            /**
             * 
             * @param manager A reference to the Texture Manager this Texture belongs to.
             * @param key The unique string-based key of this Texture.
             * @param source An array of sources that are used to create the texture. Usually Images, but can also be a Canvas.
             * @param width The width of the Texture. This is optional and automatically derived from the source images.
             * @param height The height of the Texture. This is optional and automatically derived from the source images.
             */
            constructor(manager: Phaser.Textures.TextureManager, key: string, source: HTMLImageElement | HTMLCanvasElement | HTMLImageElement[] | HTMLCanvasElement[] | Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, width?: number, height?: number);

            /**
             * A reference to the Texture Manager this Texture belongs to.
             */
            manager: Phaser.Textures.TextureManager;

            /**
             * The unique string-based key of this Texture.
             */
            key: string;

            /**
             * An array of TextureSource instances.
             * These are unique to this Texture and contain the actual Image (or Canvas) data.
             */
            source: Phaser.Textures.TextureSource[];

            /**
             * An array of TextureSource data instances.
             * Used to store additional data images, such as normal maps or specular maps.
             */
            dataSource: any[];

            /**
             * A key-value object pair associating the unique Frame keys with the Frames objects.
             */
            frames: object;

            /**
             * Any additional data that was set in the source JSON (if any),
             * or any extra data you'd like to store relating to this texture.
             */
            customData: object;

            /**
             * The name of the first frame of the Texture.
             */
            firstFrame: string;

            /**
             * The total number of Frames in this Texture, including the `__BASE` frame.
             * 
             * A Texture will always contain at least 1 frame because every Texture contains a `__BASE` frame by default,
             * in addition to any extra frames that have been added to it, such as when parsing a Sprite Sheet or Texture Atlas.
             */
            frameTotal: number;

            /**
             * Controls whether shaders using this texture should apply smooth interpolation
             * when rendering pixel art. When enabled, the renderer uses shader-based smoothing
             * to reduce the jagged appearance of upscaled pixel art. This relies on shader support.
             * 
             * If `null`, the game default will be used.
             */
            smoothPixelArt: boolean | null;

            /**
             * Adds a new Frame to this Texture.
             * 
             * A Frame is a rectangular region of a TextureSource with a unique index or string-based key.
             * 
             * The name given must be unique within this Texture. If it already exists, this method will return `null`.
             * @param name The name of this Frame. The name is unique within the Texture.
             * @param sourceIndex The index of the TextureSource that this Frame is a part of.
             * @param x The x coordinate of the top-left of this Frame.
             * @param y The y coordinate of the top-left of this Frame.
             * @param width The width of this Frame.
             * @param height The height of this Frame.
             * @returns The Frame that was added to this Texture, or `null` if the given name already exists.
             */
            add(name: number | string, sourceIndex: number, x: number, y: number, width: number, height: number): Phaser.Textures.Frame | null;

            /**
             * Removes the given Frame from this Texture. The Frame is destroyed immediately.
             * 
             * Any Game Objects using this Frame should stop using it _before_ you remove it,
             * as it does not happen automatically.
             * @param name The key of the Frame to remove.
             * @returns True if a Frame with the matching key was removed from this Texture.
             */
            remove(name: string): boolean;

            /**
             * Checks to see if a Frame matching the given key exists within this Texture.
             * @param name The key of the Frame to check for.
             * @returns True if a Frame with the matching key exists in this Texture.
             */
            has(name: string): boolean;

            /**
             * Gets a Frame from this Texture based on either the key or the index of the Frame.
             * 
             * In a Texture Atlas Frames are typically referenced by a key.
             * In a Sprite Sheet Frames are referenced by an index.
             * Passing no value for the name returns the base texture.
             * @param name The string-based name, or integer based index, of the Frame to get from this Texture.
             * @returns The Texture Frame.
             */
            get(name?: string | number): Phaser.Textures.Frame;

            /**
             * Takes the given TextureSource and returns the index of it within this Texture.
             * If it's not in this Texture, it returns -1.
             * Unless this Texture has multiple TextureSources, such as with a multi-atlas, this
             * method will always return zero or -1.
             * @param source The TextureSource to check.
             * @returns The index of the TextureSource within this Texture, or -1 if not in this Texture.
             */
            getTextureSourceIndex(source: Phaser.Textures.TextureSource): number;

            /**
             * Returns an array of all the Frames in the given TextureSource.
             * @param sourceIndex The index of the TextureSource to get the Frames from.
             * @param includeBase Include the `__BASE` Frame in the output array? Default false.
             * @returns An array of Texture Frames.
             */
            getFramesFromTextureSource(sourceIndex: number, includeBase?: boolean): Phaser.Textures.Frame[];

            /**
             * Based on the given Texture Source Index, this method will get all of the Frames using
             * that source and then work out the bounds that they encompass, returning them in an object.
             * 
             * This is useful if this Texture is, for example, a sprite sheet within an Atlas, and you
             * need to know the total bounds of the sprite sheet.
             * @param sourceIndex The index of the TextureSource to get the Frame bounds from. Default 0.
             * @returns An object containing the bounds of the Frames using the given Texture Source Index.
             */
            getFrameBounds(sourceIndex?: number): Phaser.Types.Math.RectangleLike;

            /**
             * Returns an array with all of the names of the Frames in this Texture.
             * 
             * Useful if you want to randomly assign a Frame to a Game Object, as you can
             * pick a random element from the returned array.
             * @param includeBase Include the `__BASE` Frame in the output array? Default false.
             * @returns An array of all Frame names in this Texture.
             */
            getFrameNames(includeBase?: boolean): string[];

            /**
             * Given a Frame name, return the source image it uses to render with.
             * 
             * This will return the actual DOM Image or Canvas element.
             * @param name The string-based name, or integer based index, of the Frame to get from this Texture.
             * @returns The DOM Image, Canvas Element or Render Texture.
             */
            getSourceImage(name?: string | number): HTMLImageElement | HTMLCanvasElement | Phaser.GameObjects.RenderTexture;

            /**
             * Given a Frame name, return the data source image it uses to render with.
             * You can use this to get the normal map for an image for example.
             * 
             * This will return the actual DOM Image.
             * @param name The string-based name, or integer based index, of the Frame to get from this Texture.
             * @returns The DOM Image or Canvas Element.
             */
            getDataSourceImage(name?: string | number): HTMLImageElement | HTMLCanvasElement;

            /**
             * Set the source data for this Texture.
             * By default, this will update any existing sources,
             * effectively overwriting them.
             * 
             * It's advisable to only swap between textures of the same size,
             * as the dimensions of game objects are often derived from texture size
             * and might change in unexpected ways if they don't match.
             * 
             * Any related `dataSource` members must be updated.
             * See {@link Phaser.Textures.Texture#setDataSource}.
             * @param data The source image data.
             * @param startIndex The index of the first source to update. If there are multiple data elements, they will be applied to subsequent indices. Default 0.
             * @param renew Whether to destroy the existing source and create a new one, if a source is already in the array at an index. Default false.
             * @param width Width to use, if not available from the data (e.g. using a Uint8Array)
             * @param height Height to use, if not available from the data (e.g. using a Uint8Array)
             */
            setSource(data: Phaser.Textures.TextureSource | Phaser.Types.Textures.TextureSource | Phaser.Textures.TextureSource[] | Phaser.Types.Textures.TextureSource[], startIndex?: number, renew?: boolean, width?: number, height?: number): void;

            /**
             * Adds a data source image to this Texture.
             * 
             * An example of a data source image would be a normal map, where all of the Frames for this Texture
             * equally apply to the normal map.
             * 
             * There can only be one data source per 'regular' source entry.
             * @param data The source image data.
             * @param startIndex The index of the first source to update. If there are multiple data elements, they will be applied to subsequent indices. Default 0.
             * @param renew Whether to destroy the existing source and create a new one, if a source is already in the array at an index. Default false.
             * @param width Width to use, if not available from the data (e.g. using a Uint8Array)
             * @param height Height to use, if not available from the data (e.g. using a Uint8Array)
             */
            setDataSource(data: Phaser.Types.Textures.TextureSource | Phaser.Types.Textures.TextureSource[], startIndex?: number, renew?: boolean, width?: number, height?: number): void;

            /**
             * Sets the Filter Mode for this Texture.
             * 
             * The mode can be either Linear, the default, or Nearest.
             * 
             * For pixel-art you should use Nearest.
             * 
             * The mode applies to the entire Texture, not just a specific Frame of it.
             * @param filterMode The Filter Mode.
             */
            setFilter(filterMode: Phaser.Textures.FilterMode): void;

            /**
             * Set the `smoothPixelArt` property for this Texture.
             * If `true`, it will also run `setFilter(Phaser.Textures.FilterMode.LINEAR)`
             * to enable the necessary linear filtering.
             * If `false`, it will not change the filter mode, as it doesn't know
             * the previous state, nor is it necessary to change it.
             * @param value Set to `true` to enable smooth pixel art interpolation and apply LINEAR filtering. Set to `false` to disable smooth interpolation without changing the filter mode. Set to `null` to use the game's default setting.
             */
            setSmoothPixelArt(value: boolean | null): void;

            /**
             * Set the wrap mode for this Texture.
             * 
             * This is only available for WebGL.
             * 
             * The wrap mode can be one of the following:
             * 
             * - Phaser.Textures.WrapMode.CLAMP_TO_EDGE
             * - Phaser.Textures.WrapMode.REPEAT
             * - Phaser.Textures.WrapMode.MIRRORED_REPEAT
             * 
             * Note that only CLAMP_TO_EDGE is supported for non-power of two textures.
             * If another wrap mode is specified for such a texture, it will be ignored.
             * @param wrapModeS The wrap mode for the S (horizontal) axis.
             * @param wrapModeT The wrap mode for the T (vertical) axis.
             */
            setWrap(wrapModeS: Phaser.Textures.WrapMode, wrapModeT?: Phaser.Textures.WrapMode): void;

            /**
             * Destroys this Texture and releases references to its sources and frames.
             */
            destroy(): void;

        }

        /**
         * When Phaser boots it will create an instance of this Texture Manager class.
         * 
         * It is a global manager that handles all textures in your game. You can access it from within
         * a Scene via the `this.textures` property.
         * 
         * Its role is as a manager for all textures that your game uses. It can create, update and remove
         * textures globally, as well as parse texture data from external files, such as sprite sheets
         * and texture atlases.
         * 
         * Sprites and other texture-based Game Objects get their texture data directly from this class.
         */
        class TextureManager extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param game The Phaser.Game instance this Texture Manager belongs to.
             */
            constructor(game: Phaser.Game);

            /**
             * The Game that the Texture Manager belongs to.
             * 
             * A game will only ever have one instance of a Texture Manager.
             */
            game: Phaser.Game;

            /**
             * The internal name of this manager.
             */
            readonly name: string;

            /**
             * This object contains all Textures that belong to this Texture Manager.
             * 
             * Textures are identified by string-based keys, which are used as the property
             * within this object. Therefore, you can access any texture directly from this
             * object without any iteration.
             * 
             * You should not typically modify this object directly, but instead use the
             * methods provided by the Texture Manager to add and remove entries from it.
             */
            list: object;

            /**
             * An Image Game Object that belongs to this Texture Manager.
             * 
             * Used as a drawing stamp within Dynamic Textures.
             * 
             * This is not part of the display list and doesn't render.
             * 
             * Prior to v4.0.0, this was of the type `Phaser.GameObjects.Image`.
             */
            readonly stamp: Phaser.GameObjects.Stamp;

            /**
             * The crop Rectangle as used by the Stamp when it needs to crop itself.
             */
            stampCrop: Phaser.Geom.Rectangle;

            /**
             * A TileSprite Game Object that belongs to this Texture Manager.
             * 
             * Used for repeated drawing within Dynamic Textures.
             * 
             * This is not part of the display list and doesn't render.
             */
            readonly tileSprite: Phaser.GameObjects.TileSprite;

            /**
             * If this flag is `true` then the Texture Manager will never emit any
             * warnings to the console log that report missing textures.
             */
            silentWarnings: boolean;

            /**
             * Checks the given texture key and logs a console.error if the key is already in use, then returns false.
             * 
             * If you wish to avoid the console.warn then use `TextureManager.exists` instead.
             * @param key The texture key to check.
             * @returns `true` if it's safe to use the texture key, otherwise `false`.
             */
            checkKey(key: string): boolean;

            /**
             * Removes a Texture from the Texture Manager and destroys it. This will immediately
             * clear all references to it from the Texture Manager, and if it has one, destroy its
             * WebGLTexture. This will emit a `removetexture` event.
             * 
             * Note: If you have any Game Objects still using this texture they will start throwing
             * errors the next time they try to render. Make sure that removing the texture is the final
             * step when clearing down to avoid this.
             * @param key The key of the Texture to remove, or a reference to it.
             * @returns The Texture Manager.
             */
            remove(key: string | Phaser.Textures.Texture): Phaser.Textures.TextureManager;

            /**
             * Removes a key from the Texture Manager but does not destroy the Texture that was using the key.
             * @param key The key to remove from the texture list.
             * @returns The Texture Manager.
             */
            removeKey(key: string): Phaser.Textures.TextureManager;

            /**
             * Adds a new Texture to the Texture Manager created from the given Base64 encoded data.
             * 
             * It works by creating an `Image` DOM object, then setting the `src` attribute to
             * the given base64 encoded data. As a result, the process is asynchronous by its nature,
             * so be sure to listen for the events this method dispatches before using the texture.
             * @param key The unique string-based key of the Texture.
             * @param data The Base64 encoded data.
             * @returns This Texture Manager instance.
             */
            addBase64(key: string, data: any): this;

            /**
             * Gets an existing texture frame and converts it into a base64 encoded image and returns the base64 data.
             * 
             * You can also provide the image type and encoder options.
             * 
             * This will only work with bitmap based texture frames, such as those created from Texture Atlases.
             * It will not work with GL Texture objects, such as Shaders, or Render Textures. For those please
             * see the WebGL Snapshot function instead.
             * @param key The unique string-based key of the Texture.
             * @param frame The string-based name, or integer based index, of the Frame to get from the Texture.
             * @param type A DOMString indicating the image format. The default format type is image/png. Default 'image/png'.
             * @param encoderOptions A Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp. If this argument is anything else, the default value for image quality is used. The default value is 0.92. Other arguments are ignored. Default 0.92.
             * @returns The base64 encoded data, or an empty string if the texture frame could not be found.
             */
            getBase64(key: string, frame?: string | number, type?: string, encoderOptions?: number): string;

            /**
             * Adds a new Texture to the Texture Manager created from the given Image element.
             * @param key The unique string-based key of the Texture.
             * @param source The source Image element.
             * @param dataSource An optional data Image element.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addImage(key: string, source: HTMLImageElement, dataSource?: HTMLImageElement | HTMLCanvasElement): Phaser.Textures.Texture | null;

            /**
             * Takes a WebGLTextureWrapper and creates a Phaser Texture from it, which is added to the Texture Manager using the given key.
             * 
             * This allows you to then use the Texture as a normal texture for texture based Game Objects like Sprites.
             * 
             * This is a WebGL only feature.
             * 
             * Prior to Phaser 3.80.0, this method took a bare `WebGLTexture`
             * as the `glTexture` parameter. You must now wrap the `WebGLTexture` in a
             * `WebGLTextureWrapper` instance before passing it to this method.
             * @param key The unique string-based key of the Texture.
             * @param glTexture The source Render Texture.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addGLTexture(key: string, glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper): Phaser.Textures.Texture | null;

            /**
             * Adds a Compressed Texture to this Texture Manager.
             * 
             * The texture should typically have been loaded via the `CompressedTextureFile` loader,
             * in order to prepare the correct data object this method requires.
             * 
             * You can optionally also pass atlas data to this method, in which case a texture atlas
             * will be generated from the given compressed texture, combined with the atlas data.
             * @param key The unique string-based key of the Texture.
             * @param textureData The Compressed Texture data object.
             * @param atlasData Optional Texture Atlas data.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addCompressedTexture(key: string, textureData: Phaser.Types.Textures.CompressedTextureData, atlasData?: object): Phaser.Textures.Texture | null;

            /**
             * Adds a Render Texture to the Texture Manager using the given key.
             * This allows you to then use the Render Texture as a normal texture for texture based Game Objects like Sprites.
             * @param key The unique string-based key of the Texture.
             * @param renderTexture The source Render Texture.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addRenderTexture(key: string, renderTexture: Phaser.GameObjects.RenderTexture): Phaser.Textures.Texture | null;

            /**
             * Creates a new Texture using a blank Canvas element of the size given.
             * 
             * Canvas elements are automatically pooled and calling this method will
             * extract a free canvas from the CanvasPool, or create one if none are available.
             * @param key The unique string-based key of the Texture.
             * @param width The width of the Canvas element. Default 256.
             * @param height The height of the Canvas element. Default 256.
             * @returns The Canvas Texture that was created, or `null` if the key is already in use.
             */
            createCanvas(key: string, width?: number, height?: number): Phaser.Textures.CanvasTexture | null;

            /**
             * Creates a new Canvas Texture object from an existing Canvas element
             * and adds it to this Texture Manager, unless `skipCache` is true.
             * @param key The unique string-based key of the Texture.
             * @param source The Canvas element to form the base of the new Texture.
             * @param skipCache Skip adding this Texture into the Cache? Default false.
             * @returns The Canvas Texture that was created, or `null` if the key is already in use.
             */
            addCanvas(key: string, source: HTMLCanvasElement, skipCache?: boolean): Phaser.Textures.CanvasTexture | null;

            /**
             * Creates a Dynamic Texture instance and adds itself to this Texture Manager.
             * 
             * A Dynamic Texture is a special texture that allows you to draw textures, frames and most kind of
             * Game Objects directly to it.
             * 
             * You can take many complex objects and draw them to this one texture, which can then be used as the
             * base texture for other Game Objects, such as Sprites. Should you then update this texture, all
             * Game Objects using it will instantly be updated as well, reflecting the changes immediately.
             * 
             * It's a powerful way to generate dynamic textures at run-time that are WebGL friendly and don't invoke
             * expensive GPU uploads on each change.
             * 
             * See the methods available on the `DynamicTexture` class for more details.
             * 
             * Optionally, you can also pass a Dynamic Texture instance to this method to have
             * it added to the Texture Manager.
             * @param key The string-based key of this Texture. Must be unique within the Texture Manager. Or, a DynamicTexture instance.
             * @param width The width of this Dynamic Texture in pixels. Defaults to 256 x 256. Ignored if an instance is passed as the key. Default 256.
             * @param height The height of this Dynamic Texture in pixels. Defaults to 256 x 256. Ignored if an instance is passed as the key. Default 256.
             * @param forceEven If the width and height are odd numbers, should they be forced to be even? Ignored if an instance is passed as the key. Default true.
             * @returns The Dynamic Texture that was created, or `null` if the key is already in use.
             */
            addDynamicTexture(key: string | Phaser.Textures.DynamicTexture, width?: number, height?: number, forceEven?: boolean): Phaser.Textures.DynamicTexture | null;

            /**
             * Adds a Texture Atlas to this Texture Manager.
             * 
             * In Phaser terminology, a Texture Atlas is a combination of an atlas image and a data file
             * describing the frames within it, such as those exported by applications like Texture Packer.
             * 
             * This method accepts three different atlas data formats:
             * 
             * - **JSON Array** — the `frames` or `textures` field is an Array. Used by Texture Packer's
             *   "JSON Array" and "Phaser (multi-atlas)" exports. Dispatched to `addAtlasJSONArray`.
             * - **JSON Hash** — the `frames` field is an Object. Used by Texture Packer's "JSON Hash" export.
             *   Dispatched to `addAtlasJSONHash`.
             * - **Phaser Compact Texture (PCT)** — a decoded PCT data object with a `pages` array. This is
             *   the compact line-oriented format loaded by `LoaderPlugin#atlasPCT`. Dispatched to `addAtlasPCT`.
             * 
             * The format is detected automatically from the shape of the `data` argument. As of Phaser 3.60
             * you can use this method to add an atlas data set to an existing Phaser Texture.
             * @param key The unique string-based key of the Texture.
             * @param source The source Image element/s, or a Phaser Texture.
             * @param data The Texture Atlas data/s.
             * @param dataSource An optional data Image element.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addAtlas(key: string, source: HTMLImageElement | HTMLImageElement[] | Phaser.Textures.Texture, data: object | object[], dataSource?: HTMLImageElement | HTMLCanvasElement | HTMLImageElement[] | HTMLCanvasElement[]): Phaser.Textures.Texture | null;

            /**
             * Adds a Texture Atlas to this Texture Manager.
             * 
             * In Phaser terminology, a Texture Atlas is a combination of an atlas image and a JSON data file,
             * such as those exported by applications like Texture Packer.
             * 
             * The frame data of the atlas must be stored in an Array within the JSON.
             * 
             * This is known as a JSON Array in software such as Texture Packer.
             * 
             * As of Phaser 3.60 you can use this method to add an atlas data set to an existing Phaser Texture.
             * @param key The unique string-based key of the Texture.
             * @param source The source Image element/s, or a Phaser Texture.
             * @param data The Texture Atlas data/s.
             * @param dataSource An optional data Image element.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addAtlasJSONArray(key: string, source: HTMLImageElement | HTMLImageElement[] | Phaser.Textures.Texture, data: object | object[], dataSource?: HTMLImageElement | HTMLCanvasElement | HTMLImageElement[] | HTMLCanvasElement[]): Phaser.Textures.Texture | null;

            /**
             * Adds a Texture Atlas to this Texture Manager.
             * 
             * In Phaser terminology, a Texture Atlas is a combination of an atlas image and a JSON data file,
             * such as those exported by applications like Texture Packer.
             * 
             * The frame data of the atlas must be stored in an Object within the JSON.
             * 
             * This is known as a JSON Hash in software such as Texture Packer.
             * 
             * As of Phaser 3.60 you can use this method to add an atlas data set to an existing Phaser Texture.
             * @param key The unique string-based key of the Texture.
             * @param source The source Image element/s, or a Phaser Texture.
             * @param data The Texture Atlas data/s.
             * @param dataSource An optional data Image element.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addAtlasJSONHash(key: string, source: HTMLImageElement | HTMLImageElement[] | Phaser.Textures.Texture, data: object | object[], dataSource?: HTMLImageElement | HTMLCanvasElement | HTMLImageElement[] | HTMLCanvasElement[]): Phaser.Textures.Texture | null;

            /**
             * Adds a Phaser Compact Texture Atlas (PCT) to this Texture Manager.
             * 
             * PCT is a compact line-oriented atlas format. A single PCT file can describe multiple atlas
             * pages, each referencing a separate texture image. The `data` argument must be a decoded PCT
             * structure as produced by `Phaser.Textures.Parsers.PCTDecode` — that is, an object containing
             * `pages`, `folders`, and `frames` fields. The `source` argument should be a single Image or an
             * Array of Images, one per page, in the same order as the `pages` field on the decoded data.
             * 
             * You do not normally need to call this method directly. It is called automatically when the
             * `LoaderPlugin#atlasPCT` method finishes loading a PCT file. You can also use this method to add a
             * decoded PCT data set to an existing Phaser Texture.
             * @param key The unique string-based key of the Texture.
             * @param source The source Image element(s) — one per PCT page — or an existing Phaser Texture.
             * @param data The decoded PCT data object.
             * @param dataSource An optional data Image element (normal map source).
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addAtlasPCT(key: string, source: HTMLImageElement | HTMLImageElement[] | Phaser.Textures.Texture, data: object, dataSource?: HTMLImageElement | HTMLCanvasElement | HTMLImageElement[] | HTMLCanvasElement[]): Phaser.Textures.Texture | null;

            /**
             * Adds a Texture Atlas to this Texture Manager.
             * 
             * In Phaser terminology, a Texture Atlas is a combination of an atlas image and a data file,
             * such as those exported by applications like Texture Packer.
             * 
             * The frame data of the atlas must be stored in an XML file.
             * 
             * As of Phaser 3.60 you can use this method to add an atlas data set to an existing Phaser Texture.
             * @param key The unique string-based key of the Texture.
             * @param source The source Image element, or a Phaser Texture.
             * @param data The Texture Atlas XML data.
             * @param dataSource An optional data Image element.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addAtlasXML(key: string, source: HTMLImageElement | Phaser.Textures.Texture, data: object, dataSource?: HTMLImageElement | HTMLCanvasElement | HTMLImageElement[] | HTMLCanvasElement[]): Phaser.Textures.Texture | null;

            /**
             * Adds a Unity Texture Atlas to this Texture Manager.
             * 
             * In Phaser terminology, a Texture Atlas is a combination of an atlas image and a data file,
             * such as those exported by applications like Texture Packer or Unity.
             * 
             * The frame data of the atlas must be stored in a Unity YAML file.
             * 
             * As of Phaser 3.60 you can use this method to add an atlas data set to an existing Phaser Texture.
             * @param key The unique string-based key of the Texture.
             * @param source The source Image element.
             * @param data The Texture Atlas data.
             * @param dataSource An optional data Image element.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addUnityAtlas(key: string, source: HTMLImageElement, data: object, dataSource?: HTMLImageElement | HTMLCanvasElement | HTMLImageElement[] | HTMLCanvasElement[]): Phaser.Textures.Texture | null;

            /**
             * Adds a Sprite Sheet to this Texture Manager.
             * 
             * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact
             * same size and cannot be trimmed or rotated. This is different to a Texture Atlas, created by tools such as
             * Texture Packer, and more akin with the fixed-frame exports you get from apps like Aseprite or old arcade
             * games.
             * 
             * As of Phaser 3.60 you can use this method to add a sprite sheet to an existing Phaser Texture.
             * @param key The unique string-based key of the Texture. Give an empty string if you provide a Phaser Texture as the 2nd argument.
             * @param source The source Image element, or a Phaser Texture.
             * @param config The configuration object for this Sprite Sheet.
             * @param dataSource An optional data Image element.
             * @returns The Texture that was created or updated, or `null` if the key is already in use.
             */
            addSpriteSheet(key: string, source: HTMLImageElement | Phaser.Textures.Texture, config: Phaser.Types.Textures.SpriteSheetConfig, dataSource?: HTMLImageElement | HTMLCanvasElement): Phaser.Textures.Texture | null;

            /**
             * Adds a Sprite Sheet to this Texture Manager, where the Sprite Sheet exists as a Frame within a Texture Atlas.
             * 
             * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact
             * same size and cannot be trimmed or rotated.
             * @param key The unique string-based key of the Texture.
             * @param config The configuration object for this Sprite Sheet.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addSpriteSheetFromAtlas(key: string, config: Phaser.Types.Textures.SpriteSheetFromAtlasConfig): Phaser.Textures.Texture | null;

            /**
             * Creates a texture from an array of colour data.
             * 
             * This is only available in WebGL mode.
             * 
             * If the dimensions provided are powers of two, the resulting texture
             * will be automatically set to wrap by the WebGL Renderer.
             * @param key The unique string-based key of the Texture.
             * @param data The color data for the texture.
             * @param width The width of the texture.
             * @param height The height of the texture.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            addUint8Array(key: string, data: Uint8Array, width: number, height: number): Phaser.Textures.Texture | null;

            /**
             * Creates a texture from a color and alpha.
             * The texture will be filled with the given color and alpha.
             * 
             * This may be used as a proxy texture,
             * which can later be replaced with a real texture.
             * See {@link Phaser.Textures.Texture#setSource}
             * for more information on replacing the proxy with a real texture.
             * 
             * This is only available in WebGL mode.
             * @param key The unique string-based key of the Texture.
             * @param width The width of the texture.
             * @param height The height of the texture.
             * @param color The color of the texture. Default 0x000000.
             * @param alpha The alpha of the texture. Default 0.
             * @returns The Texture that was created, or `null` if the key is already in use or the width or height is not positive.
             */
            addFlatColor(key: string, width: number, height: number, color?: number, alpha?: number): Phaser.Textures.Texture | null;

            /**
             * Creates a new Texture using the given source and dimensions.
             * @param key The unique string-based key of the Texture.
             * @param source A source or array of sources that are used to create the texture. Usually Images, but can also be a Canvas or other types.
             * @param width The width of the Texture. This is optional and automatically derived from the source images.
             * @param height The height of the Texture. This is optional and automatically derived from the source images.
             * @returns The Texture that was created, or `null` if the key is already in use.
             */
            create(key: string, source: Phaser.Types.Textures.TextureSource | Phaser.Types.Textures.TextureSource[], width?: number, height?: number): Phaser.Textures.Texture | null;

            /**
             * Checks the given key to see if a Texture using it exists within this Texture Manager.
             * @param key The unique string-based key of the Texture.
             * @returns Returns `true` if a Texture matching the given key exists in this Texture Manager.
             */
            exists(key: string): boolean;

            /**
             * Returns a Texture from the Texture Manager that matches the given key.
             * 
             * If the key is `undefined` it will return the `__DEFAULT` Texture.
             * 
             * If the key is an instance of a Texture, it will return the instance.
             * 
             * If the key is an instance of a Frame, it will return the frames parent Texture instance.
             * 
             * Finally, if the key is given, but not found, and not a Texture or Frame instance, it will return the `__MISSING` Texture.
             * @param key The unique string-based key of the Texture, or a Texture, or Frame instance.
             * @returns The Texture matching the given key.
             */
            get(key: string | Phaser.Textures.Texture | Phaser.Textures.Frame): Phaser.Textures.Texture;

            /**
             * Takes a Texture key and Frame name and returns a clone of that Frame if found.
             * @param key The unique string-based key of the Texture.
             * @param frame The string or index of the Frame to be cloned.
             * @returns A Clone of the given Frame.
             */
            cloneFrame(key: string, frame: string | number): Phaser.Textures.Frame;

            /**
             * Takes a Texture key and Frame name and returns a reference to that Frame, if found.
             * @param key The unique string-based key of the Texture.
             * @param frame The string-based name, or integer based index, of the Frame to get from the Texture.
             * @returns A Texture Frame object.
             */
            getFrame(key: string, frame?: string | number): Phaser.Textures.Frame;

            /**
             * Parses the 'key' parameter and returns a Texture Frame instance.
             * 
             * It can accept the following formats:
             * 
             * 1) A string
             * 2) An array where the elements are: [ key, [frame] ]
             * 3) An object with the properties: { key, [frame] }
             * 4) A Texture instance - which returns the default frame from the Texture
             * 5) A Frame instance - returns itself
             * @param key The key to be parsed.
             * @returns A Texture Frame object, if found, or undefined if not.
             */
            parseFrame(key: string | any[] | object | Phaser.Textures.Texture | Phaser.Textures.Frame): Phaser.Textures.Frame;

            /**
             * Returns an array with all of the keys of all Textures in this Texture Manager.
             * The output array will exclude the `__DEFAULT`, `__MISSING`, `__WHITE`, and `__NORMAL` keys.undefined
             * @returns An array containing all of the Texture keys stored in this Texture Manager.
             */
            getTextureKeys(): string[];

            /**
             * Given a Texture and an `x` and `y` coordinate this method will return a new
             * Color object that has been populated with the color and alpha values of the pixel
             * at that location in the Texture.
             * @param x The x coordinate of the pixel within the Texture.
             * @param y The y coordinate of the pixel within the Texture.
             * @param key The unique string-based key of the Texture.
             * @param frame The string or index of the Frame.
             * @returns A Color object populated with the color values of the requested pixel,or `null` if the coordinates were out of bounds.
             */
            getPixel(x: number, y: number, key: string, frame?: string | number): Phaser.Display.Color | null;

            /**
             * Given a Texture and an `x` and `y` coordinate this method will return a value between 0 and 255
             * corresponding to the alpha value of the pixel at that location in the Texture. If the coordinate
             * is out of bounds it will return null.
             * @param x The x coordinate of the pixel within the Texture.
             * @param y The y coordinate of the pixel within the Texture.
             * @param key The unique string-based key of the Texture.
             * @param frame The string or index of the Frame.
             * @returns A value between 0 and 255, or `null` if the coordinates were out of bounds.
             */
            getPixelAlpha(x: number, y: number, key: string, frame?: string | number): number;

            /**
             * Sets the given Game Objects `texture` and `frame` properties so that it uses
             * the Texture and Frame specified in the `key` and `frame` arguments to this method.
             * @param gameObject The Game Object the texture would be set on.
             * @param key The unique string-based key of the Texture.
             * @param frame The string or index of the Frame.
             * @returns The Game Object the texture was set on.
             */
            setTexture(gameObject: Phaser.GameObjects.GameObject, key: string, frame?: string | number): Phaser.GameObjects.GameObject;

            /**
             * Changes the key being used by a Texture to the new key provided.
             * 
             * The old key is removed, allowing it to be re-used.
             * 
             * Game Objects are linked to Textures by a reference to the Texture object, so
             * all existing references will be retained.
             * @param currentKey The current string-based key of the Texture you wish to rename.
             * @param newKey The new unique string-based key to use for the Texture.
             * @returns `true` if the Texture key was successfully renamed, otherwise `false`.
             */
            renameTexture(currentKey: string, newKey: string): boolean;

            /**
             * Passes all Textures to the given callback.
             * @param callback The callback function to be sent the Textures.
             * @param scope The value to use as `this` when executing the callback.
             * @param args Additional arguments that will be passed to the callback, after the child.
             */
            each(callback: EachTextureCallback, scope: object, ...args: any[]): void;

            /**
             * Resets the internal Stamp object, ready for drawing and returns it.
             * @param alpha The alpha to use. Default 1.
             * @param tint WebGL only. The tint color to use. Default 0xffffff.
             * @returns A reference to the Stamp Game Object.
             */
            resetStamp(alpha?: number, tint?: number): Phaser.GameObjects.Image;

            /**
             * Resets the internal Tile Sprite object, ready for drawing, and returns it.
             * @param alpha The alpha to use. Default 1.
             * @param tint WebGL only. The tint color to use. Default 0xffffff.
             * @returns A reference to the Tile Sprite Game Object.
             */
            resetTileSprite(alpha?: number, tint?: number): Phaser.GameObjects.TileSprite;

            /**
             * Destroys the Texture Manager and all Textures stored within it.
             */
            destroy(): void;

        }

        /**
         * A Texture Source is the encapsulation of the actual source data for a Texture.
         * 
         * It wraps the raw pixel data — typically an Image Element loaded from the file system or
         * network, a Canvas Element, or a Video Element — and manages the corresponding WebGL
         * texture object used by the renderer. In WebGL mode, the TextureSource creates and owns
         * the `WebGLTextureWrapper` that is uploaded to the GPU.
         * 
         * You will not usually create a TextureSource directly. Instead, it is created automatically
         * when a Texture is added to the Texture Manager. You can access it via `Texture.source`,
         * which is an array of TextureSource instances. Most textures have a single source, but
         * multi-atlas textures can have several.
         * 
         * A Texture can contain multiple Texture Sources, which only happens when a multi-atlas is loaded.
         */
        class TextureSource {
            /**
             * 
             * @param texture The Texture this TextureSource belongs to.
             * @param source The source image data.
             * @param width Optional width of the source image. If not given it's derived from the source itself.
             * @param height Optional height of the source image. If not given it's derived from the source itself.
             * @param flipY Sets the `UNPACK_FLIP_Y_WEBGL` flag the WebGL Texture uses during upload. Default true.
             */
            constructor(texture: Phaser.Textures.Texture, source: Phaser.Types.Textures.TextureSource, width?: number, height?: number, flipY?: boolean);

            /**
             * A reference to the Canvas or WebGL Renderer.
             */
            renderer: Phaser.Renderer.Canvas.CanvasRenderer | Phaser.Renderer.WebGL.WebGLRenderer;

            /**
             * The Texture this TextureSource instance belongs to.
             */
            texture: Phaser.Textures.Texture;

            /**
             * The source of the image data.
             * 
             * This is either an Image Element, a Canvas Element, a Video Element, a RenderTexture or a WebGLTextureWrapper.
             * 
             * In Phaser 3.60 and above it can also be a Compressed Texture data object.
             */
            source: Phaser.Types.Textures.TextureSource;

            /**
             * The image data.
             * 
             * This is either an Image element, Canvas element, Video Element,
             * or null if the `source` is not an HTMLElement.
             * Non-HTMLElement sources include compressed textures, data arrays,
             * and references to other WebGL textures.
             */
            image: Phaser.Types.Textures.TextureSourceElement | null;

            /**
             * Holds the compressed texture algorithm, or `null` if it's not a compressed texture.
             * 
             * Prior to Phaser 3.60 this value always held `null`.
             */
            compressionAlgorithm: number;

            /**
             * The resolution of the source image.
             */
            resolution: number;

            /**
             * The width of the source image. If not specified in the constructor it will check
             * the `naturalWidth`, `videoWidth`, and then `width` properties of the source image.
             */
            width: number;

            /**
             * The height of the source image. If not specified in the constructor it will check
             * the `naturalHeight`, `videoHeight`, and then `height` properties of the source image.
             */
            height: number;

            /**
             * The Scale Mode the image will use when rendering.
             * Either Linear or Nearest.
             */
            scaleMode: number;

            /**
             * Is the source image a Canvas Element?
             */
            isCanvas: boolean;

            /**
             * Is the source image a Video Element?
             */
            isVideo: boolean;

            /**
             * Is the source image a Render Texture?
             */
            isRenderTexture: boolean;

            /**
             * Is the source image a WebGLTextureWrapper?
             */
            isGLTexture: boolean;

            /**
             * Are the source image dimensions a power of two?
             */
            isPowerOf2: boolean;

            /**
             * The wrapped WebGL Texture of the source image.
             * If this TextureSource is driven from a WebGLTexture already,
             * then this wrapper contains a reference to that WebGLTexture.
             */
            glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | null;

            /**
             * Whether the `UNPACK_FLIP_Y_WEBGL` flag is set on this WebGL Texture during upload.
             * When `true`, the texture data is flipped vertically as it is uploaded to the GPU.
             */
            flipY: boolean;

            /**
             * Creates a WebGL Texture, if required, and sets the Texture filter mode.
             * @param game A reference to the Phaser Game instance.
             */
            init(game: Phaser.Game): void;

            /**
             * Sets the Filter Mode for this Texture.
             * 
             * The mode can be either Linear, the default, or Nearest.
             * 
             * For pixel-art you should use Nearest.
             * @param filterMode The Filter Mode.
             */
            setFilter(filterMode: Phaser.Textures.FilterMode): void;

            /**
             * Sets the `UNPACK_FLIP_Y_WEBGL` flag for the WebGL Texture during texture upload.
             * @param value Should the WebGL Texture be flipped on the Y axis on texture upload or not? Default true.
             */
            setFlipY(value?: boolean): void;

            /**
             * Sets the wrap mode for this TextureSource.
             * This is only available for WebGL.
             * 
             * The wrap mode can be one of the following:
             * 
             * - Phaser.Textures.WrapMode.CLAMP_TO_EDGE
             * - Phaser.Textures.WrapMode.REPEAT
             * - Phaser.Textures.WrapMode.MIRRORED_REPEAT
             * 
             * Note that only CLAMP_TO_EDGE is supported for non-power of two textures.
             * If another wrap mode is specified for such a texture, it will be ignored.
             * @param wrapModeS The wrap mode for the S (horizontal) axis.
             * @param wrapModeT The wrap mode for the T (vertical) axis.
             * @returns This TextureSource instance.
             */
            setWrap(wrapModeS: Phaser.Textures.WrapMode, wrapModeT: Phaser.Textures.WrapMode): this;

            /**
             * Update the underlying WebGLTexture with the current source data.
             * This is called automatically by game systems which manage textures,
             * such as Text or Video, or on internal data changes.
             * You should not need to call this method manually unless you are
             * manually updating the source data.
             */
            update(): void;

            /**
             * Updates the dimensions of this Texture Source.
             * This is called automatically by game systems which manage textures,
             * such as Text, which renders to a dedicated canvas that changes size.
             * @param width The new width of the source image.
             * @param height The new height of the source image.
             */
            updateSize(width: number, height: number): void;

            /**
             * Change the source data of this TextureSource.
             * This will update the underlying WebGLTexture with the new source data.
             * 
             * Note that this will not update any consumers of the texture.
             * Frames and game objects with the `Size` component
             * will automatically cache width and height on creation, so you will need
             * to update them if you change the resolution of the texture this way.
             * @param source The new source data.
             */
            updateSource(source: Phaser.Types.Textures.TextureSource): void;

            /**
             * Destroys this Texture Source and frees associated resources.
             * 
             * In WebGL mode, the underlying WebGL texture is deleted from the GPU via the renderer.
             * If the source is a canvas, it is returned to the CanvasPool. All internal references
             * are then set to `null`.
             */
            destroy(): void;

        }

        /**
         * WebGL Texture Wrap Modes.
         * 
         * These constants define how a texture is sampled when UV coordinates fall
         * outside the standard [0, 1] range. They correspond directly to WebGL
         * texture wrap parameter values and are used when configuring how textures
         * tile or clamp on geometry.
         */
        enum WrapMode {
            /**
             * Clamp to edge wrap mode. UV coordinates outside the [0, 1] range are
             * clamped to the nearest edge of the texture. This stretches the edge
             * pixels outward rather than repeating the texture, and is the default
             * wrap mode for most textures in Phaser.
             */
            CLAMP_TO_EDGE,
            /**
             * Repeat wrap mode. The texture tiles seamlessly in both directions when
             * UV coordinates exceed the [0, 1] range. Useful for repeating background
             * patterns or tiling surfaces. Note that the texture dimensions must be
             * powers of two for this mode to work correctly in WebGL.
             */
            REPEAT,
            /**
             * Mirrored repeat wrap mode. Similar to `REPEAT`, but the texture is
             * flipped (mirrored) on each repetition. For example, a texture spanning
             * UV 0–1 will appear mirrored from 1–2, normal from 2–3, and so on.
             * This can produce smoother-looking tiling by eliminating visible seams
             * at tile boundaries.
             */
            MIRRORED_REPEAT,
        }

        /**
         * Texture Filter Mode constants, used when setting the filter mode on a texture via `Texture.setFilter`.
         * The filter mode controls how WebGL samples a texture when it is scaled or displayed at a non-native resolution.
         * Use `LINEAR` for smooth scaling of high-resolution artwork, or `NEAREST` to preserve hard pixel edges in pixel art games.
         */
        enum FilterMode {
            /**
             * Linear (bilinear) filter type. Smooths textures by interpolating between neighbouring pixels when scaling,
             * producing a blended, anti-aliased result. Suitable for high-resolution artwork but will appear blurry on pixel art.
             */
            LINEAR,
            /**
             * Nearest neighbor filter type. Samples the single closest pixel when scaling, preserving hard edges and
             * producing a crisp, blocky result. Ideal for pixel art games where texture sharpness is important.
             */
            NEAREST,
        }

        namespace Events {
            /**
             * The Texture Add Event.
             * 
             * This event is dispatched by the Texture Manager when a texture is added to it.
             * 
             * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`.
             */
            const ADD: string;

            /**
             * The Texture Add Key Event.
             * 
             * This event is dispatched by the Texture Manager when a texture with the given key is added to it.
             * 
             * Listen to this event from within a Scene using: `this.textures.on('addtexture-key', listener)`.
             */
            const ADD_KEY: string;

            /**
             * The Texture Load Error Event.
             * 
             * This event is dispatched by the Texture Manager when a texture it requested to load failed.
             * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin.
             * 
             * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`.
             */
            const ERROR: string;

            /**
             * The Texture Load Event.
             * 
             * This event is dispatched by the Texture Manager when a texture has finished loading on it.
             * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin.
             * 
             * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`.
             * 
             * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event.
             */
            const LOAD: string;

            /**
             * This internal event signifies that the Texture Manager is now ready and the Game can continue booting.
             * 
             * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking
             * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game
             * instance, which tells the Game to carry on booting.
             */
            const READY: string;

            /**
             * The Texture Remove Event.
             * 
             * This event is dispatched by the Texture Manager when a texture is removed from it.
             * 
             * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`.
             * 
             * If you have any Game Objects still using the removed texture, they will start throwing
             * errors the next time they try to render. Be sure to clear all use of the texture in this event handler.
             */
            const REMOVE: string;

            /**
             * The Texture Remove Key Event.
             * 
             * This event is dispatched by the Texture Manager when a texture with the given key is removed from it.
             * 
             * Listen to this event from within a Scene using: `this.textures.on('removetexture-key', listener)`.
             * 
             * If you have any Game Objects still using the removed texture, they will start throwing
             * errors the next time they try to render. Be sure to clear all use of the texture in this event handler.
             */
            const REMOVE_KEY: string;

        }

        /**
         * Linear filter type.
         */
        const LINEAR: number;

        /**
         * Nearest Neighbor filter type.
         */
        const NEAREST: number;

        namespace Parsers {
            /**
             * Parses a KTX (Khronos Texture) format Compressed Texture file and extracts the texture data
             * required to upload it to WebGL. KTX is a container format for GPU-compressed textures that
             * supports formats such as ETC, ASTC, S3TC, and PVRTC.
             * 
             * The parser validates the 12-byte KTX file identifier, confirms the texture uses a compressed
             * format (uncompressed KTX files are not supported), then reads the image dimensions, internal
             * GL format, and all available mipmap levels from the binary data.
             * @param data The raw binary ArrayBuffer of the KTX file, as loaded by the Compressed Texture File Loader.
             * @returns A CompressedTextureData object containing the mipmap levels, dimensions, and internal GL format, ready for WebGL upload.
             */
            function KTXParser(data: ArrayBuffer): Phaser.Types.Textures.CompressedTextureData;

            /**
             * Decodes a Phaser Compact Texture Atlas (PCT) file from its raw text representation into a
             * structured object.
             * 
             * This is a standalone helper used by both the PCT atlas loader and the `PCT` texture parser.
             * It converts the line-oriented PCT text format into an object containing a `pages` array
             * (one entry per atlas page), a `folders` dictionary, and a `frames` map with fully-resolved
             * frame names and positions. Frame `page` indices map directly to the `pages` array.
             * 
             * The function validates the version header and rejects files with an unsupported major
             * version or a missing `PCT:` header, returning `null` in those cases after logging a warning.
             * Unknown line prefixes introduced in future minor versions are silently skipped, as required
             * by the specification.
             * 
             * See the Phaser Compact Texture Atlas Format Specification document for a full description
             * of the format and the semantics of the returned object.
             * @param text The raw text contents of a `.pct` file.
             * @returns The decoded PCT structure, or `null` if the input is invalid.
             */
            function PCTDecode(text: string): Object | null;

            /**
             * Parses a PVR format Compressed Texture file and generates texture data suitable for WebGL from it.
             * @param data The raw binary ArrayBuffer of the PVR file, as provided by the Compressed Texture File Loader.
             * @returns A parsed compressed texture data object containing the mipmap levels, base dimensions, WebGL internal format, and flags indicating it is compressed and does not require mipmap generation.
             */
            function PVRParser(data: ArrayBuffer): Phaser.Types.Textures.CompressedTextureData;

            /**
             * Verify whether the given compressed texture data is valid.
             * 
             * Compare the dimensions of each mip layer to the rules for that
             * specific format.
             * 
             * Mip layer size is assumed to have been calculated correctly during parsing.
             * @param data The compressed texture data to verify.
             * @returns Whether the compressed texture data is valid.
             */
            function verifyCompressedTexture(data: Phaser.Types.Textures.CompressedTextureData): boolean;

        }

    }

    namespace Tilemaps {
        namespace Formats {
            /**
             * CSV Map Type
             */
            var CSV: number;

            /**
             * Tiled JSON Map Type
             */
            var TILED_JSON: number;

            /**
             * 2D Array Map Type
             */
            var ARRAY_2D: number;

            /**
             * Weltmeister (Impact.js) Map Type
             */
            var WELTMEISTER: number;

        }

        /**
         * An Image Collection is a special Tile Set where each entry is a complete, individual image rather
         * than a tile sliced from a larger spritesheet. Unlike a standard Tile Set, every image in the
         * collection is its own standalone asset referenced by a unique global ID (GID).
         * 
         * Image Collections are normally created automatically when Tiled map data is loaded. You would
         * encounter them when a Tiled map uses the "Collection of Images" tile set type instead of the
         * standard single-image tile set type.
         */
        class ImageCollection {
            /**
             * 
             * @param name The name of the image collection in the map data.
             * @param firstgid The first image index this image collection contains.
             * @param width Width of widest image (in pixels). Default 32.
             * @param height Height of tallest image (in pixels). Default 32.
             * @param margin The margin around all images in the collection (in pixels). Default 0.
             * @param spacing The spacing between each image in the collection (in pixels). Default 0.
             * @param properties Custom Image Collection properties. Default {}.
             */
            constructor(name: string, firstgid: number, width?: number, height?: number, margin?: number, spacing?: number, properties?: object);

            /**
             * The name of the Image Collection.
             */
            name: string;

            /**
             * The Tiled firstgid value.
             * This is the starting index of the first image index this Image Collection contains.
             */
            firstgid: number;

            /**
             * The width of the widest image (in pixels).
             */
            readonly imageWidth: number;

            /**
             * The height of the tallest image (in pixels).
             */
            readonly imageHeight: number;

            /**
             * The margin around the images in the collection (in pixels).
             */
            readonly imageMargin: number;

            /**
             * The spacing between each image in the collection (in pixels).
             */
            readonly imageSpacing: number;

            /**
             * Image Collection-specific properties that are typically defined in the Tiled editor.
             */
            properties: object;

            /**
             * The cached images that are a part of this collection.
             */
            readonly images: any[];

            /**
             * The total number of images in the image collection.
             */
            readonly total: number;

            /**
             * Returns true if and only if this image collection contains the given image index.
             * @param imageIndex The image index to search for.
             * @returns True if this Image Collection contains the given index.
             */
            containsImageIndex(imageIndex: number): boolean;

            /**
             * Add an image to this Image Collection.
             * @param gid The gid of the image in the Image Collection.
             * @param image The key of the image in the Image Collection and in the cache.
             * @param width The width of the image in the Image Collection.
             * @param height The height of the image in the Image Collection.
             * @returns This ImageCollection object.
             */
            addImage(gid: number, image: string, width: number, height: number): Phaser.Tilemaps.ImageCollection;

        }

        /**
         * Resolves Tiled object GIDs to their corresponding Tileset data and applies
         * per-tile properties from Tilesets to objects. It assists in creating Game
         * Objects from Tiled object layers by providing texture frames, animations,
         * and custom properties defined in the Tiled editor.
         */
        class ObjectHelper {
            /**
             * 
             * @param tilesets The backing tileset data.
             */
            constructor(tilesets: Phaser.Tilemaps.Tileset[]);

            /**
             * A sparse array mapping Tile GID indices to their corresponding Tileset object,
             * populated during construction. Used to look up tileset data by GID at runtime.
             */
            gids: any[];

            /**
             * Enabled if the object helper reaches in to tilesets for data.
             * Disabled if it only uses data directly on a gid object.
             */
            enabled: boolean;

            /**
             * Gets the Tiled `type` field value from the object or the `gid` behind it.
             * @param obj The Tiled object to investigate.
             * @returns The `type` of the object, the tile behind the `gid` of the object, or `undefined`.
             */
            getTypeIncludingTile(obj: Phaser.Types.Tilemaps.TiledObject): string | null;

            /**
             * Sets the sprite texture data as specified (usually in a config) or, failing that,
             * as specified in the `gid` of the object being loaded (if any).
             * 
             * This fallback will only work if the tileset was loaded as a spritesheet matching
             * the geometry of sprites fed into tiled, so that, for example: "tile id #`3`" within
             * the tileset is the same as texture frame `3` from the image of the tileset.
             * @param sprite The Game Object to modify.
             * @param key The texture key to set (or else the `obj.gid`'s tile is used if available).
             * @param frame The frame key to set (or else the `obj.gid`'s tile is used if available).
             * @param obj The Tiled object for fallback.
             */
            setTextureAndFrame(sprite: Phaser.GameObjects.GameObject, key?: string | Phaser.Textures.Texture, frame?: string | number | Phaser.Textures.Frame, obj?: Phaser.Types.Tilemaps.TiledObject): void;

            /**
             * Sets the `sprite.data` field from the tiled properties on the object and its tile (if any).
             * @param sprite The Game Object on which to set the data.
             * @param obj The Tiled object whose properties will be applied.
             */
            setPropertiesFromTiledObject(sprite: Phaser.GameObjects.GameObject, obj: Phaser.Types.Tilemaps.TiledObject): void;

        }

        /**
         * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When
         * loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from
         * a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map data. For
         * an empty map, you should specify tileWidth, tileHeight, width & height.
         * @param scene The Scene to which this Tilemap belongs.
         * @param key The key in the Phaser cache that corresponds to the loaded tilemap data.
         * @param tileWidth The width of a tile in pixels. Default 32.
         * @param tileHeight The height of a tile in pixels. Default 32.
         * @param width The width of the map in tiles. Default 10.
         * @param height The height of the map in tiles. Default 10.
         * @param data Instead of loading from the cache, you can also load directly from
         * a 2D array of tile indexes.
         * @param insertNull Controls how empty tiles, tiles with an index of -1, in the
         * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty
         * locations will get a Tile object with an index of -1. If you have a large sparsely populated map and
         * the tile data doesn't need to change then setting this value to `true` will help with memory
         * consumption. However if your map is small or you need to update the tiles dynamically, then leave
         * the default value set. Default false.
         * @returns The Tilemap object created from the given data.
         */
        function ParseToTilemap(scene: Phaser.Scene, key?: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number, data?: number[][], insertNull?: boolean): Phaser.Tilemaps.Tilemap;

        /**
         * A Tile is a representation of a single tile within a Tilemap layer. Each tile has a position
         * within the map grid (in tile coordinates), a size in pixels, collision flags for each of its
         * four edges, optional custom properties imported from the Tiled map editor, and an optional
         * collision callback. Tiles are lightweight data objects - they do not extend GameObject - so
         * their pixel positions are stored relative to the layer origin and do not factor in camera
         * scroll, layer scale, or layer position. Use the `getLeft`, `getRight`, `getTop`, `getBottom`,
         * and `getBounds` methods to obtain world-space coordinates that account for those transforms.
         * 
         * Tiles are created and managed by `TilemapLayer` and should not normally be instantiated
         * directly. You can access them via `TilemapLayer.getTileAt` or similar Tilemap methods.
         */
        class Tile implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.Visible {
            /**
             * 
             * @param layer The LayerData object in the Tilemap that this tile belongs to.
             * @param index The unique index of this tile within the map.
             * @param x The x coordinate of this tile in tile coordinates.
             * @param y The y coordinate of this tile in tile coordinates.
             * @param width Width of the tile in pixels.
             * @param height Height of the tile in pixels.
             * @param baseWidth The base width a tile in the map (in pixels). Tiled maps support
             * multiple tileset sizes within one map, but they are still placed at intervals of the base
             * tile width.
             * @param baseHeight The base height of the tile in pixels. Tiled maps
             * support multiple tileset sizes within one map, but they are still placed at intervals of the
             * base tile height.
             */
            constructor(layer: Phaser.Tilemaps.LayerData, index: number, x: number, y: number, width: number, height: number, baseWidth: number, baseHeight: number);

            /**
             * The LayerData in the Tilemap data that this tile belongs to.
             */
            layer: Phaser.Tilemaps.LayerData;

            /**
             * The index of this tile within the map data corresponding to the tileset, or -1 if this
             * represents a blank tile.
             */
            index: number;

            /**
             * The x map coordinate of this tile in tile units.
             */
            x: number;

            /**
             * The y map coordinate of this tile in tile units.
             */
            y: number;

            /**
             * The width of the tile in pixels.
             */
            width: number;

            /**
             * The height of the tile in pixels.
             */
            height: number;

            /**
             * The right of the tile in pixels.
             * 
             * Set in the `updatePixelXY` method.
             */
            right: number;

            /**
             * The bottom of the tile in pixels.
             * 
             * Set in the `updatePixelXY` method.
             */
            bottom: number;

            /**
             * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes
             * within one map, but they are still placed at intervals of the base tile size.
             */
            baseWidth: number;

            /**
             * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes
             * within one map, but they are still placed at intervals of the base tile size.
             */
            baseHeight: number;

            /**
             * The x coordinate of the top left of this tile in pixels. This is relative to the top left
             * of the layer this tile is being rendered within. This property does NOT factor in camera
             * scroll, layer scale or layer position.
             */
            pixelX: number;

            /**
             * The y coordinate of the top left of this tile in pixels. This is relative to the top left
             * of the layer this tile is being rendered within. This property does NOT factor in camera
             * scroll, layer scale or layer position.
             */
            pixelY: number;

            /**
             * Tile specific properties. These usually come from Tiled.
             */
            properties: any;

            /**
             * The rotation angle of this tile.
             */
            rotation: number;

            /**
             * Whether the tile should collide with any object on the left side.
             * 
             * This property is used by Arcade Physics only, however, you can also use it
             * in your own checks.
             */
            collideLeft: boolean;

            /**
             * Whether the tile should collide with any object on the right side.
             * 
             * This property is used by Arcade Physics only, however, you can also use it
             * in your own checks.
             */
            collideRight: boolean;

            /**
             * Whether the tile should collide with any object on the top side.
             * 
             * This property is used by Arcade Physics only, however, you can also use it
             * in your own checks.
             */
            collideUp: boolean;

            /**
             * Whether the tile should collide with any object on the bottom side.
             * 
             * This property is used by Arcade Physics only, however, you can also use it
             * in your own checks.
             */
            collideDown: boolean;

            /**
             * Whether the tile's left edge is interesting for collisions.
             */
            faceLeft: boolean;

            /**
             * Whether the tile's right edge is interesting for collisions.
             */
            faceRight: boolean;

            /**
             * Whether the tile's top edge is interesting for collisions.
             */
            faceTop: boolean;

            /**
             * Whether the tile's bottom edge is interesting for collisions.
             */
            faceBottom: boolean;

            /**
             * An optional callback function that is invoked when an Arcade Physics body collides with
             * this tile. The callback must return `true` for collision processing to take place. Set
             * via `setCollisionCallback`.
             */
            collisionCallback: Function;

            /**
             * The context in which the collision callback will be called.
             */
            collisionCallbackContext: object;

            /**
             * The tint to apply to this tile. Note: tint is currently a single color value instead of
             * the 4 corner tint component on other GameObjects.
             */
            tint: number;

            /**
             * The tint mode.
             * 
             * Available modes are:
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             */
            tintMode: Phaser.TintModes;

            /**
             * An empty object where physics-engine specific information (e.g. bodies) may be stored.
             */
            physics: object;

            /**
             * Check if the given x and y world coordinates are within this Tile. This does not factor in
             * camera scroll, layer scale or layer position.
             * @param x The x coordinate to test.
             * @param y The y coordinate to test.
             * @returns True if the coordinates are within this Tile, otherwise false.
             */
            containsPoint(x: number, y: number): boolean;

            /**
             * Copies the tile data and properties from the given Tile to this Tile. This copies everything
             * except for position and interesting face calculations.
             * @param tile The tile to copy from.
             * @returns This Tile object instance.
             */
            copy(tile: Phaser.Tilemaps.Tile): this;

            /**
             * The collision group for this Tile, defined within the Tileset. This returns a reference to
             * the collision group stored within the Tileset, so any modification of the returned object
             * will impact all tiles that have the same index as this tile.undefined
             * @returns The collision group for this Tile, as defined in the Tileset, or `null` if no group was defined.
             */
            getCollisionGroup(): object | null;

            /**
             * The tile data for this Tile, defined within the Tileset. This typically contains Tiled
             * collision data, tile animations and terrain information. This returns a reference to the tile
             * data stored within the Tileset, so any modification of the returned object will impact all
             * tiles that have the same index as this tile.undefined
             * @returns The tile data for this Tile, as defined in the Tileset, or `null` if no data was defined.
             */
            getTileData(): object | null;

            /**
             * Gets the world X position of the left side of the tile, factoring in the layer's position,
             * scale and scroll.
             * @param camera The Camera to use to perform the check.
             * @returns The left (x) value of this tile.
             */
            getLeft(camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Gets the world X position of the right side of the tile, factoring in the layer's position,
             * scale and scroll.
             * @param camera The Camera to use to perform the check.
             * @returns The right (x) value of this tile.
             */
            getRight(camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Gets the world Y position of the top side of the tile, factoring in the layer's position,
             * scale and scroll.
             * @param camera The Camera to use to perform the check.
             * @returns The top (y) value of this tile.
             */
            getTop(camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Gets the world Y position of the bottom side of the tile, factoring in the layer's position,
             * scale and scroll.
             * @param camera The Camera to use to perform the check.
             * @returns The bottom (y) value of this tile.
             */
            getBottom(camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Gets the world rectangle bounding box for the tile, factoring in the layer's position,
             * scale and scroll.
             * @param camera The Camera to use to perform the check.
             * @param output Optional Rectangle object to store the results in.
             * @returns The bounds of this Tile.
             */
            getBounds(camera?: Phaser.Cameras.Scene2D.Camera, output?: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle | object;

            /**
             * Gets the world X position of the center of the tile, factoring in the layer's position,
             * scale and scroll.
             * @param camera The Camera to use to perform the check.
             * @returns The center x position of this Tile.
             */
            getCenterX(camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Gets the world Y position of the center of the tile, factoring in the layer's position,
             * scale and scroll.
             * @param camera The Camera to use to perform the check.
             * @returns The center y position of this Tile.
             */
            getCenterY(camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Check for intersection with this tile. This does not factor in camera scroll, layer scale or
             * layer position.
             * @param x The left edge of the rectangle to intersect with, in pixels.
             * @param y The top edge of the rectangle to intersect with, in pixels.
             * @param right The right edge of the rectangle to intersect with, in pixels.
             * @param bottom The bottom edge of the rectangle to intersect with, in pixels.
             * @returns `true` if the Tile intersects with the given dimensions, otherwise `false`.
             */
            intersects(x: number, y: number, right: number, bottom: number): boolean;

            /**
             * Checks whether this tile is considered "interesting" based on the provided criteria. A tile
             * is interesting if it has active collision flags on any side, if it has an interesting face,
             * or both, depending on the arguments passed. This is used internally by the tilemap collision
             * system to quickly filter tiles that need further processing.
             * @param collides If true, will consider the tile interesting if it collides on any side.
             * @param faces If true, will consider the tile interesting if it has an interesting face.
             * @returns True if the Tile is interesting, otherwise false.
             */
            isInteresting(collides: boolean, faces: boolean): boolean;

            /**
             * Resets all collision status flags on this tile to `false`, clearing any collisions set on
             * each of its four edges. If `recalculateFaces` is true (the default), the interesting face
             * flags for this tile and its neighbors in the layer are also recalculated.
             * @param recalculateFaces Whether or not to recalculate interesting faces for this tile and its neighbors. Default true.
             * @returns This Tile object instance.
             */
            resetCollision(recalculateFaces?: boolean): this;

            /**
             * Resets all four interesting face flags (`faceTop`, `faceBottom`, `faceLeft`, `faceRight`)
             * to `false`. Unlike `resetCollision`, this does not affect the collision flags and does not
             * trigger a face recalculation on neighboring tiles.undefined
             * @returns This Tile object instance.
             */
            resetFaces(): this;

            /**
             * Sets the collision flags for each side of this tile and updates the interesting faces list.
             * @param left Indicating collide with any object on the left.
             * @param right Indicating collide with any object on the right.
             * @param up Indicating collide with any object on the top.
             * @param down Indicating collide with any object on the bottom.
             * @param recalculateFaces Whether or not to recalculate interesting faces for this tile and its neighbors. Default true.
             * @returns This Tile object instance.
             */
            setCollision(left: boolean, right?: boolean, up?: boolean, down?: boolean, recalculateFaces?: boolean): this;

            /**
             * Set a callback to be called when this tile is hit by an object. The callback must return true for
             * collision processing to take place.
             * @param callback Callback function.
             * @param context Callback will be called within this context.
             * @returns This Tile object instance.
             */
            setCollisionCallback(callback: Function, context: object): this;

            /**
             * Sets the size of the tile and updates its pixelX and pixelY.
             * @param tileWidth The width of the tile in pixels.
             * @param tileHeight The height of the tile in pixels.
             * @param baseWidth The base width a tile in the map (in pixels).
             * @param baseHeight The base height of the tile in pixels.
             * @returns This Tile object instance.
             */
            setSize(tileWidth: number, tileHeight: number, baseWidth: number, baseHeight: number): this;

            /**
             * Used internally. Updates the tile's world XY position based on the current tile size.undefined
             * @returns This Tile object instance.
             */
            updatePixelXY(): this;

            /**
             * Destroys this tile by nullifying its collision callback and custom properties, releasing
             * references that could otherwise prevent garbage collection.
             */
            destroy(): void;

            /**
             * True if this tile can collide on any of its faces or has a collision callback set.
             */
            readonly canCollide: boolean;

            /**
             * True if this tile can collide on any of its faces.
             */
            readonly collides: boolean;

            /**
             * True if this tile has any interesting faces.
             */
            readonly hasInterestingFace: boolean;

            /**
             * The tileset that contains this Tile. This is null if accessed from a LayerData instance
             * before the tile is placed in a TilemapLayer, or if the tile has an index that doesn't correspond
             * to any of the map's tilesets.
             */
            readonly tileset: Phaser.Tilemaps.Tileset | null;

            /**
             * The tilemap layer that contains this Tile. This will only return null if accessed from a
             * LayerData instance before the tile is placed within a TilemapLayer.
             */
            readonly tilemapLayer: Phaser.Tilemaps.TilemapLayer | null;

            /**
             * The tilemap that contains this Tile. This will only return null if accessed from a LayerData
             * instance before the tile is placed within a TilemapLayer.
             */
            readonly tilemap: Phaser.Tilemaps.Tilemap | null;

            /**
             * Clears the alpha value associated with this Game Object.
             * 
             * Immediately sets the alpha back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * @param value The alpha value applied across the whole Game Object. Default 1.
             * @returns This Game Object instance.
             */
            setAlpha(value?: number): this;

            /**
             * The alpha value of the Game Object.
             * 
             * This is a global value, impacting the entire Game Object, not just a region of it.
             * The value is clamped to the range [0, 1]. Setting alpha to 0 also clears the render
             * flag, preventing the Game Object from being drawn until the alpha is raised above 0 again.
             */
            alpha: number;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

        }

        /**
         * A Tilemap is a container for Tilemap data. This isn't a display object, rather, it holds data
         * about the map and allows you to add tilesets and tilemap layers to it. A map can have one or
         * more tilemap layers, which are the display objects that actually render the tiles.
         * 
         * The Tilemap data can be parsed from a Tiled JSON file, a CSV file or a 2D array. Tiled is a free
         * software package specifically for creating tile maps, and is available from:
         * http://www.mapeditor.org
         * 
         * The Tilemap API supports the following types of map:
         * 
         * 1) Orthogonal
         * 2) Isometric
         * 3) Hexagonal
         * 4) Staggered
         * 
         * All map types use the unified `TilemapLayer` class, which combines the capabilities of the
         * former Static and Dynamic layers into a single, simplified API.
         * 
         * A Tilemap has handy methods for getting and manipulating the tiles within a layer, allowing
         * you to build or modify the tilemap data at runtime.
         * 
         * Note that all Tilemaps use a base tile size to calculate dimensions from, but that a
         * TilemapLayer may have its own unique tile size that overrides this.
         * 
         * If your tilemap includes layer groups (a feature of Tiled 1.2.0+) these
         * will be traversed and the following properties will impact children:
         * 
         * - Opacity (blended with parent) and visibility (parent overrides child)
         * - Vertical and horizontal offset
         * 
         * The grouping hierarchy is not preserved and all layers will be flattened into a single array.
         * 
         * Group layers are parsed during Tilemap construction but are discarded after parsing so dynamic
         * layers will NOT continue to be affected by a parent.
         * 
         * To avoid duplicate layer names, a layer that is a child of a group layer will have its parent
         * group name prepended with a '/'.  For example, consider a group called 'ParentGroup' with a
         * child called 'Layer 1'. In the Tilemap object, 'Layer 1' will have the name
         * 'ParentGroup/Layer 1'.
         * 
         * The Phaser Tiled Parser does **not** support the 'Collection of Images' feature for a Tileset.
         * You must ensure all of your tiles are contained in a single tileset image file (per layer)
         * and have this 'embedded' in the exported Tiled JSON map data.
         */
        class Tilemap {
            /**
             * 
             * @param scene The Scene to which this Tilemap belongs.
             * @param mapData A MapData instance containing Tilemap data.
             */
            constructor(scene: Phaser.Scene, mapData: Phaser.Tilemaps.MapData);

            scene: Phaser.Scene;

            /**
             * The base width of a tile in pixels. Note that individual layers may have a different tile
             * width.
             */
            tileWidth: number;

            /**
             * The base height of a tile in pixels. Note that individual layers may have a different
             * tile height.
             */
            tileHeight: number;

            /**
             * The width of the map (in tiles).
             */
            width: number;

            /**
             * The height of the map (in tiles).
             */
            height: number;

            /**
             * The orientation of the map data (as specified in Tiled), usually 'orthogonal'.
             */
            orientation: string;

            /**
             * The render (draw) order of the map data (as specified in Tiled), usually 'right-down'.
             * 
             * The draw orders are:
             * 
             * right-down
             * left-down
             * right-up
             * left-up
             * 
             * This can be changed via the `setRenderOrder` method.
             */
            renderOrder: string;

            /**
             * The format of the map data.
             */
            format: number;

            /**
             * The version of the map data (as specified in Tiled, usually 1).
             */
            version: number;

            /**
             * Map specific properties as specified in Tiled.
             * 
             * Depending on the version of Tiled and the JSON export used, this will be either
             * an object or an array of objects. For Tiled 1.2.0+ maps, it will be an array.
             */
            properties: object | object[];

            /**
             * The width of the map in pixels based on width * tileWidth.
             */
            widthInPixels: number;

            /**
             * The height of the map in pixels based on height * tileHeight.
             */
            heightInPixels: number;

            /**
             * A collection of Images, as parsed from Tiled map data.
             */
            imageCollections: Phaser.Tilemaps.ImageCollection[];

            /**
             * An array of Tiled Image Layers.
             */
            images: any[];

            /**
             * An array of Tilemap layer data.
             */
            layers: Phaser.Tilemaps.LayerData[];

            /**
             * Master list of tiles -> x, y, index in tileset.
             */
            tiles: any[];

            /**
             * An array of Tilesets used in the map.
             */
            tilesets: Phaser.Tilemaps.Tileset[];

            /**
             * An array of ObjectLayer instances parsed from Tiled object layers.
             */
            objects: Phaser.Tilemaps.ObjectLayer[];

            /**
             * The index of the currently selected LayerData object.
             */
            currentLayerIndex: number;

            /**
             * The length of the horizontal sides of the hexagon.
             * Only used for hexagonal orientation Tilemaps.
             */
            hexSideLength: number;

            /**
             * Sets the rendering (draw) order of the tiles in this map.
             * 
             * The default is 'right-down', meaning it will order the tiles starting from the top-left,
             * drawing to the right and then moving down to the next row.
             * 
             * The draw orders are:
             * 
             * 0 = right-down
             * 1 = left-down
             * 2 = right-up
             * 3 = left-up
             * 
             * Setting the render order does not change the tiles or how they are stored in the layer,
             * it purely impacts the order in which they are rendered.
             * 
             * You can provide either an integer (0 to 3), or the string version of the order.
             * 
             * Calling this method _after_ creating Tilemap Layers will **not** automatically
             * update them to use the new render order. If you call this method after creating layers, use their
             * own `setRenderOrder` methods to change them as needed.
             * @param renderOrder The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.
             * @returns This Tilemap object.
             */
            setRenderOrder(renderOrder: number | string): this;

            /**
             * Adds an image to the map to be used as a tileset. A single map may use multiple tilesets.
             * Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled
             * editor.
             * @param tilesetName The name of the tileset as specified in the map data.
             * @param key The key of the Phaser.Cache image used for this tileset. If
             * `undefined` or `null` it will look for an image with a key matching the tilesetName parameter.
             * @param tileWidth The width of the tile (in pixels) in the Tileset Image. If not
             * given it will default to the map's tileWidth value, or the tileWidth specified in the Tiled
             * JSON file.
             * @param tileHeight The height of the tiles (in pixels) in the Tileset Image. If
             * not given it will default to the map's tileHeight value, or the tileHeight specified in the
             * Tiled JSON file.
             * @param tileMargin The margin around the tiles in the sheet (in pixels). If not
             * specified, it will default to 0 or the value specified in the Tiled JSON file.
             * @param tileSpacing The spacing between each the tile in the sheet (in pixels).
             * If not specified, it will default to 0 or the value specified in the Tiled JSON file.
             * @param gid If adding multiple tilesets to a blank map, specify the starting
             * GID this set will use here. Default 0.
             * @param tileOffset Tile texture drawing offset.
             * If not specified, it will default to {0, 0} Default {x: 0, y: 0}.
             * @returns Returns the Tileset object that was created or updated, or null if itfailed.
             */
            addTilesetImage(tilesetName: string, key?: string, tileWidth?: number, tileHeight?: number, tileMargin?: number, tileSpacing?: number, gid?: number, tileOffset?: object): Phaser.Tilemaps.Tileset | null;

            /**
             * Copies the tiles in the source rectangular area to a new destination (all specified in tile
             * coordinates) within the layer. This copies all tile properties & recalculates collision
             * information in the destination region.
             * 
             * If no layer specified, the map's current layer is used.
             * @param srcTileX The x coordinate of the area to copy from, in tiles, not pixels.
             * @param srcTileY The y coordinate of the area to copy from, in tiles, not pixels.
             * @param width The width of the area to copy, in tiles, not pixels.
             * @param height The height of the area to copy, in tiles, not pixels.
             * @param destTileX The x coordinate of the area to copy to, in tiles, not pixels.
             * @param destTileY The y coordinate of the area to copy to, in tiles, not pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated. Default true.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns this, or null if the layer given was invalid.
             */
            copy(srcTileX: number, srcTileY: number, width: number, height: number, destTileX: number, destTileY: number, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Creates a new and empty Tilemap Layer. The currently selected layer in the map is set to this new layer.
             * 
             * Prior to v3.50.0 this method was called `createBlankDynamicLayer`.
             * @param name The name of this layer. Must be unique within the map.
             * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.
             * @param x The world x position where the top left of this layer will be placed. Default 0.
             * @param y The world y position where the top left of this layer will be placed. Default 0.
             * @param width The width of the layer in tiles. If not specified, it will default to the map's width.
             * @param height The height of the layer in tiles. If not specified, it will default to the map's height.
             * @param tileWidth The width of the tiles the layer uses for calculations. If not specified, it will default to the map's tileWidth.
             * @param tileHeight The height of the tiles the layer uses for calculations. If not specified, it will default to the map's tileHeight.
             * @returns Returns the new layer that was created, or `null` if it failed.
             */
            createBlankLayer(name: string, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number, width?: number, height?: number, tileWidth?: number, tileHeight?: number): Phaser.Tilemaps.TilemapLayer | null;

            /**
             * Creates a new Tilemap Layer that renders the LayerData associated with the given
             * `layerID`. The currently selected layer in the map is set to this new layer.
             * 
             * The `layerID` is important. If you've created your map in Tiled then you can get this by
             * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and
             * look at the layers[].name value. Either way it must match.
             * 
             * Prior to v3.50.0 this method was called `createDynamicLayer`.
             * @param layerID The layer array index value, or if a string is given, the layer name from Tiled.
             * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. When this is an array, if `gpu` is `true`, only the first element in the array is used as the tileset.
             * @param x The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0.
             * @param y The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0. Default 0.
             * @param gpu Create a TilemapGPULayer instead of a TilemapLayer. This option is WebGL-only. A TilemapGPULayer is less flexible, but can be much faster. It only works properly with orthographic tilemaps. Default false.
             * @returns Returns the new layer that was created, or null if it failed.
             */
            createLayer(layerID: number | string, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number, gpu?: boolean): Phaser.Tilemaps.TilemapLayer | Phaser.Tilemaps.TilemapGPULayer;

            /**
             * This method will iterate through all of the objects defined in a Tiled Object Layer and then
             * convert the matching results into Phaser Game Objects (by default, Sprites)
             * 
             * Objects are matched on one of 4 criteria: The Object ID, the Object GID, the Object Name, or the Object Type.
             * 
             * Within Tiled, Object IDs are unique per Object. Object GIDs, however, are shared by all objects
             * using the same image. Finally, Object Names and Types are strings and the same name can be used on multiple
             * Objects in Tiled, they do not have to be unique; Names are specific to Objects while Types can be inherited
             * from Object GIDs using the same image.
             * 
             * You set the configuration parameter accordingly, based on which type of criteria you wish
             * to match against. For example, to convert all items on an Object Layer with a `gid` of 26:
             * 
             * ```javascript
             * createFromObjects(layerName, {
             *   gid: 26
             * });
             * ```
             * 
             * Or, to convert objects with the name 'bonus':
             * 
             * ```javascript
             * createFromObjects(layerName, {
             *   name: 'bonus'
             * });
             * ```
             * 
             * Or, to convert an object with a specific id:
             * 
             * ```javascript
             * createFromObjects(layerName, {
             *   id: 9
             * });
             * ```
             * 
             * You should only specify either `id`, `gid`, `name`, `type`, or none of them. Do not add more than
             * one criteria to your config. If you do not specify any criteria, then _all_ objects in the
             * Object Layer will be converted.
             * 
             * By default this method will convert Objects into {@link Phaser.GameObjects.Sprite} instances, but you can override
             * this by providing your own class type:
             * 
             * ```javascript
             * createFromObjects(layerName, {
             *   gid: 26,
             *   classType: Coin
             * });
             * ```
             * 
             * This will convert all Objects with a gid of 26 into your custom `Coin` class. You can pass
             * any class type here, but it _must_ extend {@link Phaser.GameObjects.GameObject} as its base class.
             * Your class will always be passed 1 parameter: `scene`, which is a reference to either the Scene
             * specified in the config object or, if not given, the Scene to which this Tilemap belongs. The
             * class must have {@link Phaser.GameObjects.Components.Transform#setPosition setPosition} and
             * {@link Phaser.GameObjects.Components.Texture#setTexture setTexture} methods.
             * 
             * This method will set the following Tiled Object properties on the new Game Object:
             * 
             * - `flippedHorizontal` as `flipX`
             * - `flippedVertical` as `flipY`
             * - `height` as `displayHeight`
             * - `name`
             * - `rotation`
             * - `visible`
             * - `width` as `displayWidth`
             * - `x`, adjusted for origin
             * - `y`, adjusted for origin
             * 
             * Additionally, this method will set Tiled Object custom properties
             * 
             * - on the Game Object, if it has the same property name and a value that isn't `undefined`; or
             * - on the Game Object's {@link Phaser.GameObjects.GameObject#data data store} otherwise.
             * 
             * For example, a Tiled Object with custom properties `{ alpha: 0.5, gold: 1 }` will be created as a Game
             * Object with an `alpha` value of 0.5 and a `data.values.gold` value of 1.
             * 
             * When `useTileset` is `true` (the default), Tile Objects will inherit the texture and any tile properties
             * from the tileset, and the local tile ID will be used as the texture frame. For the frame selection to work
             * you need to load the tileset texture as a spritesheet so its frame names match the local tile IDs.
             * 
             * For instance, a tileset tile
             * 
             * ```
             * { id: 3, type: 'treadmill', speed: 4 }
             * ```
             * 
             * with gid 19 and an object
             * 
             * ```
             * { id: 7, gid: 19, speed: 5, rotation: 90 }
             * ```
             * 
             * will be interpreted as
             * 
             * ```
             * { id: 7, gid: 19, speed: 5, rotation: 90, type: 'treadmill', texture: '[the tileset texture]', frame: 3 }
             * ```
             * 
             * You can suppress this behavior by setting the boolean `ignoreTileset` for each `config` that should ignore
             * object gid tilesets.
             * 
             * You can set a `container` property in the config. If given, the new Game Object will be added to
             * the Container or Layer instance instead of the Scene.
             * 
             * You can set named texture-`key` and texture-`frame` properties, which will be set on the new Game Object.
             * 
             * Finally, you can provide an array of config objects, to convert multiple types of object in
             * a single call:
             * 
             * ```javascript
             * createFromObjects(layerName, [
             *   {
             *     gid: 26,
             *     classType: Coin
             *   },
             *   {
             *     id: 9,
             *     classType: BossMonster
             *   },
             *   {
             *     name: 'lava',
             *     classType: LavaTile
             *   },
             *   {
             *     type: 'endzone',
             *     classType: Phaser.GameObjects.Zone
             *   }
             * ]);
             * ```
             * 
             * The signature of this method changed significantly in v3.60.0. Prior to this, it did not take config objects.
             * @param objectLayerName The name of the Tiled object layer to create the Game Objects from.
             * @param config A CreateFromObjects configuration object, or an array of them.
             * @param useTileset True if objects that set gids should also search the underlying tile for properties and data. Default true.
             * @returns An array containing the Game Objects that were created. Empty if invalid object layer, or no matching id/gid/name was found.
             */
            createFromObjects(objectLayerName: string, config: Phaser.Types.Tilemaps.CreateFromObjectLayerConfig | Phaser.Types.Tilemaps.CreateFromObjectLayerConfig[], useTileset?: boolean): Phaser.GameObjects.GameObject[];

            /**
             * Creates a Sprite for every tile matching the given tile indexes in the layer. You can
             * optionally specify if each tile will be replaced with a new tile after the Sprite has been
             * created. Set this value to -1 if you want to just remove the tile after conversion.
             * 
             * This is useful if you want to lay down special tiles in a level that are converted to
             * Sprites, but want to replace the tile itself with a floor tile or similar once converted.
             * 
             * The following features were added in Phaser v3.80:
             * 
             * By default, Phaser Sprites have their origin set to 0.5 x 0.5. If you don't specify a new
             * origin in the spriteConfig, then it will adjust the sprite positions by half the tile size,
             * to position them accurately on the map.
             * 
             * When the Sprite is created it will copy the following properties from the tile:
             * 
             * 'rotation', 'flipX', 'flipY', 'alpha', 'visible' and 'tint'.
             * 
             * The spriteConfig also has a special property called `useSpriteSheet`. If this is set to
             * `true` and you have loaded the tileset as a sprite sheet (not an image), then it will
             * set the Sprite key and frame to match the sprite texture and tile index.
             * @param indexes The tile index, or array of indexes, to create Sprites from.
             * @param replacements The tile index, or array of indexes, to change a converted
             * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a
             * one-to-one mapping with the indexes array.
             * @param spriteConfig The config object to pass into the Sprite creator (i.e. scene.make.sprite).
             * @param scene The Scene to create the Sprites within.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns an array of Sprites, or null if the layer given was invalid.
             */
            createFromTiles(indexes: number | any[], replacements: number | any[] | undefined, spriteConfig?: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.GameObjects.Sprite[] | null;

            /**
             * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the
             * specified index. Tiles will be set to collide if the given index is a colliding index.
             * Collision information in the region will be recalculated.
             * 
             * If no layer specified, the map's current layer is used.
             * @param index The tile index to fill the area with.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param recalculateFaces `true` if the faces data should be recalculated. Default true.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns this, or null if the layer given was invalid.
             */
            fill(index: number, tileX?: number, tileY?: number, width?: number, height?: number, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * For each object in the given object layer, run the given filter callback function. Any
             * objects that pass the filter test (i.e. where the callback returns true) will be returned in a
             * new array. Similar to Array.prototype.Filter in vanilla JS.
             * @param objectLayer The name of an object layer (from Tiled) or an ObjectLayer instance.
             * @param callback The callback. Each object in the given area will be passed to this callback as the first and only parameter.
             * @param context The context under which the callback should be run.
             * @returns An array of object that match the search, or null if the objectLayer given was invalid.
             */
            filterObjects(objectLayer: Phaser.Tilemaps.ObjectLayer | string, callback: TilemapFilterCallback, context?: object): Phaser.Types.Tilemaps.TiledObject[] | null;

            /**
             * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
             * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns
             * true) will be returned as a new array. Similar to Array.prototype.Filter in vanilla JS.
             * If no layer specified, the map's current layer is used.
             * @param callback The callback. Each tile in the given area will be passed to this
             * callback as the first and only parameter. The callback should return true for tiles that pass the
             * filter.
             * @param context The context under which the callback should be run.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns an array of Tiles, or null if the layer given was invalid.
             */
            filterTiles(callback: Function, context?: object, tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile[] | null;

            /**
             * Searches the entire map layer for the first tile matching the given index, then returns that Tile
             * object. If no match is found, it returns null. The search starts from the top-left tile and
             * continues horizontally until it hits the end of the row, then it drops down to the next column.
             * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to
             * the top-left.
             * If no layer specified, the map's current layer is used.
             * @param index The tile index value to search for.
             * @param skip The number of times to skip a matching tile before returning. Default 0.
             * @param reverse If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left. Default false.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a Tile, or null if the layer given was invalid.
             */
            findByIndex(index: number, skip?: number, reverse?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile | null;

            /**
             * Find the first object in the given object layer that satisfies the provided testing function.
             * I.e. finds the first object for which `callback` returns true. Similar to
             * Array.prototype.find in vanilla JS.
             * @param objectLayer The name of an object layer (from Tiled) or an ObjectLayer instance.
             * @param callback The callback. Each object in the given area will be passed to this callback as the first and only parameter.
             * @param context The context under which the callback should be run.
             * @returns An object that matches the search, or null if no object found.
             */
            findObject(objectLayer: Phaser.Tilemaps.ObjectLayer | string, callback: TilemapFindCallback, context?: object): Phaser.Types.Tilemaps.TiledObject | null;

            /**
             * Find the first tile in the given rectangular area (in tile coordinates) of the layer that
             * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns
             * true. Similar to Array.prototype.find in vanilla JS.
             * If no layer specified, the map's current layer is used.
             * @param callback The callback. Each tile in the given area will be passed to this callback as the first and only parameter.
             * @param context The context under which the callback should be run.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param layer The Tile layer to run the search on. If not provided will use the current layer.
             * @returns Returns a Tile, or null if the layer given was invalid.
             */
            findTile(callback: FindTileCallback, context?: object, tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile | null;

            /**
             * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
             * callback. Similar to Array.prototype.forEach in vanilla JS.
             * 
             * If no layer specified, the map's current layer is used.
             * @param callback The callback. Each tile in the given area will be passed to this callback as the first and only parameter.
             * @param context The context under which the callback should be run.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param layer The Tile layer to run the search on. If not provided will use the current layer.
             * @returns Returns this, or null if the layer given was invalid.
             */
            forEachTile(callback: EachTileCallback, context?: object, tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Gets the image layer index based on its name.
             * @param name The name of the image to get.
             * @returns The index of the image in this tilemap, or null if not found.
             */
            getImageIndex(name: string): number;

            /**
             * Return a list of all valid imagelayer names loaded in this Tilemap.undefined
             * @returns Array of valid imagelayer names / IDs loaded into this Tilemap.
             */
            getImageLayerNames(): string[];

            /**
             * Internally used. Returns the index of the object in one of the Tilemaps arrays whose name
             * property matches the given `name`.
             * @param location The Tilemap array to search.
             * @param name The name of the array element to get.
             * @returns The index of the element in the array, or null if not found.
             */
            getIndex(location: any[], name: string): number;

            /**
             * Gets the LayerData from `this.layers` that is associated with the given `layer`, or null if the layer is invalid.
             * @param layer The name of the layer from Tiled, the index of the layer in the map or Tilemap Layer. If not given will default to the maps current layer index.
             * @returns The corresponding `LayerData` within `this.layers`, or null.
             */
            getLayer(layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.LayerData | null;

            /**
             * Gets the ObjectLayer from `this.objects` that has the given `name`, or null if no ObjectLayer is found with that name.
             * @param name The name of the object layer from Tiled.
             * @returns The corresponding `ObjectLayer` within `this.objects`, or null.
             */
            getObjectLayer(name?: string): Phaser.Tilemaps.ObjectLayer | null;

            /**
             * Return a list of all valid objectgroup names loaded in this Tilemap.undefined
             * @returns Array of valid objectgroup names / IDs loaded into this Tilemap.
             */
            getObjectLayerNames(): string[];

            /**
             * Gets the LayerData index of the given `layer` within this.layers, or null if an invalid
             * `layer` is given.
             * @param layer The name of the layer from Tiled, the index of the layer in the map or a Tilemap Layer. If not given will default to the map's current layer index.
             * @returns The LayerData index within this.layers.
             */
            getLayerIndex(layer?: string | number | Phaser.Tilemaps.TilemapLayer): number;

            /**
             * Gets the index of the LayerData within this.layers that has the given `name`, or null if an
             * invalid `name` is given.
             * @param name The name of the layer to get.
             * @returns The LayerData index within this.layers.
             */
            getLayerIndexByName(name: string): number;

            /**
             * Gets a tile at the given tile coordinates from the given layer.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX X position to get the tile from (given in tile units, not pixels).
             * @param tileY Y position to get the tile from (given in tile units, not pixels).
             * @param nonNull For empty tiles, return a Tile object with an index of -1 instead of null. Default false.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a Tile, or null if the layer given was invalid.
             */
            getTileAt(tileX: number, tileY: number, nonNull?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile | null;

            /**
             * Gets a tile at the given world coordinates from the given layer.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param worldX X position to get the tile from (given in pixels)
             * @param worldY Y position to get the tile from (given in pixels)
             * @param nonNull For empty tiles, return a Tile object with an index of -1 instead of null. Default false.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a Tile, or null if the layer given was invalid.
             */
            getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile | null;

            /**
             * Return a list of all valid tilelayer names loaded in this Tilemap.undefined
             * @returns Array of valid tilelayer names / IDs loaded into this Tilemap.
             */
            getTileLayerNames(): string[];

            /**
             * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns an array of Tiles, or null if the layer given was invalid.
             */
            getTilesWithin(tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile[] | null;

            /**
             * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,
             * Line, Rectangle or Triangle. The shape should be in world coordinates.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param shape A shape in world (pixel) coordinates
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param camera The Camera to use when factoring in which tiles to return.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns an array of Tiles, or null if the layer given was invalid.
             */
            getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile[] | null;

            /**
             * Gets the tiles in the given rectangular area (in world coordinates) of the layer.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param worldX The world x coordinate for the top-left of the area.
             * @param worldY The world y coordinate for the top-left of the area.
             * @param width The width of the area.
             * @param height The height of the area.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param camera The Camera to use when factoring in which tiles to return.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns an array of Tiles, or null if the layer given was invalid.
             */
            getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile[] | null;

            /**
             * Gets the Tileset that has the given `name`, or null if an invalid `name` is given.
             * @param name The name of the Tileset to get.
             * @returns The Tileset, or `null` if no matching named tileset was found.
             */
            getTileset(name: string): Phaser.Tilemaps.Tileset | null;

            /**
             * Gets the index of the Tileset within this.tilesets that has the given `name`, or null if an
             * invalid `name` is given.
             * @param name The name of the Tileset to get.
             * @returns The Tileset index within this.tilesets.
             */
            getTilesetIndex(name: string): number;

            /**
             * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns
             * false if there is no tile or if the tile at that location has an index of -1.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a boolean, or null if the layer given was invalid.
             */
            hasTileAt(tileX: number, tileY: number, layer?: string | number | Phaser.Tilemaps.TilemapLayer): boolean | null;

            /**
             * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns
             * false if there is no tile or if the tile at that location has an index of -1.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param worldX The x coordinate, in pixels.
             * @param worldY The y coordinate, in pixels.
             * @param camera The Camera to use when factoring in which tiles to return.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a boolean, or null if the layer given was invalid.
             */
            hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): boolean | null;

            /**
             * The LayerData object that is currently selected in the map. You can set this property using
             * any type supported by setLayer.
             */
            layer: Phaser.Tilemaps.LayerData;

            /**
             * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index
             * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified
             * location. If you pass in an index, only the index at the specified location will be changed.
             * Collision information will be recalculated at the specified location.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tile The index of this tile to set or a Tile object.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a Tile, or null if the layer given was invalid or the coordinates were out of bounds.
             */
            putTileAt(tile: number | Phaser.Tilemaps.Tile, tileX: number, tileY: number, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile | null;

            /**
             * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either
             * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the
             * specified location. If you pass in an index, only the index at the specified location will be
             * changed. Collision information will be recalculated at the specified location.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tile The index of this tile to set or a Tile object.
             * @param worldX The x coordinate, in pixels.
             * @param worldY The y coordinate, in pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a Tile, or null if the layer given was invalid.
             */
            putTileAtWorldXY(tile: number | Phaser.Tilemaps.Tile, worldX: number, worldY: number, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile | null;

            /**
             * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified
             * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,
             * all attributes will be copied over to the specified location. If you pass in an index, only the
             * index at the specified location will be changed. Collision information will be recalculated
             * within the region tiles were changed.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tile A row (array) or grid (2D array) of Tiles or tile indexes to place.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns this, or null if the layer given was invalid.
             */
            putTilesAt(tile: number[] | number[][] | Phaser.Tilemaps.Tile[] | Phaser.Tilemaps.Tile[][], tileX: number, tileY: number, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
             * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then
             * those will be used for randomly assigning new tile indexes. If an array is not provided, the
             * indexes found within the region (excluding -1) will be used for randomly assigning new tile
             * indexes. This method only modifies tile indexes and does not change collision information.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param indexes An array of indexes to randomly draw from during randomization.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns this, or null if the layer given was invalid.
             */
            randomize(tileX?: number, tileY?: number, width?: number, height?: number, indexes?: number[], layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting
             * faces are used internally for optimizing collisions against tiles. This method is mostly used
             * internally to optimize recalculating faces when only one tile has been changed.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns this, or null if the layer given was invalid.
             */
            calculateFacesAt(tileX: number, tileY: number, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the
             * layer. Interesting faces are used internally for optimizing collisions against tiles. This method
             * is mostly used internally.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns this, or null if the layer given was invalid.
             */
            calculateFacesWithin(tileX?: number, tileY?: number, width?: number, height?: number, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Removes the given TilemapLayer from this Tilemap without destroying it.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param layer The tile layer to be removed.
             * @returns Returns this, or null if the layer given was invalid.
             */
            removeLayer(layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Destroys the given TilemapLayer and removes it from this Tilemap.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param layer The tile layer to be destroyed.
             * @returns Returns this, or null if the layer given was invalid.
             */
            destroyLayer(layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Removes all Tilemap Layers from this Tilemap and calls `destroy` on each of them.undefined
             * @returns This Tilemap object.
             */
            removeAllLayers(): this;

            /**
             * Removes the given Tile, or an array of Tiles, from the layer to which they belong,
             * and optionally recalculates the collision information.
             * @param tiles The Tile to remove, or an array of Tiles.
             * @param replaceIndex After removing the Tile, insert a brand new Tile into its location with the given index. Leave as -1 to just remove the tile. Default -1.
             * @param recalculateFaces `true` if the faces data should be recalculated. Default true.
             * @returns Returns an array of Tiles that were removed.
             */
            removeTile(tiles: Phaser.Tilemaps.Tile | Phaser.Tilemaps.Tile[], replaceIndex?: number, recalculateFaces?: boolean): Phaser.Tilemaps.Tile[];

            /**
             * Removes the tile at the given tile coordinates in the specified layer and updates the layers collision information.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param replaceWithNull If `true` (the default), this will replace the tile at the specified location with null instead of a Tile with an index of -1.
             * @param recalculateFaces If `true` (the default), the faces data will be recalculated.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns the Tile that was removed, or null if the layer given was invalid.
             */
            removeTileAt(tileX: number, tileY: number, replaceWithNull?: boolean, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile | null;

            /**
             * Removes the tile at the given world coordinates in the specified layer and updates the layers collision information.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param worldX The x coordinate, in pixels.
             * @param worldY The y coordinate, in pixels.
             * @param replaceWithNull If `true` (the default), this will replace the tile at the specified location with null instead of a Tile with an index of -1.
             * @param recalculateFaces If `true` (the default), the faces data will be recalculated.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a Tile, or null if the layer given was invalid.
             */
            removeTileAtWorldXY(worldX: number, worldY: number, replaceWithNull?: boolean, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tile | null;

            /**
             * Draws a debug representation of the layer to the given Graphics object. This is helpful when you want to
             * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles
             * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation
             * wherever you want on the screen.
             * 
             * If no layer is specified, the maps current layer is used.
             * 
             * **Note:** This method currently only works with orthogonal tilemap layers.
             * @param graphics The target Graphics object to draw upon.
             * @param styleConfig An object specifying the colors to use for the debug drawing.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig?: Phaser.Types.Tilemaps.StyleConfig, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Draws a debug representation of all layers within this Tilemap to the given Graphics object.
             * 
             * This is helpful when you want to get a quick idea of which of your tiles are colliding and which
             * have interesting faces. The tiles are drawn starting at (0, 0) in the Graphics, allowing you to
             * place the debug representation wherever you want on the screen.
             * @param graphics The target Graphics object to draw upon.
             * @param styleConfig An object specifying the colors to use for the debug drawing.
             * @returns This Tilemap instance.
             */
            renderDebugFull(graphics: Phaser.GameObjects.Graphics, styleConfig?: Phaser.Types.Tilemaps.StyleConfig): this;

            /**
             * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
             * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does
             * not change collision information.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param findIndex The index of the tile to search for.
             * @param newIndex The index of the tile to replace it with.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            replaceByIndex(findIndex: number, newIndex: number, tileX?: number, tileY?: number, width?: number, height?: number, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Sets collision on the given tile or tiles within a layer by index. You can pass in either a
             * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if
             * collision will be enabled (true) or disabled (false).
             * 
             * If no layer is specified, the maps current layer is used.
             * @param indexes Either a single tile index, or an array of tile indexes.
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @param updateLayer If true, updates the current tiles on the layer. Set to false if no tiles have been placed for significant performance boost. Default true.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            setCollision(indexes: number | any[], collides?: boolean, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer, updateLayer?: boolean): Phaser.Tilemaps.Tilemap | null;

            /**
             * Sets collision on a range of tiles in a layer whose index is between the specified `start` and
             * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set
             * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be
             * enabled (true) or disabled (false).
             * 
             * If no layer is specified, the maps current layer is used.
             * @param start The first index of the tile to be set for collision.
             * @param stop The last index of the tile to be set for collision.
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            setCollisionBetween(start: number, stop: number, collides?: boolean, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property
             * that matches the given properties object, its collision flag will be set. The `collides`
             * parameter controls if collision will be enabled (true) or disabled (false). Passing in
             * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that
             * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can
             * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a
             * "types" property that matches any of those values, its collision flag will be updated.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param properties An object with tile properties and corresponding values that should be checked.
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Sets collision on all tiles in the given layer, except for tiles that have an index specified in
             * the given array. The `collides` parameter controls if collision will be enabled (true) or
             * disabled (false). Tile indexes not currently in the layer are not affected.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param indexes An array of the tile indexes to not be counted for collision.
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            setCollisionByExclusion(indexes: number[], collides?: boolean, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Sets collision on the tiles within a layer by checking each tiles collision group data
             * (typically defined in Tiled within the tileset collision editor). If any objects are found within
             * a tiles collision group, the tiles colliding information will be set. The `collides` parameter
             * controls if collision will be enabled (true) or disabled (false).
             * 
             * If no layer is specified, the maps current layer is used.
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Sets a global collision callback for the given tile index within the layer. This will affect all
             * tiles on this layer that have the same index. If a callback is already set for the tile index it
             * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile
             * at a specific location on the map then see `setTileLocationCallback`.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param indexes Either a single tile index, or an array of tile indexes to have a collision callback set for. All values should be integers.
             * @param callback The callback that will be invoked when the tile is collided with.
             * @param callbackContext The context under which the callback is called.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            setTileIndexCallback(indexes: number | number[], callback: Function, callbackContext: object, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.
             * If a callback is already set for the tile index it will be replaced. Set the callback to null to
             * remove it.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param callback The callback that will be invoked when the tile is collided with.
             * @param callbackContext The context under which the callback is called.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            setTileLocationCallback(tileX: number, tileY: number, width: number, height: number, callback: Function, callbackContext?: object, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Sets the current layer to the LayerData associated with `layer`.
             * @param layer The name of the layer from Tiled, the index of the layer in the map or a TilemapLayer. If not given will default to the maps current layer index.
             * @returns This Tilemap object.
             */
            setLayer(layer?: string | number | Phaser.Tilemaps.TilemapLayer): this;

            /**
             * Sets the base tile size for the map. Note: this does not necessarily match the tileWidth and
             * tileHeight for all layers. This also updates the base size on all tiles across all layers.
             * @param tileWidth The width of the tiles the map uses for calculations.
             * @param tileHeight The height of the tiles the map uses for calculations.
             * @returns This Tilemap object.
             */
            setBaseTileSize(tileWidth: number, tileHeight: number): this;

            /**
             * Sets the tile size for a specific `layer`. Note: this does not necessarily match the maps
             * tileWidth and tileHeight for all layers. This will set the tile size for the layer and any
             * tiles the layer has.
             * @param tileWidth The width of the tiles (in pixels) in the layer.
             * @param tileHeight The height of the tiles (in pixels) in the layer.
             * @param layer The name of the layer from Tiled, the index of the layer in the map or a TilemapLayer. If not given will default to the maps current layer index.
             * @returns This Tilemap object.
             */
            setLayerTileSize(tileWidth: number, tileHeight: number, layer?: string | number | Phaser.Tilemaps.TilemapLayer): this;

            /**
             * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given
             * layer. It will only randomize the tiles in that area, so if they're all the same nothing will
             * appear to have changed! This method only modifies tile indexes and does not change collision
             * information.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            shuffle(tileX?: number, tileY?: number, width?: number, height?: number, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
             * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision
             * information.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileA First tile index.
             * @param tileB Second tile index.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            swapByIndex(tileA: number, tileB: number, tileX?: number, tileY?: number, width?: number, height?: number, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the
             * layers position, scale and scroll.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a number, or null if the layer given was invalid.
             */
            tileToWorldX(tileX: number, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): number | null;

            /**
             * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the
             * layers position, scale and scroll.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a number, or null if the layer given was invalid.
             */
            tileToWorldY(tileY: number, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): number | null;

            /**
             * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
             * layers position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param vec2 A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a Vector2, or null if the layer given was invalid.
             */
            tileToWorldXY(tileX: number, tileY: number, vec2?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Math.Vector2 | null;

            /**
             * Returns an array of Vector2s where each entry corresponds to the corner of the requested tile.
             * 
             * The `tileX` and `tileY` parameters are in tile coordinates, not world coordinates.
             * 
             * The corner coordinates are in world space, having factored in TilemapLayer scale, position
             * and the camera, if given.
             * 
             * The size of the array will vary based on the orientation of the map. For example an
             * orthographic map will return an array of 4 vectors, where-as a hexagonal map will,
             * of course, return an array of 6 corner vectors.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns an array of Vector2s, or null if the layer given was invalid.
             */
            getTileCorners(tileX: number, tileY: number, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Math.Vector2[] | null;

            /**
             * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
             * specified layer. Each tile will receive a new index. New indexes are drawn from the given
             * weightedIndexes array. An example weighted array:
             * 
             * [
             *  { index: 6, weight: 4 },    // Probability of index 6 is 4 / 8
             *  { index: 7, weight: 2 },    // Probability of index 7 would be 2 / 8
             *  { index: 8, weight: 1.5 },  // Probability of index 8 would be 1.5 / 8
             *  { index: 26, weight: 0.5 }  // Probability of index 26 would be 0.5 / 8
             * ]
             * 
             * The probability of any index being picked is (the indexs weight) / (sum of all weights). This
             * method only modifies tile indexes and does not change collision information.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param weightedIndexes An array of objects to randomly draw from during randomization. They should be in the form: { index: 0, weight: 4 } or { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Return this Tilemap object, or null if the layer given was invalid.
             */
            weightedRandomize(weightedIndexes: object[], tileX?: number, tileY?: number, width?: number, height?: number, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Tilemaps.Tilemap | null;

            /**
             * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the
             * layers position, scale and scroll.
             * 
             * If no layer is specified, the maps current layer is used.
             * 
             * You cannot call this method for Isometric or Hexagonal tilemaps as they require
             * both `worldX` and `worldY` values to determine the correct tile, instead you
             * should use the `worldToTileXY` method.
             * @param worldX The x coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a number, or null if the layer given was invalid.
             */
            worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): number | null;

            /**
             * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the
             * layers position, scale and scroll.
             * 
             * If no layer is specified, the maps current layer is used.
             * 
             * You cannot call this method for Isometric or Hexagonal tilemaps as they require
             * both `worldX` and `worldY` values to determine the correct tile, instead you
             * should use the `worldToTileXY` method.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a number, or null if the layer given was invalid.
             */
            worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): number | null;

            /**
             * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the
             * layers position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * 
             * If no layer is specified, the maps current layer is used.
             * @param worldX The x coordinate to be converted, in pixels, not tiles.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param vec2 A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The tile layer to use. If not given the current layer is used.
             * @returns Returns a Vector2, or null if the layer given was invalid.
             */
            worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, vec2?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.Math.Vector2 | null;

            /**
             * Removes all layer data from this Tilemap and nulls the scene reference. This will destroy any
             * TilemapLayers that have been created.
             */
            destroy(): void;

        }

        /**
         * A TilemapGPULayer is a special kind of Game Object that renders LayerData from a Tilemap.
         * Unlike the more flexible TilemapLayer, this object uses a single Tileset
         * and is optimized for speed and quality over flexibility.
         * Use it for high-performance rendering of tilemaps which don't update
         * their contents. It still supports tile animation and flip.
         * 
         * This layer is designed to be used with the WebGL renderer only.
         * 
         * Performance of this layer is excellent. If you do not need to
         * manipulate the tiles in the layer, and the layer is of the supported type,
         * this is the best option for rendering tilemaps.
         * It is almost entirely GPU-bound, so it will free up CPU resources
         * for other game code (the CPU usually does much more work than the GPU in games).
         * It has a fixed cost per pixel on screen, whether there is anything in that
         * tile or not.
         * In general, it suffers no performance loss when many tiles are visible.
         * 
         * Create a TilemapGPULayer by adding the `gpu` flag to a call to
         * `Tilemap.createLayer()`. This will return a TilemapGPULayer instance.
         * 
         * This layer has the following abilities and restrictions:
         * 
         * - Use a single tileset, with a single texture image.
         * - Maximum tilemap size of 4096x4096 tiles.
         * - Maximum of 2^23 (8388608) unique tile IDs.
         * - Tiles may be flipped.
         * - Tiles may be animated.
         * - Animation data limit of 8388608 entries (each animation or each frame of animation uses one entry).
         * - Orthographic tilemaps only.
         * 
         * The layer renders via a special shader.
         * This uses a texture containing the layer tile data, and a second texture
         * containing any tile animations. The shader then renders the tiles
         * as a single quad. Because it doesn't have to compute individual tiles
         * on the CPU, this is much faster than a TilemapLayer.
         * However, because it treats tiles as a single orthographic grid,
         * it is not suitable for use with isometric or hexagonal tilemaps,
         * or other types of tilemap that require different rendering methods.
         * 
         * If the tileset image uses NEAREST minfiltering, the shader will render
         * sharp edged pixels. Otherwise, it assumes LINEAR filtering.
         * The shader will automatically render smooth borders between tiles
         * in LINEAR mode, with no seams or bleeding, for perfect results.
         * A regular TilemapLayer cannot render smooth borders like this,
         * creating sharp seams between tiles.
         * 
         * The layer can be edited, but it will not update automatically.
         * Regenerate the layer tile data texture by calling `generateLayerDataTexture`.
         */
        class TilemapGPULayer extends Phaser.Tilemaps.TilemapLayerBase {
            /**
             * 
             * @param scene The Scene to which this TilemapGPULayer belongs.
             * @param tilemap The Tilemap this layer is a part of.
             * @param layerIndex The index of the LayerData associated with this layer.
             * @param tileset The tileset used to render the tiles in this layer. Can be a string or a Tileset object.
             * @param x The world x position where the top left of this layer will be placed.
             * @param y The world y position where the top left of this layer will be placed.
             */
            constructor(scene: Phaser.Scene, tilemap: Phaser.Tilemaps.Tilemap, layerIndex: number, tileset: string | Phaser.Tilemaps.Tileset, x?: number, y?: number);

            /**
             * The `Tileset` associated with this layer.
             * 
             * Unlike a `TilemapLayer`, this object can only have one tileset,
             * because the renderer is optimized for a single texture.
             */
            tileset: Phaser.Tilemaps.Tileset;

            /**
             * A texture containing the tile data for this game object.
             * Each texel describes a single tile in the layer.
             * 
             * Each texel is stored as a 32-bit value, encoded thus:
             * 
             * - 1 bit: Horizontal flip flag.
             * - 1 bit: Vertical flip flag.
             * - 1 bit: Animation flag.
             * - 1 bit: Unused.
             * - 28 bits: Tile index.
             */
            layerDataTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * Generates the layer data texture for this Game Object.
             * 
             * The layer data texture is a WebGL texture in which each texel encodes
             * the tile index, flip flags, and animation flag for a single tile in the
             * layer. It is consumed by the GPU shader to render the entire tilemap as
             * a single quad.
             * 
             * This method is called automatically by `setTileset`. You should call it
             * manually after editing tile data in the layer, since the GPU texture
             * does not update automatically when tiles change.
             */
            generateLayerDataTexture(): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The time elapsed since timer initialization, in milliseconds.
             */
            timeElapsed: number;

            /**
             * The time after which `timeElapsed` will reset, in milliseconds.
             * By default, this is 1 hour.
             * If you use the timer for animations, you can set this to a period
             * that matches the animation durations.
             * 
             * This is necessary for the timer to avoid floating-point precision issues
             * in shaders.
             * A float32 can represent a few hours of milliseconds accurately,
             * but the precision decreases as the value increases.
             */
            timeElapsedResetPeriod: number;

            /**
             * Whether the elapse timer is paused.
             */
            timePaused: boolean;

            /**
             * Set the reset period for the elapse timer for this game object.
             * @param period The time after which `timeElapsed` will reset, in milliseconds.
             * @returns This game object.
             */
            setTimerResetPeriod(period: number): this;

            /**
             * Pauses or resumes the elapse timer for this game object.
             * @param paused Pause state (`true` to pause, `false` to unpause). If not specified, the timer will unpause.
             * @returns This game object.
             */
            setTimerPaused(paused?: boolean): this;

            /**
             * Reset the elapse timer for this game object.
             * @param ms The time to reset the timer to, in milliseconds. Default 0.
             * @returns This game object.
             */
            resetTimer(ms?: number): this;

            /**
             * Update the elapse timer for this game object.
             * This should be called automatically by the preUpdate method.
             * 
             * Override this method to create more advanced time management,
             * or set it to a NOOP function to disable the timer update.
             * If you want to control animations with a tween or input system,
             * disabling the timer update could be useful.
             * @param time The current time in milliseconds.
             * @param delta The time since the last update, in milliseconds.
             * @returns This game object.
             */
            updateTimer(time: number, delta: number): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

            /**
             * Sets the Collision Category that this Arcade Physics Body
             * will use in order to determine what it can collide with.
             * 
             * It can only have one single category assigned to it.
             * 
             * If you wish to reset the collision category and mask, call
             * the `resetCollisionCategory` method.
             * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
             * @returns This Game Object.
             */
            setCollisionCategory(category: number): this;

            /**
             * Checks to see if the given Collision Category will collide with
             * this Arcade Physics object or not.
             * @param category Collision category value to test.
             * @returns `true` if the given category will collide with this object, otherwise `false`.
             */
            willCollideWith(category: number): boolean;

            /**
             * Adds the given Collision Category to the list of those that this
             * Arcade Physics Body will collide with.
             * @param category The collision category to add to this body's collision mask.
             * @returns This Game Object.
             */
            addCollidesWith(category: number): this;

            /**
             * Removes the given Collision Category from the list of those that this
             * Arcade Physics Body will collide with.
             * @param category The collision category to remove from this body's collision mask.
             * @returns This Game Object.
             */
            removeCollidesWith(category: number): this;

            /**
             * Sets all of the Collision Categories that this Arcade Physics Body
             * will collide with. You can either pass a single category value, or
             * an array of them.
             * 
             * Calling this method will reset all of the collision categories,
             * so only those passed to this method are enabled.
             * 
             * If you wish to add a new category to the existing mask, call
             * the `addCollidesWith` method.
             * 
             * If you wish to reset the collision category and mask, call
             * the `resetCollisionCategory` method.
             * @param categories The collision category to collide with, or an array of them.
             * @returns This Game Object.
             */
            setCollidesWith(categories: number | number[]): this;

            /**
             * Resets the Collision Category and Mask back to the defaults,
             * which means the body will belong to category 1 and will collide with all other categories.undefined
             * @returns This Game Object.
             */
            resetCollisionCategory(): this;

        }

        /**
         * A TilemapLayer is a Game Object responsible for rendering a single layer of tile data from a
         * Tilemap. It works in combination with one or more Tileset objects, which provide the actual
         * tile imagery. You would typically create a TilemapLayer via `Tilemap.createLayer`, rather than
         * instantiating it directly.
         * 
         * Each layer corresponds to a LayerData entry within the Tilemap, and supports all four map
         * orientations: Orthogonal, Isometric, Hexagonal, and Staggered. The layer handles its own
         * camera culling, only sending visible tiles to the renderer each frame, which keeps performance
         * efficient even for large maps.
         * 
         * TilemapLayers support physics via both Arcade Physics and Matter.js, and can have tints,
         * alpha, and other standard Game Object properties applied to them.
         * 
         * A TilemapLayer can be placed inside a Container, but its physics
         * will work as though it was placed directly in the world.
         * This is rarely what you want.
         */
        class TilemapLayer extends Phaser.Tilemaps.TilemapLayerBase {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param tilemap The Tilemap this layer is a part of.
             * @param layerIndex The index of the LayerData associated with this layer.
             * @param tileset The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.
             * @param x The world x position where the top left of this layer will be placed. Default 0.
             * @param y The world y position where the top left of this layer will be placed. Default 0.
             */
            constructor(scene: Phaser.Scene, tilemap: Phaser.Tilemaps.Tilemap, layerIndex: number, tileset: string | string[] | Phaser.Tilemaps.Tileset | Phaser.Tilemaps.Tileset[], x?: number, y?: number);

            /**
             * An array of `Tileset` objects associated with this layer.
             */
            tileset: Phaser.Tilemaps.Tileset[];

            /**
             * The total number of tiles drawn by the renderer in the last frame.
             */
            readonly tilesDrawn: number;

            /**
             * The total number of tiles in this layer. Updated every frame.
             */
            readonly tilesTotal: number;

            /**
             * Used internally during rendering. This holds the tiles that are visible within the Camera.
             */
            culledTiles: Phaser.Tilemaps.Tile[];

            /**
             * You can control if the camera should cull tiles on this layer before rendering them or not.
             * 
             * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.
             * 
             * However, there are some instances when you may wish to disable this, and toggling this flag allows
             * you to do so. Also see `setSkipCull` for a chainable method that does the same thing.
             */
            skipCull: boolean;

            /**
             * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size.
             * 
             * See the method `setCullPadding` for more details.
             */
            cullPaddingX: number;

            /**
             * The amount of extra tiles to add into the cull rectangle when calculating its vertical size.
             * 
             * See the method `setCullPadding` for more details.
             */
            cullPaddingY: number;

            /**
             * The callback that is invoked when the tiles are culled.
             * 
             * It will call a different function based on the map orientation:
             * 
             * Orthogonal (the default) is `TilemapComponents.CullTiles`
             * Isometric is `TilemapComponents.IsometricCullTiles`
             * Hexagonal is `TilemapComponents.HexagonalCullTiles`
             * Staggered is `TilemapComponents.StaggeredCullTiles`
             * 
             * However, you can override this to call any function you like.
             * 
             * It will be sent 4 arguments:
             * 
             * 1. The Phaser.Tilemaps.LayerData object for this Layer
             * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull.
             * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered.
             * 4. The Render Order constant.
             * 
             * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system.
             */
            cullCallback: Function;

            /**
             * Sets the rendering (draw) order of the tiles in this layer.
             * 
             * The default is 'right-down', meaning it will order the tiles starting from the top-left,
             * drawing to the right and then moving down to the next row.
             * 
             * The draw orders are:
             * 
             * 0 = right-down
             * 1 = left-down
             * 2 = right-up
             * 3 = left-up
             * 
             * Setting the render order does not change the tiles or how they are stored in the layer,
             * it purely impacts the order in which they are rendered.
             * 
             * You can provide either an integer (0 to 3), or the string version of the order.
             * @param renderOrder The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.
             * @returns This Tilemap Layer object.
             */
            setRenderOrder(renderOrder: number | string): this;

            /**
             * Returns the tiles in the given layer that are within the camera's viewport.
             * This is used internally during rendering.
             * @param camera The Camera to run the cull check against.
             * @returns An array of Tile objects to render.
             */
            cull(camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[];

            /**
             * You can control if the Cameras should cull tiles before rendering them or not.
             * 
             * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.
             * 
             * However, there are some instances when you may wish to disable this.
             * @param value Set to `true` to stop culling tiles. Set to `false` to enable culling again. Default true.
             * @returns This Tilemap Layer object.
             */
            setSkipCull(value?: boolean): this;

            /**
             * When a Camera culls the tiles in this layer it does so using its view into the world, building up a
             * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size
             * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so
             * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px
             * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale)
             * @param paddingX The amount of extra horizontal tiles to add to the cull check padding. Default 1.
             * @param paddingY The amount of extra vertical tiles to add to the cull check padding. Default 1.
             * @returns This Tilemap Layer object.
             */
            setCullPadding(paddingX?: number, paddingY?: number): this;

            /**
             * Sets an additive tint on each Tile within the given area.
             * 
             * The tint works by taking the pixel color values from the tileset texture, and then
             * multiplying it by the color value of the tint.
             * 
             * If no area values are given then all tiles will be tinted to the given color.
             * 
             * To remove a tint call this method with either no parameters, or by passing white `0xffffff` as the tint color.
             * 
             * If a tile already has a tint set then calling this method will override that.
             * @param tint The tint color being applied to each tile within the region. Given as a hex value, i.e. `0xff0000` for red. Set to white (`0xffffff`) to reset the tint. Default 0xffffff.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @returns This Tilemap Layer object.
             */
            setTint(tint?: number, tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): this;

            /**
             * Sets the tint mode to use when applying the tint to the texture.
             * 
             * Available modes are:
             * 
             * - Phaser.TintModes.MULTIPLY (default)
             * - Phaser.TintModes.FILL
             * - Phaser.TintModes.ADD
             * - Phaser.TintModes.SCREEN
             * - Phaser.TintModes.OVERLAY
             * - Phaser.TintModes.HARD_LIGHT
             * 
             * Call this method with no parameters to reset the tint mode to the default.
             * 
             * If a tile already has a tint mode set then calling this method will override that.
             * @param tintMode The tint mode to use. Default Phaser.TintModes.MULTIPLY.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @returns This Tilemap Layer object.
             */
            setTintMode(tintMode?: Phaser.TintModes, tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): this;

            /**
             * Destroys this TilemapLayer, clearing the culled tiles array and removing the cull callback.
             * Also removes the layer from its parent Tilemap if `removeFromTilemap` is set to `true`.
             * @param removeFromTilemap Remove this layer from the parent Tilemap before destroying it. Default true.
             */
            destroy(removeFromTilemap?: boolean): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The time elapsed since timer initialization, in milliseconds.
             */
            timeElapsed: number;

            /**
             * The time after which `timeElapsed` will reset, in milliseconds.
             * By default, this is 1 hour.
             * If you use the timer for animations, you can set this to a period
             * that matches the animation durations.
             * 
             * This is necessary for the timer to avoid floating-point precision issues
             * in shaders.
             * A float32 can represent a few hours of milliseconds accurately,
             * but the precision decreases as the value increases.
             */
            timeElapsedResetPeriod: number;

            /**
             * Whether the elapse timer is paused.
             */
            timePaused: boolean;

            /**
             * Set the reset period for the elapse timer for this game object.
             * @param period The time after which `timeElapsed` will reset, in milliseconds.
             * @returns This game object.
             */
            setTimerResetPeriod(period: number): this;

            /**
             * Pauses or resumes the elapse timer for this game object.
             * @param paused Pause state (`true` to pause, `false` to unpause). If not specified, the timer will unpause.
             * @returns This game object.
             */
            setTimerPaused(paused?: boolean): this;

            /**
             * Reset the elapse timer for this game object.
             * @param ms The time to reset the timer to, in milliseconds. Default 0.
             * @returns This game object.
             */
            resetTimer(ms?: number): this;

            /**
             * Update the elapse timer for this game object.
             * This should be called automatically by the preUpdate method.
             * 
             * Override this method to create more advanced time management,
             * or set it to a NOOP function to disable the timer update.
             * If you want to control animations with a tween or input system,
             * disabling the timer update could be useful.
             * @param time The current time in milliseconds.
             * @param delta The time since the last update, in milliseconds.
             * @returns This game object.
             */
            updateTimer(time: number, delta: number): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

            /**
             * Sets the Collision Category that this Arcade Physics Body
             * will use in order to determine what it can collide with.
             * 
             * It can only have one single category assigned to it.
             * 
             * If you wish to reset the collision category and mask, call
             * the `resetCollisionCategory` method.
             * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
             * @returns This Game Object.
             */
            setCollisionCategory(category: number): this;

            /**
             * Checks to see if the given Collision Category will collide with
             * this Arcade Physics object or not.
             * @param category Collision category value to test.
             * @returns `true` if the given category will collide with this object, otherwise `false`.
             */
            willCollideWith(category: number): boolean;

            /**
             * Adds the given Collision Category to the list of those that this
             * Arcade Physics Body will collide with.
             * @param category The collision category to add to this body's collision mask.
             * @returns This Game Object.
             */
            addCollidesWith(category: number): this;

            /**
             * Removes the given Collision Category from the list of those that this
             * Arcade Physics Body will collide with.
             * @param category The collision category to remove from this body's collision mask.
             * @returns This Game Object.
             */
            removeCollidesWith(category: number): this;

            /**
             * Sets all of the Collision Categories that this Arcade Physics Body
             * will collide with. You can either pass a single category value, or
             * an array of them.
             * 
             * Calling this method will reset all of the collision categories,
             * so only those passed to this method are enabled.
             * 
             * If you wish to add a new category to the existing mask, call
             * the `addCollidesWith` method.
             * 
             * If you wish to reset the collision category and mask, call
             * the `resetCollisionCategory` method.
             * @param categories The collision category to collide with, or an array of them.
             * @returns This Game Object.
             */
            setCollidesWith(categories: number | number[]): this;

            /**
             * Resets the Collision Category and Mask back to the defaults,
             * which means the body will belong to category 1 and will collide with all other categories.undefined
             * @returns This Game Object.
             */
            resetCollisionCategory(): this;

        }

        /**
         * A TilemapLayer is a Game Object that renders LayerData from a Tilemap
         * when used in combination with one, or more, Tilesets.
         * This is a generic base class that is extended by the TilemapLayer classes.
         * It is not used directly and should not be instantiated.
         */
        class TilemapLayerBase extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.ElapseTimer, Phaser.GameObjects.Components.Flip, Phaser.GameObjects.Components.GetBounds, Phaser.GameObjects.Components.Lighting, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Origin, Phaser.GameObjects.Components.RenderNodes, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible, Phaser.Physics.Arcade.Components.Collision {
            /**
             * 
             * @param scene The Scene to which this Game Object belongs.
             * @param tilemap The Tilemap this layer is a part of.
             * @param layerIndex The index of the LayerData associated with this layer.
             * @param x The world x position where the top left of this layer will be placed. Default 0.
             * @param y The world y position where the top left of this layer will be placed. Default 0.
             */
            constructor(scene: Phaser.Scene, tilemap: Phaser.Tilemaps.Tilemap, layerIndex: number, x?: number, y?: number);

            /**
             * Used internally by physics system to perform fast type checks.
             */
            readonly isTilemap: boolean;

            /**
             * The Tilemap that this layer is a part of.
             */
            tilemap: Phaser.Tilemaps.Tilemap;

            /**
             * The index of the LayerData associated with this layer.
             */
            layerIndex: number;

            /**
             * The LayerData associated with this layer. LayerData can only be associated with one
             * tilemap layer.
             */
            layer: Phaser.Tilemaps.LayerData;

            /**
             * An array holding the mapping between the tile indexes and the tileset they belong to.
             */
            gidMap: Phaser.Tilemaps.Tileset[];

            /**
             * The Tilemap Layer Collision Category.
             * 
             * This is exclusively used by the Arcade Physics system.
             * 
             * This can be set to any valid collision bitfield value.
             * 
             * See the `setCollisionCategory` method for more details.
             */
            collisionCategory: number;

            /**
             * The Tilemap Layer Collision Mask.
             * 
             * This is exclusively used by the Arcade Physics system.
             * 
             * See the `setCollidesWith` method for more details.
             */
            collisionMask: number;

            /**
             * The horizontal origin of this Tilemap Layer.
             */
            readonly originX: number;

            /**
             * The vertical origin of this Tilemap Layer.
             */
            readonly originY: number;

            /**
             * The horizontal display origin of this Tilemap Layer.
             */
            readonly displayOriginX: number;

            /**
             * The vertical display origin of this Tilemap Layer.
             */
            readonly displayOriginY: number;

            /**
             * This method is called automatically by the Scene when this Game Object is added to it.
             * It registers the layer with the Scene's update list so that `preUpdate` is called each game step.
             */
            addedToScene(): void;

            /**
             * This method is called automatically by the Scene when this Game Object is removed from it.
             * It unregisters the layer from the Scene's update list.
             */
            removedFromScene(): void;

            /**
             * The internal update step for this Tilemap Layer. Called automatically by the Scene's update list.
             * Advances the layer's elapsed timer, which is used by time-based tile animations.
             * @param time The current timestamp.
             * @param delta The delta time, in milliseconds, elapsed since the last frame.
             */
            preUpdate(time: number, delta: number): void;

            /**
             * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting
             * faces are used internally for optimizing collisions against tiles. This method is mostly used
             * internally to optimize recalculating faces when only one tile has been changed.
             * @param tileX The x coordinate.
             * @param tileY The y coordinate.
             * @returns This Tilemap Layer object.
             */
            calculateFacesAt(tileX: number, tileY: number): this;

            /**
             * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the
             * layer. Interesting faces are used internally for optimizing collisions against tiles. This method
             * is mostly used internally.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @returns This Tilemap Layer object.
             */
            calculateFacesWithin(tileX?: number, tileY?: number, width?: number, height?: number): this;

            /**
             * Creates a Sprite for every object matching the given tile indexes in the layer. You can
             * optionally specify if each tile will be replaced with a new tile after the Sprite has been
             * created. This is useful if you want to lay down special tiles in a level that are converted to
             * Sprites, but want to replace the tile itself with a floor tile or similar once converted.
             * @param indexes The tile index, or array of indexes, to create Sprites from.
             * @param replacements The tile index, or array of indexes, to change a converted
             * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a
             * one-to-one mapping with the indexes array.
             * @param spriteConfig The config object to pass into the Sprite creator (i.e.
             * scene.make.sprite).
             * @param scene The Scene to create the Sprites within.
             * @param camera The Camera to use when determining the world XY
             * @returns An array of the Sprites that were created.
             */
            createFromTiles(indexes: number | any[], replacements: number | any[] | undefined, spriteConfig?: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Sprite[];

            /**
             * Copies the tiles in the source rectangular area to a new destination (all specified in tile
             * coordinates) within the layer. This copies all tile properties & recalculates collision
             * information in the destination region.
             * @param srcTileX The x coordinate of the area to copy from, in tiles, not pixels.
             * @param srcTileY The y coordinate of the area to copy from, in tiles, not pixels.
             * @param width The width of the area to copy, in tiles, not pixels.
             * @param height The height of the area to copy, in tiles, not pixels.
             * @param destTileX The x coordinate of the area to copy to, in tiles, not pixels.
             * @param destTileY The y coordinate of the area to copy to, in tiles, not pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated. Default true.
             * @returns This Tilemap Layer object.
             */
            copy(srcTileX: number, srcTileY: number, width: number, height: number, destTileX: number, destTileY: number, recalculateFaces?: boolean): this;

            /**
             * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the
             * specified index. Tiles will be set to collide if the given index is a colliding index.
             * Collision information in the region will be recalculated.
             * @param index The tile index to fill the area with.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param recalculateFaces `true` if the faces data should be recalculated. Default true.
             * @returns This Tilemap Layer object.
             */
            fill(index: number, tileX?: number, tileY?: number, width?: number, height?: number, recalculateFaces?: boolean): this;

            /**
             * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
             * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns
             * true) will be returned as a new array. Similar to Array.prototype.Filter in vanilla JS.
             * @param callback The callback. Each tile in the given area will be passed to this
             * callback as the first and only parameter. The callback should return true for tiles that pass the
             * filter.
             * @param context The context under which the callback should be run.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @returns An array of Tile objects.
             */
            filterTiles(callback: Function, context?: object, tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[];

            /**
             * Searches the entire map layer for the first tile matching the given index, then returns that Tile
             * object. If no match is found, it returns null. The search starts from the top-left tile and
             * continues horizontally until it hits the end of the row, then it drops down to the next row.
             * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to
             * the top-left.
             * @param index The tile index value to search for.
             * @param skip The number of times to skip a matching tile before returning. Default 0.
             * @param reverse If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left. Default false.
             * @returns The first matching Tile object.
             */
            findByIndex(index: number, skip?: number, reverse?: boolean): Phaser.Tilemaps.Tile;

            /**
             * Find the first tile in the given rectangular area (in tile coordinates) of the layer that
             * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns
             * true. Similar to Array.prototype.find in vanilla JS.
             * @param callback The callback. Each tile in the given area will be passed to this callback as the first and only parameter.
             * @param context The context under which the callback should be run.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @returns The first Tile found at the given location.
             */
            findTile(callback: FindTileCallback, context?: object, tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile | null;

            /**
             * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
             * callback. Similar to Array.prototype.forEach in vanilla JS.
             * @param callback The callback. Each tile in the given area will be passed to this callback as the first and only parameter.
             * @param context The context, or scope, under which the callback should be run.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to search.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @returns This Tilemap Layer object.
             */
            forEachTile(callback: EachTileCallback, context?: object, tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): this;

            /**
             * Gets a tile at the given tile coordinates from the given layer.
             * @param tileX X position to get the tile from (given in tile units, not pixels).
             * @param tileY Y position to get the tile from (given in tile units, not pixels).
             * @param nonNull For empty tiles, return a Tile object with an index of -1 instead of null. Default false.
             * @returns The Tile at the given coordinates or null if no tile was found or the coordinates were invalid.
             */
            getTileAt(tileX: number, tileY: number, nonNull?: boolean): Phaser.Tilemaps.Tile;

            /**
             * Gets a tile at the given world coordinates from the given layer.
             * @param worldX X position to get the tile from (given in pixels)
             * @param worldY Y position to get the tile from (given in pixels)
             * @param nonNull For empty tiles, return a Tile object with an index of -1 instead of null. Default false.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns The tile at the given coordinates or null if no tile was found or the coordinates were invalid.
             */
            getTileAtWorldXY(worldX: number, worldY: number, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile;

            /**
             * Gets a tile at the given world coordinates from the given isometric layer.
             * @param worldX X position to get the tile from (given in pixels)
             * @param worldY Y position to get the tile from (given in pixels)
             * @param originTop Which is the active face of the isometric tile? The top (default, true), or the base? (false) Default true.
             * @param nonNull For empty tiles, return a Tile object with an index of -1 instead of null. Default false.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns The tile at the given coordinates or null if no tile was found or the coordinates were invalid.
             */
            getIsoTileAtWorldXY(worldX: number, worldY: number, originTop?: boolean, nonNull?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile;

            /**
             * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @returns An array of Tile objects found within the area.
             */
            getTilesWithin(tileX?: number, tileY?: number, width?: number, height?: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions): Phaser.Tilemaps.Tile[];

            /**
             * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,
             * Line, Rectangle or Triangle. The shape should be in world coordinates.
             * @param shape A shape in world (pixel) coordinates
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param camera The Camera to use when factoring in which tiles to return.
             * @returns An array of Tile objects found within the shape.
             */
            getTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[];

            /**
             * Gets the tiles in the given rectangular area (in world coordinates) of the layer.
             * @param worldX The world x coordinate for the top-left of the area.
             * @param worldY The world y coordinate for the top-left of the area.
             * @param width The width of the area.
             * @param height The height of the area.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param camera The Camera to use when factoring in which tiles to return.
             * @returns An array of Tile objects found within the area.
             */
            getTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions?: Phaser.Types.Tilemaps.FilteringOptions, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile[];

            /**
             * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns
             * false if there is no tile or if the tile at that location has an index of -1.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @returns `true` if a tile was found at the given location, otherwise `false`.
             */
            hasTileAt(tileX: number, tileY: number): boolean;

            /**
             * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns
             * false if there is no tile or if the tile at that location has an index of -1.
             * @param worldX The x coordinate, in pixels.
             * @param worldY The y coordinate, in pixels.
             * @param camera The Camera to use when factoring in which tiles to return.
             * @returns `true` if a tile was found at the given location, otherwise `false`.
             */
            hasTileAtWorldXY(worldX: number, worldY: number, camera?: Phaser.Cameras.Scene2D.Camera): boolean;

            /**
             * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index
             * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified
             * location. If you pass in an index, only the index at the specified location will be changed.
             * Collision information will be recalculated at the specified location.
             * @param tile The index of this tile to set or a Tile object.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated. Default true.
             * @returns The Tile object that was inserted at the given coordinates.
             */
            putTileAt(tile: number | Phaser.Tilemaps.Tile, tileX: number, tileY: number, recalculateFaces?: boolean): Phaser.Tilemaps.Tile;

            /**
             * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either
             * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the
             * specified location. If you pass in an index, only the index at the specified location will be
             * changed. Collision information will be recalculated at the specified location.
             * @param tile The index of this tile to set or a Tile object.
             * @param worldX The x coordinate, in pixels.
             * @param worldY The y coordinate, in pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns The Tile object that was inserted at the given coordinates.
             */
            putTileAtWorldXY(tile: number | Phaser.Tilemaps.Tile, worldX: number, worldY: number, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile;

            /**
             * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified
             * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,
             * all attributes will be copied over to the specified location. If you pass in an index, only the
             * index at the specified location will be changed. Collision information will be recalculated
             * within the region tiles were changed.
             * @param tile A row (array) or grid (2D array) of Tiles or tile indexes to place.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated. Default true.
             * @returns This Tilemap Layer object.
             */
            putTilesAt(tile: number[] | number[][] | Phaser.Tilemaps.Tile[] | Phaser.Tilemaps.Tile[][], tileX: number, tileY: number, recalculateFaces?: boolean): this;

            /**
             * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
             * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then
             * those will be used for randomly assigning new tile indexes. If an array is not provided, the
             * indexes found within the region (excluding -1) will be used for randomly assigning new tile
             * indexes. This method only modifies tile indexes and does not change collision information.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param indexes An array of indexes to randomly draw from during randomization.
             * @returns This Tilemap Layer object.
             */
            randomize(tileX?: number, tileY?: number, width?: number, height?: number, indexes?: number[]): this;

            /**
             * Removes the tile at the given tile coordinates in the specified layer and updates the layers
             * collision information.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true.
             * @param recalculateFaces `true` if the faces data should be recalculated. Default true.
             * @returns The Tile object that was removed from the given location.
             */
            removeTileAt(tileX: number, tileY: number, replaceWithNull?: boolean, recalculateFaces?: boolean): Phaser.Tilemaps.Tile;

            /**
             * Removes the tile at the given world coordinates in the specified layer and updates the layers
             * collision information.
             * @param worldX The x coordinate, in pixels.
             * @param worldY The y coordinate, in pixels.
             * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1. Default true.
             * @param recalculateFaces `true` if the faces data should be recalculated. Default true.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns The Tile object that was removed from the given location.
             */
            removeTileAtWorldXY(worldX: number, worldY: number, replaceWithNull?: boolean, recalculateFaces?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Tilemaps.Tile;

            /**
             * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to
             * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles
             * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation
             * wherever you want on the screen.
             * @param graphics The target Graphics object to draw upon.
             * @param styleConfig An object specifying the colors to use for the debug drawing.
             * @returns This Tilemap Layer object.
             */
            renderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig?: Phaser.Types.Tilemaps.StyleConfig): this;

            /**
             * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
             * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does
             * not change collision information.
             * @param findIndex The index of the tile to search for.
             * @param newIndex The index of the tile to replace it with.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @returns This Tilemap Layer object.
             */
            replaceByIndex(findIndex: number, newIndex: number, tileX?: number, tileY?: number, width?: number, height?: number): this;

            /**
             * Sets collision on the given tile or tiles within a layer by index. You can pass in either a
             * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if
             * collision will be enabled (true) or disabled (false).
             * @param indexes Either a single tile index, or an array of tile indexes.
             * @param collides If true it will enable collision. If false it will clear collision. Default true.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true.
             * @param updateLayer If true, updates the current tiles on the layer. Set to false if no tiles have been placed for significant performance boost. Default true.
             * @returns This Tilemap Layer object.
             */
            setCollision(indexes: number | any[], collides?: boolean, recalculateFaces?: boolean, updateLayer?: boolean): this;

            /**
             * Sets collision on a range of tiles in a layer whose index is between the specified `start` and
             * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set
             * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be
             * enabled (true) or disabled (false).
             * @param start The first index of the tile to be set for collision.
             * @param stop The last index of the tile to be set for collision.
             * @param collides If true it will enable collision. If false it will clear collision. Default true.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true.
             * @returns This Tilemap Layer object.
             */
            setCollisionBetween(start: number, stop: number, collides?: boolean, recalculateFaces?: boolean): this;

            /**
             * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property
             * that matches the given properties object, its collision flag will be set. The `collides`
             * parameter controls if collision will be enabled (true) or disabled (false). Passing in
             * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that
             * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can
             * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a
             * "types" property that matches any of those values, its collision flag will be updated.
             * @param properties An object with tile properties and corresponding values that should be checked.
             * @param collides If true it will enable collision. If false it will clear collision. Default true.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true.
             * @returns This Tilemap Layer object.
             */
            setCollisionByProperty(properties: object, collides?: boolean, recalculateFaces?: boolean): this;

            /**
             * Sets collision on all tiles in the given layer, except for tiles that have an index specified in
             * the given array. The `collides` parameter controls if collision will be enabled (true) or
             * disabled (false). Tile indexes not currently in the layer are not affected.
             * @param indexes An array of the tile indexes to not be counted for collision.
             * @param collides If true it will enable collision. If false it will clear collision. Default true.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true.
             * @returns This Tilemap Layer object.
             */
            setCollisionByExclusion(indexes: number[], collides?: boolean, recalculateFaces?: boolean): this;

            /**
             * Sets collision on the tiles within a layer by checking each tiles collision group data
             * (typically defined in Tiled within the tileset collision editor). If any objects are found within
             * a tiles collision group, the tile's colliding information will be set. The `collides` parameter
             * controls if collision will be enabled (true) or disabled (false).
             * @param collides If true it will enable collision. If false it will clear collision. Default true.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update. Default true.
             * @returns This Tilemap Layer object.
             */
            setCollisionFromCollisionGroup(collides?: boolean, recalculateFaces?: boolean): this;

            /**
             * Sets a global collision callback for the given tile index within the layer. This will affect all
             * tiles on this layer that have the same index. If a callback is already set for the tile index it
             * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile
             * at a specific location on the map then see setTileLocationCallback.
             * @param indexes Either a single tile index, or an array of tile indexes to have a collision callback set for.
             * @param callback The callback that will be invoked when the tile is collided with.
             * @param callbackContext The context under which the callback is called.
             * @returns This Tilemap Layer object.
             */
            setTileIndexCallback(indexes: number | number[], callback: Function, callbackContext: object): this;

            /**
             * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.
             * If a callback is already set for the tile index it will be replaced. Set the callback to null to
             * remove it.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param callback The callback that will be invoked when the tile is collided with.
             * @param callbackContext The context, or scope, under which the callback is invoked.
             * @returns This Tilemap Layer object.
             */
            setTileLocationCallback(tileX?: number, tileY?: number, width?: number, height?: number, callback?: Function, callbackContext?: object): this;

            /**
             * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given
             * layer. It will only randomize the tiles in that area, so if they're all the same nothing will
             * appear to have changed! This method only modifies tile indexes and does not change collision
             * information.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @returns This Tilemap Layer object.
             */
            shuffle(tileX?: number, tileY?: number, width?: number, height?: number): this;

            /**
             * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
             * `indexA` and swaps them with `indexB`. This only modifies the index and does not change collision
             * information.
             * @param tileA First tile index.
             * @param tileB Second tile index.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @returns This Tilemap Layer object.
             */
            swapByIndex(tileA: number, tileB: number, tileX?: number, tileY?: number, width?: number, height?: number): this;

            /**
             * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the
             * layers position, scale and scroll.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns The Tile X coordinate converted to pixels.
             */
            tileToWorldX(tileX: number, camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the
             * layers position, scale and scroll.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns The Tile Y coordinate converted to pixels.
             */
            tileToWorldY(tileY: number, camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
             * layers position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns A Vector2 containing the world coordinates of the Tile.
             */
            tileToWorldXY(tileX: number, tileY: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Returns an array of Vector2s where each entry corresponds to the corner of the requested tile.
             * 
             * The `tileX` and `tileY` parameters are in tile coordinates, not world coordinates.
             * 
             * The corner coordinates are in world space, having factored in TilemapLayer scale, position
             * and the camera, if given.
             * 
             * The size of the array will vary based on the orientation of the map. For example an
             * orthographic map will return an array of 4 vectors, where-as a hexagonal map will,
             * of course, return an array of 6 corner vectors.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns Returns an array of Vector2s, or null if the layer given was invalid.
             */
            getTileCorners(tileX: number, tileY: number, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2[] | null;

            /**
             * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
             * specified layer. Each tile will receive a new index. New indexes are drawn from the given
             * weightedIndexes array. An example weighted array:
             * 
             * [
             *  { index: 6, weight: 4 },    // Probability of index 6 is 4 / 8
             *  { index: 7, weight: 2 },    // Probability of index 7 would be 2 / 8
             *  { index: 8, weight: 1.5 },  // Probability of index 8 would be 1.5 / 8
             *  { index: 26, weight: 0.5 }  // Probability of index 26 would be 0.5 / 8
             * ]
             * 
             * The probability of any index being chosen is (the index's weight) / (sum of all weights). This
             * method only modifies tile indexes and does not change collision information.
             * @param weightedIndexes An array of objects to randomly draw from during randomization. They should be in the form: { index: 0, weight: 4 } or { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @returns This Tilemap Layer object.
             */
            weightedRandomize(weightedIndexes: object[], tileX?: number, tileY?: number, width?: number, height?: number): this;

            /**
             * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the
             * layers position, scale and scroll.
             * 
             * You cannot call this method for Isometric or Hexagonal tilemaps as they require
             * both `worldX` and `worldY` values to determine the correct tile, instead you
             * should use the `worldToTileXY` method.
             * @param worldX The x coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns The tile X coordinate based on the world value.
             */
            worldToTileX(worldX: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the
             * layers position, scale and scroll.
             * 
             * You cannot call this method for Isometric or Hexagonal tilemaps as they require
             * both `worldX` and `worldY` values to determine the correct tile, instead you
             * should use the `worldToTileXY` method.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns The tile Y coordinate based on the world value.
             */
            worldToTileY(worldY: number, snapToFloor?: boolean, camera?: Phaser.Cameras.Scene2D.Camera): number;

            /**
             * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the
             * layers position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param worldX The x coordinate to be converted, in pixels, not tiles.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @returns A Vector2 containing the tile coordinates of the world values.
             */
            worldToTileXY(worldX: number, worldY: number, snapToFloor?: boolean, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Destroys this TilemapLayer and removes its link to the associated LayerData.
             * @param removeFromTilemap Remove this layer from the parent Tilemap? Default true.
             */
            destroy(removeFromTilemap?: boolean): void;

            /**
             * The Camera used for filters.
             * You can use this to alter the perspective of filters.
             * It is not necessary to use this camera for ordinary rendering.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            filterCamera: Phaser.Cameras.Scene2D.Camera;

            /**
             * The filter lists for this Game Object.
             * This is an object with `internal` and `external` properties.
             * Each list is a {@link Phaser.GameObjects.Components.FilterList} object.
             * 
             * This is only available if you use the `enableFilters` method.
             */
            readonly filters: Phaser.Types.GameObjects.FiltersInternalExternal | null;

            /**
             * Whether any filters should be rendered on this Game Object.
             * This is `true` by default, even if there are no filters yet.
             * Disable this to skip filter rendering.
             * 
             * Use `willRenderFilters()` to see if there are any active filters.
             */
            renderFilters: boolean;

            /**
             * The maximum size of the base filter texture.
             * Filters may use a larger texture after the base texture is rendered.
             * The maximum texture size is at least 4096 in WebGL, based on the hardware.
             * You may set this lower to save memory or prevent resizing.
             */
            maxFilterSize: Phaser.Math.Vector2;

            /**
             * Whether `filterCamera` should update every frame
             * to focus on the Game Object.
             * Disable this if you want to manually control the camera.
             */
            filtersAutoFocus: boolean;

            /**
             * Whether the filters should focus on the context,
             * rather than attempt to focus on the Game Object.
             * This is enabled automatically when enabling filters on objects
             * which don't have well-defined bounds.
             * 
             * This effectively sets the internal filters to render the same way
             * as the external filters.
             * 
             * This is only used if `filtersAutoFocus` is enabled.
             * 
             * The "context" is the framebuffer to which the Game Object is rendered.
             * This is usually the main framebuffer, but might be another framebuffer.
             * It can even be several different framebuffers if the Game Object is
             * rendered multiple times.
             */
            filtersFocusContext: boolean;

            /**
             * Whether the Filters component should always draw to a framebuffer,
             * even if there are no active filters.
             */
            filtersForceComposite: boolean;

            /**
             * Whether this Game Object will render filters.
             * This is true if it has active filters,
             * and if the `renderFilters` property is also true.undefined
             * @returns Whether the Game Object will render filters.
             */
            willRenderFilters(): boolean;

            /**
             * Enable this Game Object to have filters.
             * 
             * You need to call this method if you want to use the `filterCamera`
             * and `filters` properties. It sets up the necessary data structures.
             * You may disable filter rendering with the `renderFilters` property.
             * 
             * This is a WebGL only feature. It will return early if not available.undefined
             * @returns undefined
             */
            enableFilters(): this;

            /**
             * Render this object using filters.
             * 
             * This function's scope is not guaranteed, so it doesn't refer to `this`.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep The index of this function in the Game Object's list of render processes. Used to support multiple rendering functions. Default 0.
             * @returns undefined
             */
            renderWebGLFilters(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number): Phaser.Types.GameObjects.RenderWebGLStep;

            /**
             * Focus the filter camera.
             * This sets the size and position of the filter camera to match the GameObject.
             * This is called automatically on render if `filtersAutoFocus` is enabled.
             * 
             * This will focus on the GameObject's raw dimensions if available.
             * If the GameObject has no dimensions, this will focus on the context:
             * the camera belonging to the DrawingContext used to render the GameObject.
             * Context focus occurs during rendering,
             * as the context is not known until then.undefined
             * @returns undefined
             */
            focusFilters(): this;

            /**
             * Focus the filter camera on a specific camera.
             * This is used internally when `filtersFocusContext` is enabled.
             * @param camera The camera to focus on.
             * @returns undefined
             */
            focusFiltersOnCamera(camera: Phaser.Cameras.Scene2D.Camera): this;

            /**
             * Manually override the focus of the filter camera.
             * This allows you to set the size and position of the filter camera manually.
             * It deactivates `filtersAutoFocus` when called.
             * 
             * The camera will set scroll to place the game object at the
             * given position within a rectangle of the given width and height.
             * For example, calling `focusFiltersOverride(400, 200, 800, 600)`
             * will focus the camera to place the object's center
             * 100 pixels above the center of the camera (which is at 400x300).
             * @param x The x-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param y The y-coordinate of the focus point, relative to the filter size. Default is the center.
             * @param width The width of the focus area. Default is the filter width.
             * @param height The height of the focus area. Default is the filter height.
             * @returns undefined
             */
            focusFiltersOverride(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Set the base size of the filter camera.
             * This is the size of the texture that internal filters will be drawn to.
             * External filters are drawn to the size of the context (usually the game canvas).
             * 
             * This is typically the size of the GameObject.
             * It is set automatically when the Game Object is rendered
             * and `filtersAutoFocus` is enabled.
             * Turn off auto focus to set it manually.
             * 
             * Technically, larger framebuffers may be used to provide padding.
             * This is the size of the final framebuffer used for "internal" rendering.
             * @param width Base width of the filter texture.
             * @param height Base height of the filter texture.
             * @returns undefined
             */
            setFilterSize(width: number, height: number): this;

            /**
             * Sets whether the filter camera should automatically re-focus on the Game Object every frame.
             * Sets the `filtersAutoFocus` property.
             * @param value Whether filters should be updated every frame.
             * @returns undefined
             */
            setFiltersAutoFocus(value: boolean): this;

            /**
             * Set whether the filters should focus on the context.
             * Sets the `filtersFocusContext` property.
             * @param value Whether the filters should focus on the context.
             * @returns undefined
             */
            setFiltersFocusContext(value: boolean): this;

            /**
             * Set whether the filters should always draw to a framebuffer.
             * Sets the `filtersForceComposite` property.
             * @param value Whether the object should always draw to a framebuffer, even if there are no active filters.
             * @returns undefined
             */
            setFiltersForceComposite(value: boolean): this;

            /**
             * Set whether the filters should be rendered.
             * Sets the `renderFilters` property.
             * @param value Whether the filters should be rendered.
             * @returns undefined
             */
            setRenderFilters(value: boolean): this;

            /**
             * Run a step in the render process.
             * This is called automatically by the Render module.
             * 
             * In most cases, it just runs the `renderWebGL` function.
             * 
             * When `_renderSteps` has more than one entry,
             * such as when Filters are enabled for this object,
             * it allows those processes to defer `renderWebGL`
             * and otherwise manage the flow of rendering.
             * @param renderer The WebGL Renderer instance to render with.
             * @param gameObject The Game Object being rendered.
             * @param drawingContext The current drawing context.
             * @param parentMatrix The parent matrix of the Game Object, if it has one.
             * @param renderStep Which step of the rendering process should be run? Default 0.
             * @param displayList The display list which is currently being rendered. If not provided, it will be created with the Game Object.
             * @param displayListIndex The index of the Game Object within the display list. Default 0.
             */
            renderWebGLStep(renderer: Phaser.Renderer.WebGL.WebGLRenderer, gameObject: Phaser.GameObjects.GameObject, drawingContext: Phaser.Renderer.WebGL.DrawingContext, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix, renderStep?: number, displayList?: Phaser.GameObjects.GameObject[], displayListIndex?: number): void;

            /**
             * Adds a render step function to this Game Object's WebGL render pipeline.
             * 
             * The first render step in `_renderSteps` is run first.
             * It should call the next render step in the list.
             * This allows render steps to control the rendering flow.
             * @param fn The render step function to add.
             * @param index The index in the render list to add the step to. Omit to add to the end.
             * @returns This Game Object instance.
             */
            addRenderStep(fn: Phaser.Types.GameObjects.RenderWebGLStep, index?: number): this;

            /**
             * Clears all alpha values associated with this Game Object.
             * 
             * Immediately sets the alpha levels back to 1 (fully opaque).undefined
             * @returns This Game Object instance.
             */
            clearAlpha(): this;

            /**
             * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.
             * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.
             * 
             * If your game is running under WebGL you can optionally specify four different alpha values, each of which
             * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.
             * @param topLeft The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
             * @param topRight The alpha value used for the top-right of the Game Object. WebGL only.
             * @param bottomLeft The alpha value used for the bottom-left of the Game Object. WebGL only.
             * @param bottomRight The alpha value used for the bottom-right of the Game Object. WebGL only.
             * @returns This Game Object instance.
             */
            setAlpha(topLeft?: number, topRight?: number, bottomLeft?: number, bottomRight?: number): this;

            /**
             * The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
             * 
             * This is a global value that impacts the entire Game Object. Setting it also updates
             * all four corner alpha values (`alphaTopLeft`, `alphaTopRight`, `alphaBottomLeft`,
             * `alphaBottomRight`) to the same value. The input is clamped to the range [0, 1].
             */
            alpha: number;

            /**
             * The alpha value starting from the top-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopLeft: number;

            /**
             * The alpha value starting from the top-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaTopRight: number;

            /**
             * The alpha value starting from the bottom-left of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomLeft: number;

            /**
             * The alpha value starting from the bottom-right of the Game Object.
             * This value is interpolated from the corner to the center of the Game Object.
             */
            alphaBottomRight: number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             */
            blendMode: Phaser.BlendModes | string | number;

            /**
             * Sets the Blend Mode being used by this Game Object.
             * 
             * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
             * 
             * Under WebGL only the following Blend Modes are available:
             * 
             * * NORMAL
             * * ADD
             * * MULTIPLY
             * * SCREEN
             * * ERASE (only works when rendering to a framebuffer, like a Render Texture)
             * 
             * Canvas has more available depending on browser support.
             * 
             * You can also create your own custom Blend Modes in WebGL.
             * 
             * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending
             * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
             * reasons try to be careful about the construction of your Scene and the frequency with which blend modes
             * are used.
             * @param value The BlendMode value. Either a string, a CONST or a number.
             * @returns This Game Object instance.
             */
            setBlendMode(value: string | Phaser.BlendModes | number): this;

            /**
             * The native (un-scaled) width of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayWidth` property.
             */
            width: number;

            /**
             * The native (un-scaled) height of this Game Object.
             * 
             * Changing this value will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or use
             * the `displayHeight` property.
             */
            height: number;

            /**
             * The displayed width of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayWidth: number;

            /**
             * The displayed height of this Game Object.
             * 
             * This value takes into account the scale factor.
             * 
             * Setting this value will adjust the Game Object's scale property.
             */
            displayHeight: number;

            /**
             * Sets the internal size of this Game Object, as used for frame or physics body creation.
             * 
             * This will not change the size that the Game Object is rendered in-game.
             * For that you need to either set the scale of the Game Object (`setScale`) or call the
             * `setDisplaySize` method, which is the same thing as changing the scale but allows you
             * to do so by giving pixel values.
             * 
             * If you have enabled this Game Object for input, changing the size will _not_ change the
             * size of the hit area. To do this you should adjust the `input.hitArea` object directly.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setSize(width: number, height: number): this;

            /**
             * Sets the display size of this Game Object.
             * 
             * Calling this will adjust the `scaleX` and `scaleY` properties so that the Game Object
             * is rendered at the specified pixel dimensions. It is the equivalent of setting the scale
             * manually, but expressed in pixels rather than as a multiplier.
             * @param width The width of this Game Object.
             * @param height The height of this Game Object.
             * @returns This Game Object instance.
             */
            setDisplaySize(width: number, height: number): this;

            /**
             * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * The default depth is zero. A Game Object with a higher depth
             * value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             */
            depth: number;

            /**
             * Sets the depth of this Game Object. If the `value` argument is not provided, the depth defaults to `0`.
             * 
             * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order
             * of Game Objects, without actually moving their position in the display list.
             * 
             * A Game Object with a higher depth value will always render in front of one with a lower value.
             * 
             * Setting the depth will queue a depth sort event within the Scene.
             * @param value The depth of this Game Object. Ensure this value is only ever a number data-type.
             * @returns This Game Object instance.
             */
            setDepth(value: number): this;

            /**
             * Sets this Game Object to be at the top of the display list, or the top of its parent container.
             * 
             * Being at the top means it will render on top of everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToTop(): this;

            /**
             * Sets this Game Object to the back of the display list, or the back of its parent container.
             * 
             * Being at the back means it will render below everything else.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.undefined
             * @returns This Game Object instance.
             */
            setToBack(): this;

            /**
             * Move this Game Object so that it appears above the given Game Object.
             * 
             * This means it will render immediately after the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be above.
             * @returns This Game Object instance.
             */
            setAbove(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * Move this Game Object so that it appears below the given Game Object.
             * 
             * This means it will render immediately under the other object in the display list.
             * 
             * Both objects must belong to the same display list, or parent container.
             * 
             * This method does not change this Game Objects `depth` value, it simply alters its list position.
             * @param gameObject The Game Object that this Game Object will be moved to be below.
             * @returns This Game Object instance.
             */
            setBelow(gameObject: Phaser.GameObjects.GameObject): this;

            /**
             * The time elapsed since timer initialization, in milliseconds.
             */
            timeElapsed: number;

            /**
             * The time after which `timeElapsed` will reset, in milliseconds.
             * By default, this is 1 hour.
             * If you use the timer for animations, you can set this to a period
             * that matches the animation durations.
             * 
             * This is necessary for the timer to avoid floating-point precision issues
             * in shaders.
             * A float32 can represent a few hours of milliseconds accurately,
             * but the precision decreases as the value increases.
             */
            timeElapsedResetPeriod: number;

            /**
             * Whether the elapse timer is paused.
             */
            timePaused: boolean;

            /**
             * Set the reset period for the elapse timer for this game object.
             * @param period The time after which `timeElapsed` will reset, in milliseconds.
             * @returns This game object.
             */
            setTimerResetPeriod(period: number): this;

            /**
             * Pauses or resumes the elapse timer for this game object.
             * @param paused Pause state (`true` to pause, `false` to unpause). If not specified, the timer will unpause.
             * @returns This game object.
             */
            setTimerPaused(paused?: boolean): this;

            /**
             * Reset the elapse timer for this game object.
             * @param ms The time to reset the timer to, in milliseconds. Default 0.
             * @returns This game object.
             */
            resetTimer(ms?: number): this;

            /**
             * Update the elapse timer for this game object.
             * This should be called automatically by the preUpdate method.
             * 
             * Override this method to create more advanced time management,
             * or set it to a NOOP function to disable the timer update.
             * If you want to control animations with a tween or input system,
             * disabling the timer update could be useful.
             * @param time The current time in milliseconds.
             * @param delta The time since the last update, in milliseconds.
             * @returns This game object.
             */
            updateTimer(time: number, delta: number): this;

            /**
             * The horizontally flipped state of the Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipX: boolean;

            /**
             * The vertically flipped state of the Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis (i.e. upside down).
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             */
            flipY: boolean;

            /**
             * Toggles the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipX(): this;

            /**
             * Toggles the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.undefined
             * @returns This Game Object instance.
             */
            toggleFlipY(): this;

            /**
             * Sets the horizontal flipped state of this Game Object.
             * 
             * A Game Object that is flipped horizontally will render inverted on the horizontal axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipX(value: boolean): this;

            /**
             * Sets the vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped vertically will render inverted on the vertical axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param value The flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlipY(value: boolean): this;

            /**
             * Sets the horizontal and vertical flipped state of this Game Object.
             * 
             * A Game Object that is flipped will render inverted on the flipped axis.
             * Flipping always takes place from the middle of the texture and does not impact the scale value.
             * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.
             * @param x The horizontal flipped state. `false` for no flip, or `true` to be flipped.
             * @param y The vertical flipped state. `false` for no flip, or `true` to be flipped.
             * @returns This Game Object instance.
             */
            setFlip(x: boolean, y: boolean): this;

            /**
             * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.undefined
             * @returns This Game Object instance.
             */
            resetFlip(): this;

            /**
             * Gets the center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the top-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getTopRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the left-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getLeftCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the right-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getRightCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomLeft<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-center coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomCenter<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
             * 
             * The returned point is calculated in local space and does not factor in any parent Containers,
             * unless the `includeParent` argument is set to `true`.
             * @param output An object to store the values in. If not provided a new Vector2 will be created.
             * @param includeParent If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? Default false.
             * @returns The values stored in the output object.
             */
            getBottomRight<O extends Phaser.Types.Math.Vector2Like>(output?: O, includeParent?: boolean): O;

            /**
             * Gets the axis-aligned bounding rectangle of this Game Object, regardless of origin.
             * 
             * The bounding rectangle is computed by retrieving all four corner positions of the
             * Game Object (top-left, top-right, bottom-left, bottom-right), applying any rotation
             * and parent Container transforms, and then calculating the smallest axis-aligned
             * rectangle that fully encloses all four points.
             * 
             * The values are stored and returned in a Rectangle, or Rectangle-like, object.
             * @param output An object to store the values in. If not provided a new Rectangle will be created.
             * @returns The values stored in the output object.
             */
            getBounds<O extends Phaser.Geom.Rectangle>(output?: O): O;

            /**
             * Controls whether this Game Object participates in the WebGL lighting system.
             * When `true`, the object will respond to dynamic lights added via the Lights plugin,
             * using normal maps to calculate per-pixel diffuse lighting.
             * 
             * This flag is used to select the appropriate WebGL shader at render time.
             */
            readonly lighting: boolean;

            /**
             * Configuration object controlling self-shadowing for this Game Object.
             * Self-shadowing causes surfaces to cast contact shadows on themselves based on
             * the normal map, giving the appearance of depth. It is only active when
             * `lighting` is also enabled.
             * 
             * If `enabled` is `null`, the value from the game config option `render.selfShadow`
             * is used instead.
             * 
             * This object is used to select and configure the appropriate WebGL shader at render time.
             */
            selfShadow: Object;

            /**
             * Enables or disables WebGL-based per-pixel lighting for this Game Object.
             * When enabled, the object will respond to dynamic lights added to the scene
             * via the Lights plugin, using a normal map for lighting calculations.
             * Disabling lighting restores the standard unlit rendering path.
             * @param enable `true` to use lighting, or `false` to disable it.
             * @returns This GameObject instance.
             */
            setLighting(enable: boolean): this;

            /**
             * Configures the self-shadowing properties of this Game Object.
             * Self-shadowing uses the normal map to cast contact shadows on the surface itself,
             * giving the impression of depth and raised detail. It is only active when
             * `lighting` is also enabled on this Game Object.
             * 
             * Parameters that are `undefined` are left unchanged, allowing partial updates.
             * @param enabled `true` to use self-shadowing, `false` to disable it, `null` to use the game default from `config.render.selfShadow`, or `undefined` to keep the setting.
             * @param penumbra The penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
             * @param diffuseFlatThreshold The texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
             * @returns This GameObject instance.
             */
            setSelfShadow(enabled?: boolean | undefined, penumbra?: number, diffuseFlatThreshold?: number): this;

            /**
             * The Mask this Game Object is using during render, or `null` if no mask has been set.
             */
            mask: Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the mask that this Game Object will use to render with.
             * 
             * The mask must have been previously created and must be a GeometryMask.
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * 
             * If a mask is already set on this Game Object it will be immediately replaced.
             * 
             * Masks are positioned in global space and are not relative to the Game Object to which they
             * are applied. The reason for this is that multiple Game Objects can all share the same mask.
             * 
             * Masks have no impact on physics or input detection. They are purely a rendering component
             * that allows you to limit what is visible during the render pass.
             * @param mask The mask this Game Object will use when rendering.
             * @returns This Game Object instance.
             */
            setMask(mask: Phaser.Display.Masks.GeometryMask): this;

            /**
             * Clears the mask that this Game Object was using.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param destroyMask Destroy the mask before clearing it? Default false.
             * @returns This Game Object instance.
             */
            clearMask(destroyMask?: boolean): this;

            /**
             * Creates and returns a Geometry Mask. This mask can be used by any Game Object,
             * including this one.
             * 
             * To create the mask you need to pass in a reference to a Graphics Game Object.
             * 
             * If you do not provide a graphics object, and this Game Object is an instance
             * of a Graphics object, then it will use itself to create the mask.
             * 
             * This means you can call this method to create a Geometry Mask from any Graphics Game Object.
             * 
             * This only works in the Canvas Renderer.
             * In WebGL, use a Mask filter instead (see {@link Phaser.GameObjects.Components.FilterList#addMask}).
             * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.
             * @returns This Geometry Mask that was created.
             */
            createGeometryMask<G extends Phaser.GameObjects.Graphics, S extends Phaser.GameObjects.Shape>(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask;

            /**
             * Sets the origin of this Game Object.
             * 
             * The values are given in the range 0 to 1.
             * @param x The horizontal origin value. Default 0.5.
             * @param y The vertical origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setOrigin(x?: number, y?: number): this;

            /**
             * Sets the origin of this Game Object based on the Pivot values in its Frame.
             * If the Frame has a custom pivot point defined, the origin is set to match it.
             * If the Frame does not have a custom pivot, this method falls back to `setOrigin()`,
             * resetting the origin to the default value of 0.5 for both axes.undefined
             * @returns This Game Object instance.
             */
            setOriginFromFrame(): this;

            /**
             * Sets the display origin of this Game Object.
             * The difference between this and setting the origin is that you can use pixel values for setting the display origin.
             * @param x The horizontal display origin value. Default 0.
             * @param y The vertical display origin value. If not defined it will be set to the value of `x`. Default x.
             * @returns This Game Object instance.
             */
            setDisplayOrigin(x?: number, y?: number): this;

            /**
             * Updates the Display Origin cached values internally stored on this Game Object.
             * You don't usually call this directly, but it is exposed for edge-cases where you may.undefined
             * @returns This Game Object instance.
             */
            updateDisplayOrigin(): this;

            /**
             * Customized WebGL render nodes of this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * A default set of RenderNodes is coded into the engine,
             * but the renderer will check this object first to see if a custom node has been set.
             */
            customRenderNodes: object;

            /**
             * The default RenderNodes for this Game Object.
             * RenderNodes are responsible for managing the rendering process of this Game Object.
             * These are the nodes that are used if no custom ones are set.
             * 
             * RenderNodes are identified by a unique key for their role.
             * 
             * Common role keys include:
             * 
             * - 'Submitter': responsible for running other node roles for each element.
             * - 'Transformer': responsible for providing vertex coordinates for an element.
             * - 'Texturer': responsible for handling textures for an element.
             */
            defaultRenderNodes: object;

            /**
             * An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * 
             * Render nodes store their data under their own name, not their role.
             */
            renderNodeData: object;

            /**
             * Initializes the render nodes for this Game Object.
             * 
             * This method is called when the Game Object is added to the Scene.
             * It is responsible for setting up the default render nodes
             * this Game Object will use.
             * @param defaultNodes The default render nodes to set for this Game Object.
             */
            initRenderNodes(defaultNodes: Map<string, string>): void;

            /**
             * Sets the RenderNode for a given role.
             * 
             * Also sets the relevant render node data object, if specified.
             * 
             * If the node cannot be set, no changes are made.
             * @param key The key of the role to set the render node for.
             * @param renderNode The render node to set on this Game Object. Either a string, or a RenderNode instance. If `null`, the render node is removed, along with its data.
             * @param renderNodeData An object to store render node specific data in, to be read by the render nodes this Game Object uses.
             * @param copyData Should the data be copied from the `renderNodeData` object? Default false.
             * @returns This Game Object instance.
             */
            setRenderNodeRole(key: string, renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode | null, renderNodeData?: object, copyData?: boolean): this;

            /**
             * Sets or removes a property in the data object for a specific render node within `renderNodeData`.
             * 
             * If `key` is not set, it is created. If it is set, it is updated.
             * 
             * If `value` is undefined and `key` exists, the key is removed.
             * @param renderNode The render node to set the data for. If a string, it should be the name of the render node.
             * @param key The key of the property to set.
             * @param value The value to set the property to.
             * @returns This Game Object instance.
             */
            setRenderNodeData(renderNode: string | Phaser.Renderer.WebGL.RenderNodes.RenderNode, key: string, value: any): this;

            /**
             * The horizontal scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorX: number;

            /**
             * The vertical scroll factor of this Game Object.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             */
            scrollFactorY: number;

            /**
             * Sets the horizontal and vertical scroll factor of this Game Object. If only the `x` value is
             * provided, it is applied to both axes. This is a convenience method for setting `scrollFactorX`
             * and `scrollFactorY` in a single call.
             * 
             * The scroll factor controls the influence of the movement of a Camera upon this Game Object.
             * 
             * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
             * It does not change the Game Objects actual position values.
             * 
             * A value of 1 means it will move exactly in sync with a camera.
             * A value of 0 means it will not move at all, even if the camera moves.
             * Other values control the degree to which the camera movement is mapped to this Game Object.
             * 
             * Please be aware that scroll factor values other than 1 are not taken into consideration when
             * calculating physics collisions. Bodies always collide based on their world position, but changing
             * the scroll factor is a visual adjustment to where the textures are rendered, which can offset
             * them from physics bodies if not accounted for in your code.
             * @param x The horizontal scroll factor of this Game Object.
             * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScrollFactor(x: number, y?: number): this;

            /**
             * A property indicating that a Game Object has this component.
             */
            readonly hasTransformComponent: boolean;

            /**
             * The x position of this Game Object.
             */
            x: number;

            /**
             * The y position of this Game Object.
             */
            y: number;

            /**
             * The z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#depth} instead.
             */
            z: number;

            /**
             * The w position of this Game Object.
             */
            w: number;

            /**
             * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object
             * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.
             * 
             * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this
             * isn't the case, use the `scaleX` or `scaleY` properties instead.
             */
            scale: number;

            /**
             * The horizontal scale of this Game Object.
             */
            scaleX: number;

            /**
             * The vertical scale of this Game Object.
             */
            scaleY: number;

            /**
             * The angle of this Game Object as expressed in degrees.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left
             * and -90 is up.
             * 
             * If you prefer to work in radians, see the `rotation` property instead.
             */
            angle: number;

            /**
             * The angle of this Game Object in radians.
             * 
             * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left
             * and -PI/2 is up.
             * 
             * If you prefer to work in degrees, see the `angle` property instead.
             */
            rotation: number;

            /**
             * Sets the position of this Game Object.
             * @param x The x position of this Game Object. Default 0.
             * @param y The y position of this Game Object. If not set it will use the `x` value. Default x.
             * @param z The z position of this Game Object. Default 0.
             * @param w The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setPosition(x?: number, y?: number, z?: number, w?: number): this;

            /**
             * Copies an object's coordinates to this Game Object's position.
             * @param source An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.
             * @returns This Game Object instance.
             */
            copyPosition(source: Phaser.Types.Math.Vector2Like | Phaser.Types.Math.Vector3Like | Phaser.Types.Math.Vector4Like): this;

            /**
             * Sets the position of this Game Object to be a random position within the confines of
             * the given area.
             * 
             * If no area is specified a random position between 0 x 0 and the game width x height is used instead.
             * 
             * The position does not factor in the size of this Game Object, meaning that only the origin is
             * guaranteed to be within the area.
             * @param x The x position of the top-left of the random area. Default 0.
             * @param y The y position of the top-left of the random area. Default 0.
             * @param width The width of the random area.
             * @param height The height of the random area.
             * @returns This Game Object instance.
             */
            setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;

            /**
             * Sets the rotation of this Game Object.
             * @param radians The rotation of this Game Object, in radians. Default 0.
             * @returns This Game Object instance.
             */
            setRotation(radians?: number): this;

            /**
             * Sets the angle of this Game Object.
             * @param degrees The rotation of this Game Object, in degrees. Default 0.
             * @returns This Game Object instance.
             */
            setAngle(degrees?: number): this;

            /**
             * Sets the scale of this Game Object.
             * @param x The horizontal scale of this Game Object. Default 1.
             * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x.
             * @returns This Game Object instance.
             */
            setScale(x?: number, y?: number): this;

            /**
             * Sets the x position of this Game Object.
             * @param value The x position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setX(value?: number): this;

            /**
             * Sets the y position of this Game Object.
             * @param value The y position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setY(value?: number): this;

            /**
             * Sets the z position of this Game Object.
             * 
             * Note: The z position does not control the rendering order of 2D Game Objects. Use
             * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.
             * @param value The z position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setZ(value?: number): this;

            /**
             * Sets the w position of this Game Object.
             * @param value The w position of this Game Object. Default 0.
             * @returns This Game Object instance.
             */
            setW(value?: number): this;

            /**
             * Gets the local transform matrix for this Game Object.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @returns The populated Transform Matrix.
             */
            getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Gets the world transform matrix for this Game Object, factoring in any parent Containers.
             * @param tempMatrix The matrix to populate with the values from this Game Object.
             * @param parentMatrix A temporary matrix to hold parent values during the calculations.
             * @returns The populated Transform Matrix.
             */
            getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix;

            /**
             * Takes the given `x` and `y` coordinates and converts them into local space for this
             * Game Object, taking into account parent and local transforms, and the Display Origin.
             * 
             * The returned Vector2 contains the translated point in its properties.
             * 
             * A Camera needs to be provided in order to handle modified scroll factors. If no
             * camera is specified, it will use the `main` camera from the Scene to which this
             * Game Object belongs.
             * @param x The x position to translate.
             * @param y The y position to translate.
             * @param point A Vector2, or point-like object, to store the results in.
             * @param camera The Camera which is being tested against. If not given will use the Scene default camera.
             * @returns The translated point.
             */
            getLocalPoint(x: number, y: number, point?: Phaser.Math.Vector2, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.Math.Vector2;

            /**
             * Gets the world position of this Game Object, factoring in any parent Containers.
             * @param point A Vector2, or point-like object, to store the result in.
             * @param tempMatrix A temporary matrix to hold the Game Object's values.
             * @param parentMatrix A temporary matrix to hold parent values.
             * @returns The world position of this Game Object.
             */
            getWorldPoint(point?: Phaser.Math.Vector2, tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Math.Vector2;

            /**
             * Gets the sum total rotation of all of this Game Object's parent Containers.
             * 
             * The returned value is in radians and will be zero if this Game Object has no parent container.undefined
             * @returns The sum total rotation, in radians, of all parent containers of this Game Object.
             */
            getParentRotation(): number;

            /**
             * The visible state of the Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             */
            visible: boolean;

            /**
             * Sets the visibility of this Game Object.
             * 
             * An invisible Game Object will skip rendering, but will still process update logic.
             * @param value The visible state of the Game Object.
             * @returns This Game Object instance.
             */
            setVisible(value: boolean): this;

            /**
             * Sets the Collision Category that this Arcade Physics Body
             * will use in order to determine what it can collide with.
             * 
             * It can only have one single category assigned to it.
             * 
             * If you wish to reset the collision category and mask, call
             * the `resetCollisionCategory` method.
             * @param category The collision category to assign to this body. Typically a power of 2, such as 1, 2, 4, 8, and so on.
             * @returns This Game Object.
             */
            setCollisionCategory(category: number): this;

            /**
             * Checks to see if the given Collision Category will collide with
             * this Arcade Physics object or not.
             * @param category Collision category value to test.
             * @returns `true` if the given category will collide with this object, otherwise `false`.
             */
            willCollideWith(category: number): boolean;

            /**
             * Adds the given Collision Category to the list of those that this
             * Arcade Physics Body will collide with.
             * @param category The collision category to add to this body's collision mask.
             * @returns This Game Object.
             */
            addCollidesWith(category: number): this;

            /**
             * Removes the given Collision Category from the list of those that this
             * Arcade Physics Body will collide with.
             * @param category The collision category to remove from this body's collision mask.
             * @returns This Game Object.
             */
            removeCollidesWith(category: number): this;

            /**
             * Sets all of the Collision Categories that this Arcade Physics Body
             * will collide with. You can either pass a single category value, or
             * an array of them.
             * 
             * Calling this method will reset all of the collision categories,
             * so only those passed to this method are enabled.
             * 
             * If you wish to add a new category to the existing mask, call
             * the `addCollidesWith` method.
             * 
             * If you wish to reset the collision category and mask, call
             * the `resetCollisionCategory` method.
             * @param categories The collision category to collide with, or an array of them.
             * @returns This Game Object.
             */
            setCollidesWith(categories: number | number[]): this;

            /**
             * Resets the Collision Category and Mask back to the defaults,
             * which means the body will belong to category 1 and will collide with all other categories.undefined
             * @returns This Game Object.
             */
            resetCollisionCategory(): this;

        }

        /**
         * A Tileset is a combination of a single image containing the tiles and a container for data
         * about each tile. It maps tile indexes (GIDs) to positions within the tileset image, stores
         * per-tile properties and collision data, and supports tile spacing and margin. Tilesets are
         * created automatically when parsing Tiled map data and are used by TilemapLayer during rendering.
         */
        class Tileset {
            /**
             * 
             * @param name The name of the tileset in the map data.
             * @param firstgid The first tile index this tileset contains.
             * @param tileWidth Width of each tile (in pixels). Default 32.
             * @param tileHeight Height of each tile (in pixels). Default 32.
             * @param tileMargin The margin around all tiles in the sheet (in pixels). Default 0.
             * @param tileSpacing The spacing between each tile in the sheet (in pixels). Default 0.
             * @param tileProperties Custom properties defined per tile in the Tileset.
             * These typically are custom properties created in Tiled when editing a tileset. Default {}.
             * @param tileData Data stored per tile. These typically are created in Tiled when editing a tileset, e.g. from Tiled's tile collision editor or terrain editor. Default {}.
             * @param tileOffset Tile texture drawing offset. Default {x: 0, y: 0}.
             */
            constructor(name: string, firstgid: number, tileWidth?: number, tileHeight?: number, tileMargin?: number, tileSpacing?: number, tileProperties?: object, tileData?: object, tileOffset?: object);

            /**
             * The name of the Tileset.
             */
            name: string;

            /**
             * The starting index of the first tile index this Tileset contains.
             */
            firstgid: number;

            /**
             * The width of each tile (in pixels). Use setTileSize to change.
             */
            readonly tileWidth: number;

            /**
             * The height of each tile (in pixels). Use setTileSize to change.
             */
            readonly tileHeight: number;

            /**
             * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change.
             */
            readonly tileMargin: number;

            /**
             * The spacing between each tile in the sheet (in pixels). Use `setSpacing` to change.
             */
            readonly tileSpacing: number;

            /**
             * Tileset-specific properties per tile that are typically defined in the Tiled editor in the
             * Tileset editor.
             */
            tileProperties: object;

            /**
             * Tileset-specific data per tile that are typically defined in the Tiled editor, e.g. within
             * the Tileset collision editor. This is where collision objects and terrain are stored.
             */
            tileData: object;

            /**
             * Controls the drawing offset from the tile origin.
             * Defaults to 0x0, no offset.
             */
            tileOffset: Phaser.Math.Vector2;

            /**
             * The cached image that contains the individual tiles. Use setImage to set.
             */
            readonly image: Phaser.Textures.Texture | null;

            /**
             * The gl texture used by the WebGL renderer.
             */
            readonly glTexture: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper | null;

            /**
             * The number of tile rows in the tileset.
             */
            readonly rows: number;

            /**
             * The number of tile columns in the tileset.
             */
            readonly columns: number;

            /**
             * The total number of tiles in the tileset.
             */
            readonly total: number;

            /**
             * The look-up table to specific tile image texture coordinates (UV in pixels). Each element
             * contains the coordinates for a tile in an object of the form {x, y}.
             */
            readonly texCoordinates: object[];

            /**
             * The number of frames above which a tile is considered to have
             * many animation frames. This is used to optimize rendering.
             * If a tile has fewer frames than this, frames are searched using
             * a linear search. If a tile has more, frames are searched using
             * a binary search.
             */
            animationSearchThreshold: number;

            /**
             * The maximum length of any animation in this tileset, in frames.
             * This is used internally to optimize rendering.
             * It is updated when `createAnimationDataTexture` is called.
             */
            readonly maxAnimationLength: number;

            /**
             * Get a tile's properties that are stored in the Tileset. Returns null if tile index is not
             * contained in this Tileset. This is typically defined in Tiled under the Tileset editor.
             * @param tileIndex The unique id of the tile across all tilesets in the map.
             * @returns undefined
             */
            getTileProperties(tileIndex: number): object | undefined | null;

            /**
             * Get a tile's data that is stored in the Tileset. Returns null if tile index is not contained
             * in this Tileset. This is typically defined in Tiled and will contain both Tileset collision
             * info and terrain mapping.
             * @param tileIndex The unique id of the tile across all tilesets in the map.
             * @returns undefined
             */
            getTileData(tileIndex: number): object | undefined;

            /**
             * Get a tile's collision group that is stored in the Tileset. Returns null if tile index is not
             * contained in this Tileset. This is typically defined within Tiled's tileset collision editor.
             * @param tileIndex The unique id of the tile across all tilesets in the map.
             * @returns undefined
             */
            getTileCollisionGroup(tileIndex: number): object | null;

            /**
             * Returns true if and only if this Tileset contains the given tile index.
             * @param tileIndex The unique id of the tile across all tilesets in the map.
             * @returns undefined
             */
            containsTileIndex(tileIndex: number): boolean;

            /**
             * Returns the ID of the tile to use, given a base tile and time,
             * according to the tile's animation properties.
             * 
             * If the tile is not animated, this method returns the base tile ID.
             * @param tileIndex The unique id of the tile across all tilesets in the map.
             * @param milliseconds The current time in milliseconds.
             * @returns The tile ID to use, or null if the tile is not contained in this tileset.
             */
            getAnimatedTileId(tileIndex: number, milliseconds: number): number | null;

            /**
             * Returns the texture coordinates (UV in pixels) in the Tileset image for the given tile index.
             * Returns null if tile index is not contained in this Tileset.
             * @param tileIndex The unique id of the tile across all tilesets in the map.
             * @returns Object in the form { x, y } representing the top-left UV coordinatewithin the Tileset image.
             */
            getTileTextureCoordinates(tileIndex: number): object | null;

            /**
             * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.).
             * @param texture The image that contains the tiles.
             * @returns This Tileset object.
             */
            setImage(texture: Phaser.Textures.Texture): Phaser.Tilemaps.Tileset;

            /**
             * Sets the tile width & height and updates the tile data (rows, columns, etc.).
             * @param tileWidth The width of a tile in pixels.
             * @param tileHeight The height of a tile in pixels.
             * @returns This Tileset object.
             */
            setTileSize(tileWidth?: number, tileHeight?: number): Phaser.Tilemaps.Tileset;

            /**
             * Sets the tile margin and spacing and updates the tile data (rows, columns, etc.).
             * @param margin The margin around the tiles in the sheet (in pixels).
             * @param spacing The spacing between the tiles in the sheet (in pixels).
             * @returns This Tileset object.
             */
            setSpacing(margin?: number, spacing?: number): Phaser.Tilemaps.Tileset;

            /**
             * Updates tile texture coordinates and tileset data.
             * @param imageWidth The (expected) width of the image to slice.
             * @param imageHeight The (expected) height of the image to slice.
             * @param offsetX The x offset in the source texture where the tileset starts. Default 0.
             * @param offsetY The y offset in the source texture where the tileset starts. Default 0.
             * @returns This Tileset object.
             */
            updateTileData(imageWidth: number, imageHeight: number, offsetX?: number, offsetY?: number): Phaser.Tilemaps.Tileset;

            /**
             * Get or create the texture containing the animation data for this tileset.
             * This is used by `TilemapGPULayer` to animate tiles.
             * @param renderer The renderer to use.
             * @returns The animation data texture.
             */
            getAnimationDataTexture(renderer: Phaser.Renderer.WebGL.WebGLRenderer): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

            /**
             * Get or create the map from tile index to animation data index.
             * This is used by `TilemapGPULayer` to animate tiles.
             * @param renderer The renderer to use.
             * @returns The map from tile index to animation data index.
             */
            getAnimationDataIndexMap(renderer: Phaser.Renderer.WebGL.WebGLRenderer): Map<number, number>;

            /**
             * Creates a new WebGLTexture for the tileset's animation data.
             * @param renderer The renderer to use.
             * @returns The new WebGLTexture.
             */
            createAnimationDataTexture(renderer: Phaser.Renderer.WebGL.WebGLRenderer): Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;

        }

        namespace Components {
            /**
             * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting
             * faces are used internally for optimizing collisions against tiles. This method is mostly used
             * internally to optimize recalculating faces when only one tile has been changed.
             * @param tileX The x coordinate of the tile in tile grid coordinates.
             * @param tileY The y coordinate of the tile in tile grid coordinates.
             * @param layer The Tilemap Layer to act upon.
             * @returns The tile at the given coordinates, or `null` if no tile exists there.
             */
            function CalculateFacesAt(tileX: number, tileY: number, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile;

            /**
             * Calculates the interesting faces for all collidable tiles within the rectangular area specified
             * (in tile coordinates) of the layer. An "interesting face" is an exposed edge of a collidable tile
             * — specifically, any face that is not shared with another collidable tile adjacent to it. For
             * example, if two collidable tiles sit side by side, the shared edge between them is not an
             * interesting face because a physics body moving between them would never collide with it. Only
             * interesting faces are tested during collision resolution, which avoids the internal-edge problem
             * and keeps collision checks efficient. This function is called automatically when tiles are placed
             * or removed, and is mostly used internally by the tilemap system.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param layer The Tilemap Layer to act upon.
             */
            function CalculateFacesWithin(tileX: number, tileY: number, width: number, height: number, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Checks if the given tile coordinate is within the visible bounds of the camera for an isometric
             * tilemap layer. This is used during tile culling to determine whether a tile should be rendered.
             * 
             * The tile coordinate is first converted to world-space using the layer's tile-to-world transform.
             * The resulting position is then tested against the camera's world view rectangle, expanded by the
             * layer's `cullPaddingX` and `cullPaddingY` values (in tile units) to avoid tiles popping in at
             * the edges of the viewport. The padding offsets are measured from the center of each tile.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param layer The Tilemap Layer to check against.
             * @param camera The Camera to run the cull check against.
             * @returns Returns `true` if the coordinates are within the iso bounds.
             */
            function CheckIsoBounds(tileX: number, tileY: number, layer: Phaser.Tilemaps.LayerData, camera?: Phaser.Cameras.Scene2D.Camera): boolean;

            /**
             * Copies the tiles in the source rectangular area to a new destination (all specified in tile
             * coordinates) within the layer. This copies all tile properties and recalculates collision
             * information in the destination region.
             * @param srcTileX The x coordinate of the area to copy from, in tiles, not pixels.
             * @param srcTileY The y coordinate of the area to copy from, in tiles, not pixels.
             * @param width The width of the area to copy, in tiles, not pixels.
             * @param height The height of the area to copy, in tiles, not pixels.
             * @param destTileX The x coordinate of the area to copy to, in tiles, not pixels.
             * @param destTileY The y coordinate of the area to copy to, in tiles, not pixels.
             * @param recalculateFaces `true` if the collision face data for tiles in the destination region should be recalculated after the copy.
             * @param layer The Tilemap Layer to act upon.
             */
            function Copy(srcTileX: number, srcTileY: number, width: number, height: number, destTileX: number, destTileY: number, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Creates a Sprite for every object matching the given tile indexes in the layer. You can
             * optionally specify if each tile will be replaced with a new tile after the Sprite has been
             * created. This is useful if you want to lay down special tiles in a level that are converted to
             * Sprites, but want to replace the tile itself with a floor tile or similar once converted.
             * @param indexes The tile index, or array of indexes, to create Sprites from.
             * @param replacements The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array.
             * @param spriteConfig The config object to pass into the Sprite creator (i.e. scene.make.sprite).
             * @param scene The Scene to create the Sprites within.
             * @param camera The Camera to use when determining the world XY position of each tile.
             * @param layer The Tilemap Layer to act upon.
             * @returns An array of the Sprites that were created.
             */
            function CreateFromTiles(indexes: number | number[], replacements: number | number[] | undefined, spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.GameObjects.Sprite[];

            /**
             * Calculates the tile coordinate bounds within the given orthogonal tilemap layer that fall inside
             * the camera's viewport. The result accounts for the layer's position, scale, and cull padding
             * on each axis. This is used internally by the cull tiles function to determine which tiles need
             * to be rendered.
             * @param layer The Tilemap Layer to act upon.
             * @param camera The Camera to run the cull check against.
             * @returns A rectangle containing the culled bounds. If you wish to retain this object, clone it, as it's recycled internally.
             */
            function CullBounds(layer: Phaser.Tilemaps.LayerData, camera: Phaser.Cameras.Scene2D.Camera): Phaser.Geom.Rectangle;

            /**
             * Returns the tiles in the given layer that are within the camera's viewport. Culling avoids
             * rendering tiles that are off-screen, improving performance. The camera's world view bounds
             * are calculated and snapped to the scaled tile size, taking cull padding (expressed in tiles)
             * into account. If the layer has `skipCull` enabled, or if its scroll factors differ from 1,
             * the full layer dimensions are used instead so that all tiles are included. This function is
             * used internally by the tilemap rendering pipeline.
             * @param layer The Tilemap Layer to act upon.
             * @param camera The Camera to run the cull check against.
             * @param outputArray An optional array to store the culled Tile objects within.
             * @param renderOrder The rendering order constant. Controls the order in which tiles are iterated and added to the output array. Default 0.
             * @returns An array of Tile objects.
             */
            function CullTiles(layer: Phaser.Tilemaps.LayerData, camera: Phaser.Cameras.Scene2D.Camera, outputArray?: any[], renderOrder?: number): Phaser.Tilemaps.Tile[];

            /**
             * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the
             * specified index. Tiles will be set to collide if the given index is a colliding index.
             * Collision information in the region will be recalculated.
             * @param index The tile index to fill the area with.
             * @param tileX The left most tile coordinate (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile coordinate (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` coordinate the area will be.
             * @param height How many tiles tall from the `tileY` coordinate the area will be.
             * @param recalculateFaces `true` if the faces data should be recalculated.
             * @param layer The tile layer to use. If not given the current layer is used.
             */
            function Fill(index: number, tileX: number, tileY: number, width: number, height: number, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
             * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns
             * true) will be returned as a new array. Similar to Array.prototype.filter in vanilla JS.
             * @param callback The callback. Each tile in the given area will be passed to this
             * callback as the first and only parameter. The callback should return true for tiles that pass the
             * filter.
             * @param context The context under which the callback should be run.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param layer The Tilemap Layer to act upon.
             * @returns The filtered array of Tiles.
             */
            function FilterTiles(callback: Function, context: object, tileX: number, tileY: number, width: number, height: number, filteringOptions: Phaser.Types.Tilemaps.FilteringOptions, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile[];

            /**
             * Searches the entire map layer for the first tile matching the given index, then returns that Tile
             * object. If no match is found, it returns null. The search starts from the top-left tile and
             * continues horizontally until it hits the end of the row, then it drops down to the next row.
             * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to
             * the top-left.
             * @param index The tile index value to search for.
             * @param skip The number of times to skip a matching tile before returning.
             * @param reverse If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left.
             * @param layer The Tilemap Layer to act upon.
             * @returns The first (or n skipped) tile with the matching index.
             */
            function FindByIndex(index: number, skip: number, reverse: boolean, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile | null;

            /**
             * Find the first tile in the given rectangular area (in tile coordinates) of the layer that
             * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns
             * true. Similar to Array.prototype.find in vanilla JS.
             * @param callback The callback. Each tile in the given area will be passed to this callback as the first parameter, along with the tile index and the array of tiles.
             * @param context The context under which the callback should be run.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param layer The Tilemap Layer to act upon.
             * @returns A Tile that matches the search, or null if no Tile found
             */
            function FindTile(callback: FindTileCallback, context: object, tileX: number, tileY: number, width: number, height: number, filteringOptions: Phaser.Types.Tilemaps.FilteringOptions, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile | null;

            /**
             * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
             * callback. Similar to Array.prototype.forEach in vanilla JS.
             * @param callback The callback. Each tile in the given area will be passed to this callback, along with its index in the array and the array itself.
             * @param context The context under which the callback should be run.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area to filter.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param layer The Tilemap Layer to act upon.
             */
            function ForEachTile(callback: EachTileCallback, context: object, tileX: number, tileY: number, width: number, height: number, filteringOptions: Phaser.Types.Tilemaps.FilteringOptions, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Gets the correct function to use to cull tiles, based on the map orientation.
             * @param orientation The Tilemap orientation constant.
             * @returns The function to use to cull tiles for the given map type.
             */
            function GetCullTilesFunction(orientation: number): Function;

            /**
             * Gets a tile at the given tile coordinates from the given layer.
             * @param tileX X position to get the tile from (given in tile units, not pixels).
             * @param tileY Y position to get the tile from (given in tile units, not pixels).
             * @param nonNull For empty tiles, return a Tile object with an index of -1 instead of null.
             * @param layer The Tilemap Layer to act upon.
             * @returns The tile at the given coordinates or null if no tile was found or the coordinates were invalid.
             */
            function GetTileAt(tileX: number, tileY: number, nonNull: boolean, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile;

            /**
             * Gets a tile at the given world coordinates from the given layer.
             * @param worldX X position to get the tile from (given in pixels)
             * @param worldY Y position to get the tile from (given in pixels)
             * @param nonNull For empty tiles, return a Tile object with an index of -1 instead of null.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The tile at the given coordinates or null if no tile was found or the coordinates were invalid.
             */
            function GetTileAtWorldXY(worldX: number, worldY: number, nonNull: boolean, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile;

            /**
             * Gets the four corners of a tile, given its tile-space coordinates, as an array of world-space
             * Vector2 positions. The returned positions account for the layer's world position, scale, and
             * the camera's scroll offset, and are ordered: top-left, top-right, bottom-right, bottom-left.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param camera The Camera whose scroll offset is used when calculating the world-space position of the tile corners.
             * @param layer The Tilemap Layer to act upon.
             * @returns An array of Vector2s corresponding to the world XY location of each tile corner.
             */
            function GetTileCorners(tileX: number, tileY: number, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2[];

            /**
             * Gets the correct function to use to get the tile corners, based on the map orientation.
             * @param orientation The Tilemap orientation constant.
             * @returns The function to use to get the tile corners for the given map orientation.
             */
            function GetTileCornersFunction(orientation: number): Function;

            /**
             * Returns the correct function to use for converting a tile X coordinate to a world X pixel
             * coordinate, based on the map orientation. For orthogonal maps, this returns the `TileToWorldX`
             * function. For all other orientations, a NOOP function is returned, as non-orthogonal maps
             * do not support this conversion.
             * @param orientation The Tilemap orientation constant.
             * @returns The function to use to convert tile X coordinates to world X pixel coordinates for the given map orientation.
             */
            function GetTileToWorldXFunction(orientation: number): Function;

            /**
             * Gets the correct function to use to translate tiles, based on the map orientation.
             * @param orientation The Tilemap orientation constant.
             * @returns The function to use to translate tiles for the given map type.
             */
            function GetTileToWorldXYFunction(orientation: number): Function;

            /**
             * Gets the correct function to use to translate tiles, based on the map orientation.
             * @param orientation The Tilemap orientation constant.
             * @returns The function to use to translate tiles for the given map type.
             */
            function GetTileToWorldYFunction(orientation: number): Function;

            /**
             * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.
             * 
             * This returns an array containing references to the Tile instances themselves, so be aware that
             * modifying them directly will affect the layer data.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param layer The Tilemap Layer to act upon.
             * @returns Array of Tile objects.
             */
            function GetTilesWithin(tileX: number, tileY: number, width: number, height: number, filteringOptions: Phaser.Types.Tilemaps.FilteringOptions, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile[];

            /**
             * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,
             * Line, Rectangle or Triangle. The shape should be in world coordinates.
             * 
             * **Note:** This method currently only works with orthogonal tilemap layers.
             * @param shape A shape in world (pixel) coordinates
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns An array of Tile objects that intersect with the given shape, or an empty array if no tiles overlap or the layer is not orthogonal.
             */
            function GetTilesWithinShape(shape: Phaser.Geom.Circle | Phaser.Geom.Line | Phaser.Geom.Rectangle | Phaser.Geom.Triangle, filteringOptions: Phaser.Types.Tilemaps.FilteringOptions, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile[];

            /**
             * Gets the tiles in the given rectangular area (in world coordinates) of the layer.
             * @param worldX The world x coordinate for the top-left of the area.
             * @param worldY The world y coordinate for the top-left of the area.
             * @param width The width of the area.
             * @param height The height of the area.
             * @param filteringOptions Optional filters to apply when getting the tiles.
             * @param camera The Camera to use when factoring in which tiles to return.
             * @param layer The Tilemap Layer to act upon.
             * @returns Array of Tile objects.
             */
            function GetTilesWithinWorldXY(worldX: number, worldY: number, width: number, height: number, filteringOptions: Phaser.Types.Tilemaps.FilteringOptions, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile[];

            /**
             * Returns the correct function to use for converting a world pixel X coordinate to a tile X
             * (column) index, based on the map orientation. Only orthogonal maps support this conversion;
             * for all other orientations a NULL function is returned.
             * @param orientation The Tilemap orientation constant.
             * @returns The function to use to convert a world X coordinate to a tile X index for the given map orientation, or a NULL function if the orientation is unsupported.
             */
            function GetWorldToTileXFunction(orientation: number): Function;

            /**
             * Returns the appropriate world-to-tile coordinate conversion function for the given map orientation.
             * The returned function converts world pixel coordinates (X, Y) into tile grid coordinates, using
             * the correct projection math for orthogonal, isometric, hexagonal, or staggered tilemaps.
             * If the orientation is unrecognised, a NOOP function is returned.
             * @param orientation The Tilemap orientation constant, as defined in `Phaser.Tilemaps.ORIENTATION_CONST`.
             * @returns The world-to-tile coordinate conversion function for the given map orientation.
             */
            function GetWorldToTileXYFunction(orientation: number): Function;

            /**
             * Returns the correct function to use for converting a world Y coordinate to a tile Y coordinate,
             * based on the map orientation. Returns `WorldToTileY` for orthogonal maps, `StaggeredWorldToTileY`
             * for staggered maps, and a NULL function for all other orientations.
             * @param orientation The Tilemap orientation constant.
             * @returns The function to use to convert a world Y coordinate to a tile Y coordinate for the given map orientation.
             */
            function GetWorldToTileYFunction(orientation: number): Function;

            /**
             * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns
             * false if there is no tile or if the tile at that location has an index of -1.
             * @param tileX X position to get the tile from (given in tile units, not pixels).
             * @param tileY Y position to get the tile from (given in tile units, not pixels).
             * @param layer The Tilemap Layer to act upon.
             * @returns Returns `true` if a valid tile (with an index greater than -1) exists at the given coordinates, or `false` if the coordinates are out of bounds, the tile is null, or the tile index is -1.
             */
            function HasTileAt(tileX: number, tileY: number, layer: Phaser.Tilemaps.LayerData): boolean | null;

            /**
             * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns
             * false if there is no tile or if the tile at that location has an index of -1.
             * @param worldX The X coordinate of the world position.
             * @param worldY The Y coordinate of the world position.
             * @param camera The Camera to use when factoring in which tiles to return.
             * @param layer The Tilemap Layer to act upon.
             * @returns Returns a boolean, or null if the layer given was invalid.
             */
            function HasTileAtWorldXY(worldX: number, worldY: number, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): boolean | null;

            /**
             * Calculates the tile grid index bounds of a hexagonal Tilemap Layer that fall within the
             * camera's viewport. The bounds account for the layer's stagger axis (x or y), hex side length,
             * tile scale, layer offset, and cull padding, returning the range of tile columns and rows that
             * need to be rendered. This is used internally by the hexagonal cull tiles function.
             * @param layer The Tilemap Layer to act upon.
             * @param camera The Camera to run the cull check against.
             * @returns An object containing the `left`, `right`, `top` and `bottom` tile grid index bounds.
             */
            function HexagonalCullBounds(layer: Phaser.Tilemaps.LayerData, camera: Phaser.Cameras.Scene2D.Camera): object;

            /**
             * Returns the tiles in the given layer that are within the camera's viewport. This is used internally.
             * @param layer The Tilemap Layer to act upon.
             * @param camera The Camera to run the cull check against.
             * @param outputArray An optional array to store the Tile objects within.
             * @param renderOrder The rendering order constant. Default 0.
             * @returns An array of Tile objects.
             */
            function HexagonalCullTiles(layer: Phaser.Tilemaps.LayerData, camera: Phaser.Cameras.Scene2D.Camera, outputArray?: any[], renderOrder?: number): Phaser.Tilemaps.Tile[];

            /**
             * Calculates and returns the six corner positions of a hexagonal tile as an array of Vector2 objects in world space.
             * The tile is identified by its tile grid coordinates and the corners are computed relative to the tile's world center,
             * taking into account the layer's stagger axis and any scale applied to the tilemap layer.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param camera The Camera to use when converting tile coordinates to world position.
             * @param layer The Tilemap Layer to act upon.
             * @returns An array of Vector2s corresponding to the world XY location of each tile corner.
             */
            function HexagonalGetTileCorners(tileX: number, tileY: number, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2[];

            /**
             * Converts from hexagonal tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
             * layer's position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the world coordinates from the tile values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The XY location in world coordinates.
             */
            function HexagonalTileToWorldXY(tileX: number, tileY: number, point: Phaser.Math.Vector2, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2;

            /**
             * Converts from world XY coordinates (pixels) to hexagonal tile XY coordinates (tile units), factoring in the
             * layer's position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param worldX The x coordinate to be converted, in pixels, not tiles.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinates down to the nearest integer.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the tile XY coordinates from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The XY location in tile units.
             */
            function HexagonalWorldToTileXY(worldX: number, worldY: number, snapToFloor: boolean, point: Phaser.Math.Vector2, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2;

            /**
             * Checks if the given tile coordinates are within the bounds of the layer.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param layer The Tilemap Layer to act upon.
             * @returns `true` if the tile coordinates are within the bounds of the layer, otherwise `false`.
             */
            function IsInLayerBounds(tileX: number, tileY: number, layer: Phaser.Tilemaps.LayerData): boolean;

            /**
             * Returns the tiles in the given layer that are within the camera's viewport. This is used internally.
             * @param layer The Tilemap Layer to act upon.
             * @param camera The Camera to run the cull check against.
             * @param outputArray An optional array to store the Tile objects within.
             * @param renderOrder The rendering order constant. 0 = right-down, 1 = left-down, 2 = right-up, 3 = left-up. Default 0.
             * @returns An array of Tile objects.
             */
            function IsometricCullTiles(layer: Phaser.Tilemaps.LayerData, camera: Phaser.Cameras.Scene2D.Camera, outputArray?: any[], renderOrder?: number): Phaser.Tilemaps.Tile[];

            /**
             * Converts from isometric tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
             * layer's position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the world position from the tile coordinates.
             * @param layer The Tilemap Layer to act upon.
             * @returns The XY location in world coordinates.
             */
            function IsometricTileToWorldXY(tileX: number, tileY: number, point: Phaser.Math.Vector2, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2;

            /**
             * Converts from world XY coordinates (pixels) to isometric tile XY coordinates (tile units), factoring in the
             * layer's position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param worldX The x coordinate to be converted, in pixels, not tiles.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @param originTop Which is the active face of the isometric tile? The top (default, true), or the base? (false) Default true.
             * @returns The XY location in tile units.
             */
            function IsometricWorldToTileXY(worldX: number, worldY: number, snapToFloor: boolean, point: Phaser.Math.Vector2, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData, originTop?: boolean): Phaser.Math.Vector2;

            /**
             * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index
             * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified
             * location. If you pass in an index, only the index at the specified location will be changed.
             * Collision information will be recalculated at the specified location.
             * @param tile The index of this tile to set or a Tile object.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated.
             * @param layer The Tilemap Layer to act upon.
             * @returns The Tile object that was created or added to this map.
             */
            function PutTileAt(tile: number | Phaser.Tilemaps.Tile, tileX: number, tileY: number, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile;

            /**
             * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either
             * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the
             * specified location. If you pass in an index, only the index at the specified location will be
             * changed. Collision face information will be recalculated at the specified location if `recalculateFaces` is `true`.
             * @param tile The index of this tile to set or a Tile object.
             * @param worldX The x coordinate, in pixels.
             * @param worldY The y coordinate, in pixels.
             * @param recalculateFaces `true` if the tile edge collision face data should be recalculated.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The Tile object that was created or added to this map.
             */
            function PutTileAtWorldXY(tile: number | Phaser.Tilemaps.Tile, worldX: number, worldY: number, recalculateFaces: boolean, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile;

            /**
             * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified
             * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,
             * all attributes will be copied over to the specified location. If you pass in an index, only the
             * index at the specified location will be changed. Collision information will be recalculated
             * within the region tiles were changed.
             * @param tilesArray A row (array) or grid (2D array) of Tiles or tile indexes to place.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param recalculateFaces `true` if the faces data should be recalculated.
             * @param layer The Tilemap Layer to act upon.
             */
            function PutTilesAt(tilesArray: number[] | number[][] | Phaser.Tilemaps.Tile[] | Phaser.Tilemaps.Tile[][], tileX: number, tileY: number, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
             * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then
             * those will be used for randomly assigning new tile indexes. If an array is not provided, the
             * indexes found within the region (excluding -1) will be used for randomly assigning new tile
             * indexes. This method only modifies tile indexes and does not change collision information.
             * @param tileX The left-most tile coordinate (in tile coordinates) to use as the origin of the area.
             * @param tileY The top-most tile coordinate (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` coordinate the area will be.
             * @param height How many tiles tall from the `tileY` coordinate the area will be.
             * @param indexes An array of indexes to randomly draw from during randomization.
             * @param layer The Tilemap Layer to act upon.
             */
            function Randomize(tileX: number, tileY: number, width: number, height: number, indexes: number[], layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Removes the tile at the given tile coordinates in the specified layer and updates the layer's
             * collision information.
             * @param tileX The x coordinate of the tile to remove, in tile grid units (not pixels).
             * @param tileY The y coordinate of the tile to remove, in tile grid units (not pixels).
             * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.
             * @param recalculateFaces `true` if the faces data should be recalculated.
             * @param layer The Tilemap Layer to act upon.
             * @returns The Tile object that was removed.
             */
            function RemoveTileAt(tileX: number, tileY: number, replaceWithNull: boolean, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile;

            /**
             * Removes the tile at the given world coordinates in the specified layer and updates the layer's
             * collision information.
             * @param worldX The x coordinate, in pixels.
             * @param worldY The y coordinate, in pixels.
             * @param replaceWithNull If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.
             * @param recalculateFaces `true` if the faces data should be recalculated.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The Tile object that was removed.
             */
            function RemoveTileAtWorldXY(worldX: number, worldY: number, replaceWithNull: boolean, recalculateFaces: boolean, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Tilemaps.Tile;

            /**
             * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to
             * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles
             * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation
             * wherever you want on the screen.
             * @param graphics The target Graphics object to draw upon.
             * @param styleConfig An object specifying the colors to use for the debug drawing.
             * @param layer The Tilemap Layer to act upon.
             */
            function RenderDebug(graphics: Phaser.GameObjects.Graphics, styleConfig: Phaser.Types.Tilemaps.DebugStyleOptions, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
             * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does
             * not change collision information.
             * @param findIndex The index of the tile to search for.
             * @param newIndex The index of the tile to replace it with.
             * @param tileX The left most tile coordinate (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile coordinate (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param layer The Tilemap Layer to act upon.
             */
            function ReplaceByIndex(findIndex: number, newIndex: number, tileX: number, tileY: number, width: number, height: number, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Returns the tiles in the given layer that are within the camera's viewport. This is used internally.
             * @param layer The Tilemap Layer to act upon.
             * @param bounds An object containing the `left`, `right`, `top` and `bottom` bounds.
             * @param renderOrder The rendering order constant. 0 = right-down, 1 = left-down, 2 = right-up, 3 = left-up.
             * @param outputArray The array to store the Tile objects within.
             * @returns An array of Tile objects.
             */
            function RunCull(layer: Phaser.Tilemaps.LayerData, bounds: object, renderOrder: number, outputArray: any[]): Phaser.Tilemaps.Tile[];

            /**
             * Sets collision on the given tile or tiles within a layer by index. You can pass in either a
             * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if
             * collision will be enabled (true) or disabled (false).
             * 
             * This function updates both the layer's collision index (which affects any tiles placed in the
             * future) and, unless `updateLayer` is false, all existing tiles in the layer that match the
             * given indexes.
             * @param indexes Either a single tile index, or an array of tile indexes.
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The Tilemap Layer to act upon.
             * @param updateLayer If true, updates the current tiles on the layer. Set to false if no tiles have been placed for significant performance boost. Default true.
             */
            function SetCollision(indexes: number | any[], collides: boolean, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData, updateLayer?: boolean): void;

            /**
             * Sets collision on a range of tiles in a layer whose index is between the specified `start` and
             * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set
             * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be
             * enabled (true) or disabled (false).
             * @param start The first index of the tile to be set for collision.
             * @param stop The last index of the tile to be set for collision.
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The Tilemap Layer to act upon.
             * @param updateLayer If true, updates the current tiles on the layer. Set to false if no tiles have been placed for significant performance boost. Default true.
             */
            function SetCollisionBetween(start: number, stop: number, collides: boolean, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData, updateLayer?: boolean): void;

            /**
             * Sets collision on all tiles in the given layer, except for tiles that have an index specified in
             * the given array. The `collides` parameter controls if collision will be enabled (true) or
             * disabled (false). Tile indexes not currently in the layer are not affected.
             * @param indexes An array of tile indexes to exclude from the collision update. Tiles with these indexes will not have their collision state changed.
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The Tilemap Layer to act upon.
             */
            function SetCollisionByExclusion(indexes: number[], collides: boolean, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property
             * that matches the given properties object, its collision flag will be set. The `collides`
             * parameter controls if collision will be enabled (true) or disabled (false). Passing in
             * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that
             * has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can
             * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a
             * "types" property that matches any of those values, its collision flag will be updated.
             * @param properties An object with tile properties and corresponding values that should be checked.
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The Tilemap Layer to act upon.
             */
            function SetCollisionByProperty(properties: object, collides: boolean, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Sets collision on the tiles within a layer by checking each tile's collision group data
             * (typically defined in Tiled within the tileset collision editor). If any objects are found within
             * a tile's collision group, the tile's colliding information will be set. The `collides` parameter
             * controls if collision will be enabled (true) or disabled (false).
             * @param collides If true it will enable collision. If false it will clear collision.
             * @param recalculateFaces Whether or not to recalculate the tile faces after the update.
             * @param layer The Tilemap Layer to act upon.
             */
            function SetCollisionFromCollisionGroup(collides: boolean, recalculateFaces: boolean, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Internally used method to keep track of the tile indexes that collide within a layer. This
             * updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`.
             * @param tileIndex The tile index to set the collision boolean for.
             * @param collides Should the tile index collide or not?
             * @param layer The Tilemap Layer to act upon.
             */
            function SetLayerCollisionIndex(tileIndex: number, collides: boolean, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Internally used method to set the colliding state of a tile. This does not recalculate
             * interesting faces.
             * @param tile The Tile to set the collision on.
             * @param collides Should the tile collide or not? Default true.
             */
            function SetTileCollision(tile: Phaser.Tilemaps.Tile, collides?: boolean): void;

            /**
             * Sets a global collision callback for the given tile index within the layer. This will affect all
             * tiles on this layer that have the same index. If a callback is already set for the tile index it
             * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile
             * at a specific location on the map then see setTileLocationCallback.
             * @param indexes Either a single tile index, or an array of tile indexes to have a collision callback set for.
             * @param callback The callback that will be invoked when the tile is collided with.
             * @param callbackContext The context under which the callback is called.
             * @param layer The Tilemap Layer to act upon.
             */
            function SetTileIndexCallback(indexes: number | any[], callback: Function, callbackContext: object, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.
             * If a callback is already set for a tile it will be replaced. Set the callback to null to
             * remove it.
             * @param tileX The left most tile coordinate to use as the origin of the area.
             * @param tileY The top most tile coordinate to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param callback The callback that will be invoked when the tile is collided with.
             * @param callbackContext The context under which the callback is called.
             * @param layer The Tilemap Layer to act upon.
             */
            function SetTileLocationCallback(tileX: number, tileY: number, width: number, height: number, callback: Function, callbackContext: object, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given
             * layer. It will only randomize the tiles in that area, so if they're all the same nothing will
             * appear to have changed! This method only modifies tile indexes and does not change collision
             * information.
             * @param tileX The leftmost tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The topmost tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param layer The Tilemap Layer to act upon.
             */
            function Shuffle(tileX: number, tileY: number, width: number, height: number, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Returns the bounds in the given layer that are within the camera's viewport.
             * This is used internally by the cull tiles function.
             * @param layer The Tilemap Layer to act upon.
             * @param camera The Camera to run the cull check against.
             * @returns An object containing the `left`, `right`, `top` and `bottom` bounds.
             */
            function StaggeredCullBounds(layer: Phaser.Tilemaps.LayerData, camera: Phaser.Cameras.Scene2D.Camera): object;

            /**
             * Returns the tiles in the given layer that are within the camera's viewport. This is used internally.
             * @param layer The Tilemap Layer to act upon.
             * @param camera The Camera to run the cull check against.
             * @param outputArray An optional array to store the Tile objects within.
             * @param renderOrder The rendering order constant. Default 0.
             * @returns An array of Tile objects.
             */
            function StaggeredCullTiles(layer: Phaser.Tilemaps.LayerData, camera: Phaser.Cameras.Scene2D.Camera, outputArray?: any[], renderOrder?: number): Phaser.Tilemaps.Tile[];

            /**
             * Converts from staggered tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
             * layer's position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the world position from the tile coordinates.
             * @param layer The Tilemap Layer to act upon.
             * @returns The XY location in world coordinates.
             */
            function StaggeredTileToWorldXY(tileX: number, tileY: number, point: Phaser.Math.Vector2, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2;

            /**
             * Converts from staggered tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the
             * layer's position, scale and scroll.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param camera The Camera to use when factoring in scroll offset during the conversion.
             * @param layer The Tilemap Layer to act upon.
             * @returns The Y location in world coordinates.
             */
            function StaggeredTileToWorldY(tileY: number, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): number;

            /**
             * Converts from world XY coordinates (pixels) to staggered tile XY coordinates (tile units), factoring in the
             * layer's position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param worldX The x coordinate to be converted, in pixels, not tiles.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The XY location in tile units.
             */
            function StaggeredWorldToTileXY(worldX: number, worldY: number, snapToFloor: boolean, point: Phaser.Math.Vector2, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2;

            /**
             * Converts from world Y coordinates (pixels) to staggered tile Y coordinates (tile units), factoring in the
             * layer's position, scale and scroll.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The Y location in tile units.
             */
            function StaggeredWorldToTileY(worldY: number, snapToFloor: boolean, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): number;

            /**
             * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
             * `indexA` and swaps them with `indexB`. This only modifies the index and does not change collision
             * information.
             * @param indexA The tile index to search for and replace with `indexB`.
             * @param indexB The tile index to replace `indexA` with.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param layer The Tilemap Layer to act upon.
             */
            function SwapByIndex(indexA: number, indexB: number, tileX: number, tileY: number, width: number, height: number, layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the
             * layer's position, scale and scroll.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param camera The Camera to use when calculating the world position from the tile coordinates.
             * @param layer The Tilemap Layer to act upon.
             * @returns The world X coordinate, in pixels, corresponding to the given tile X coordinate.
             */
            function TileToWorldX(tileX: number, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): number;

            /**
             * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
             * layer's position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param tileX The x coordinate, in tiles, not pixels.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when converting the tile coordinates to world pixel values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The XY location in world coordinates.
             */
            function TileToWorldXY(tileX: number, tileY: number, point: Phaser.Math.Vector2, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2;

            /**
             * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the
             * layer's position, scale and scroll.
             * @param tileY The y coordinate, in tiles, not pixels.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The Y location in world coordinates.
             */
            function TileToWorldY(tileY: number, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): number;

            /**
             * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
             * specified layer. Each tile will receive a new index. New indexes are drawn from the given
             * weightedIndexes array. An example weighted array:
             * 
             * [
             *  { index: 6, weight: 4 },    // Probability of index 6 is 4 / 8
             *  { index: 7, weight: 2 },    // Probability of index 7 would be 2 / 8
             *  { index: 8, weight: 1.5 },  // Probability of index 8 would be 1.5 / 8
             *  { index: 26, weight: 0.5 }  // Probability of index 26 would be 0.5 / 8
             * ]
             * 
             * The probability of any index being chosen is (the index's weight) / (sum of all weights). This
             * method only modifies tile indexes and does not change collision information.
             * @param tileX The left most tile index (in tile coordinates) to use as the origin of the area.
             * @param tileY The top most tile index (in tile coordinates) to use as the origin of the area.
             * @param width How many tiles wide from the `tileX` index the area will be.
             * @param height How many tiles tall from the `tileY` index the area will be.
             * @param weightedIndexes An array of objects to randomly draw from during
             * randomization. They should be in the form: { index: 0, weight: 4 } or
             * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.
             * @param layer The Tilemap Layer to act upon.
             */
            function WeightedRandomize(tileX: number, tileY: number, width: number, height: number, weightedIndexes: object[], layer: Phaser.Tilemaps.LayerData): void;

            /**
             * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the
             * layer's position, scale and scroll.
             * @param worldX The x coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The X location in tile units.
             */
            function WorldToTileX(worldX: number, snapToFloor: boolean, camera: Phaser.Cameras.Scene2D.Camera | undefined, layer: Phaser.Tilemaps.LayerData): number;

            /**
             * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the
             * layer's position, scale and scroll. This will return a new Vector2 object or update the given
             * `point` object.
             * @param worldX The x coordinate to be converted, in pixels, not tiles.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param point A Vector2 to store the coordinates in. If not given a new Vector2 is created.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The XY location in tile units.
             */
            function WorldToTileXY(worldX: number, worldY: number, snapToFloor: boolean, point: Phaser.Math.Vector2, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.Math.Vector2;

            /**
             * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the
             * layer's position, scale and scroll.
             * @param worldY The y coordinate to be converted, in pixels, not tiles.
             * @param snapToFloor Whether or not to round the tile coordinate down to the nearest integer.
             * @param camera The Camera to use when calculating the tile index from the world values.
             * @param layer The Tilemap Layer to act upon.
             * @returns The Y location in tile units.
             */
            function WorldToTileY(worldY: number, snapToFloor: boolean, camera: Phaser.Cameras.Scene2D.Camera | undefined, layer: Phaser.Tilemaps.LayerData): number;

        }

        /**
         * Phaser Tilemap constants for orientation.
         */
        enum Orientation {
            /**
             * Orthogonal Tilemap orientation constant.
             */
            ORTHOGONAL,
            /**
             * Isometric Tilemap orientation constant.
             */
            ISOMETRIC,
            /**
             * Staggered Tilemap orientation constant.
             */
            STAGGERED,
            /**
             * Hexagonal Tilemap orientation constant.
             */
            HEXAGONAL,
        }

        /**
         * Phaser Tilemap constants for orientation.
         * 
         * To find out what each mode does please see [Phaser.Tilemaps.Orientation]{@link Phaser.Tilemaps.Orientation}.
         */
        type OrientationType = Phaser.Tilemaps.Orientation;

        /**
         * Stores all data associated with a single layer in a tilemap. When a map is parsed from
         * CSV, Tiled JSON, or other formats, each tile layer is converted into a LayerData instance
         * that holds the tile grid, layer dimensions, orientation, visibility, physics bodies,
         * tile callbacks, and any custom properties defined in the editor.
         * 
         * Both `Tilemap` and `TilemapLayer` hold a reference to LayerData and use it to look up
         * tile positions, perform collision checks, and drive rendering.
         */
        class LayerData {
            /**
             * 
             * @param config The Layer Data configuration object.
             */
            constructor(config?: Phaser.Types.Tilemaps.LayerDataConfig);

            /**
             * The name of the layer, if specified in Tiled.
             */
            name: string;

            /**
             * The id of the layer, as specified in the map data.
             * 
             * Note: This is not the index of the layer in the map data, but its actual ID in Tiled.
             */
            id: number;

            /**
             * The x offset of where to draw from the top left.
             */
            x: number;

            /**
             * The y offset of where to draw from the top left.
             */
            y: number;

            /**
             * The width of the layer in tiles.
             */
            width: number;

            /**
             * The height of the layer in tiles.
             */
            height: number;

            /**
             * The pixel width of the tiles.
             */
            tileWidth: number;

            /**
             * The pixel height of the tiles.
             */
            tileHeight: number;

            /**
             * The base tile width, in pixels. This is the tile width defined at the map level and
             * is used to calculate pixel coordinates and layer dimensions. It defaults to `tileWidth`
             * but may differ for layers that use a different tile size than the map default.
             */
            baseTileWidth: number;

            /**
             * The base tile height, in pixels. This is the tile height defined at the map level and
             * is used to calculate pixel coordinates and layer dimensions. It defaults to `tileHeight`
             * but may differ for layers that use a different tile size than the map default.
             */
            baseTileHeight: number;

            /**
             * The layer's orientation, necessary to be able to determine a tile's pixelX and pixelY as well as the layer's width and height.
             */
            orientation: Phaser.Tilemaps.OrientationType;

            /**
             * The width in pixels of the entire layer.
             */
            widthInPixels: number;

            /**
             * The height in pixels of the entire layer.
             */
            heightInPixels: number;

            /**
             * The alpha value of the layer.
             */
            alpha: number;

            /**
             * Is the layer visible or not?
             */
            visible: boolean;

            /**
             * Layer specific properties (can be specified in Tiled).
             */
            properties: object[];

            /**
             * Tile ID index map.
             */
            indexes: any[];

            /**
             * Tile Collision ID index map.
             */
            collideIndexes: any[];

            /**
             * An array of tile location callbacks registered for this layer. Each entry maps a tile
             * index to a callback function that is invoked when a physics-enabled Game Object overlaps
             * or collides with that tile.
             */
            callbacks: any[];

            /**
             * An array of physics bodies.
             */
            bodies: any[];

            /**
             * A 2D array of Tile objects representing the tile grid for this layer. Indexed as `data[row][col]`,
             * where each entry is a Tile instance (or null for an empty cell).
             */
            data: Phaser.Tilemaps.Tile[][];

            /**
             * A reference to the Tilemap layer that owns this data.
             */
            tilemapLayer: Phaser.Tilemaps.TilemapLayer;

            /**
             * The length of the horizontal sides of the hexagon.
             * Only used for hexagonal orientation Tilemaps.
             */
            hexSideLength: number;

            /**
             * The Stagger Axis as defined in Tiled.
             * 
             * Only used for hexagonal orientation Tilemaps.
             */
            staggerAxis: string;

            /**
             * The Stagger Index as defined in Tiled.
             * 
             * Either 'odd' or 'even'.
             * 
             * Only used for hexagonal orientation Tilemaps.
             */
            staggerIndex: string;

        }

        /**
         * A class for representing data about a map. Maps are parsed from CSV, Tiled, etc. into this
         * format. A Tilemap object gets a copy of this data and then unpacks the needed properties into
         * itself.
         */
        class MapData {
            /**
             * 
             * @param config The Map configuration object.
             */
            constructor(config?: Phaser.Types.Tilemaps.MapDataConfig);

            /**
             * The key in the Phaser cache that corresponds to the loaded tilemap data.
             */
            name: string;

            /**
             * The width of the entire tilemap, in tiles.
             */
            width: number;

            /**
             * The height of the entire tilemap, in tiles.
             */
            height: number;

            /**
             * If the map is infinite or not.
             */
            infinite: boolean;

            /**
             * The width of the tiles, in pixels.
             */
            tileWidth: number;

            /**
             * The height of the tiles, in pixels.
             */
            tileHeight: number;

            /**
             * The width in pixels of the entire tilemap.
             */
            widthInPixels: number;

            /**
             * The height in pixels of the entire tilemap.
             */
            heightInPixels: number;

            /**
             * The format of the map data.
             */
            format: number;

            /**
             * The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'.
             */
            orientation: Phaser.Tilemaps.OrientationType;

            /**
             * Determines the draw order of the tilemap. Default is right-down.
             * 
             * 0, or 'right-down'
             * 1, or 'left-down'
             * 2, or 'right-up'
             * 3, or 'left-up'
             */
            renderOrder: string;

            /**
             * The version of the map data (as specified in Tiled).
             */
            version: string;

            /**
             * Map specific properties (can be specified in Tiled).
             */
            properties: object;

            /**
             * An array of all the layers belonging to this MapData.
             */
            layers: Phaser.Tilemaps.LayerData[] | Phaser.Tilemaps.ObjectLayer;

            /**
             * An array of Tiled Image Layers.
             */
            images: any[];

            /**
             * An array of Tiled Object Layers.
             */
            objects: Phaser.Types.Tilemaps.ObjectLayerConfig[];

            /**
             * An object containing collision data for the map. Only populated when the map is created with a physics system enabled.
             */
            collision: object;

            /**
             * An array of Tilesets.
             */
            tilesets: Phaser.Tilemaps.Tileset[];

            /**
             * The collection of images the map uses (specified in Tiled).
             */
            imageCollections: any[];

            /**
             * An array of tile instances.
             */
            tiles: any[];

            /**
             * The length of the horizontal sides of the hexagon.
             * 
             * Only used for hexagonal orientation Tilemaps.
             */
            hexSideLength: number;

            /**
             * The Stagger Axis as defined in Tiled.
             * 
             * Only used for hexagonal orientation Tilemaps.
             */
            staggerAxis: string;

            /**
             * The Stagger Index as defined in Tiled.
             * 
             * Either 'odd' or 'even'.
             * 
             * Only used for hexagonal orientation Tilemaps.
             */
            staggerIndex: string;

        }

        /**
         * Represents an object layer from a Tiled map, as created in the Tiled map editor. Object layers
         * in Tiled are used to place non-tile elements such as spawn points, collision zones, triggers,
         * paths, and other game-specific markers. Unlike tile layers, object layers store free-form
         * objects (rectangles, ellipses, polygons, polylines, tiles, and text) at arbitrary positions.
         * 
         * Instances of this class are created automatically by Phaser when parsing Tiled map data via
         * `Phaser.Tilemaps.ParseToTilemap` or `scene.make.tilemap`. You can retrieve an ObjectLayer from
         * a Tilemap using `tilemap.getObjectLayer(name)`.
         * 
         * This class mirrors the structure of a Tiled object layer, except:
         *  - "x" & "y" properties are ignored since these cannot be changed in Tiled.
         *  - "offsetx" & "offsety" are applied to the individual object coordinates directly, so they
         *    are ignored as well.
         *  - "draworder" is ignored.
         */
        class ObjectLayer {
            /**
             * 
             * @param config The data for the layer from the Tiled JSON object.
             */
            constructor(config?: Phaser.Types.Tilemaps.ObjectLayerConfig);

            /**
             * The name of the Object Layer.
             */
            name: string;

            /**
             * The id of the object layer, as specified in the map data.
             */
            id: number;

            /**
             * The opacity of the layer, between 0 and 1.
             */
            opacity: number;

            /**
             * The custom properties defined on the Object Layer, keyed by their name.
             */
            properties: object;

            /**
             * The type of each custom property defined on the Object Layer, keyed by its name.
             */
            propertyTypes: object;

            /**
             * The type of the layer, which should be `objectgroup`.
             */
            type: string;

            /**
             * Whether the layer is shown (`true`) or hidden (`false`).
             */
            visible: boolean;

            /**
             * An array of all objects on this Object Layer.
             * 
             * Each Tiled object corresponds to a JavaScript object in this array. It has an `id` (unique),
             * `name` (as assigned in Tiled), `type` (as assigned in Tiled), `rotation` (in clockwise degrees),
             * `properties` (if any), `visible` state (`true` if visible, `false` otherwise),
             * `x` and `y` coordinates (in pixels, relative to the tilemap), and a `width` and `height` (in pixels).
             * 
             * An object tile has a `gid` property (GID of the represented tile), a `flippedHorizontal` property,
             * a `flippedVertical` property, and `flippedAntiDiagonal` property.
             * The {@link http://docs.mapeditor.org/en/latest/reference/tmx-map-format/|Tiled documentation} contains
             * information on flipping and rotation.
             * 
             * Polylines have a `polyline` property, which is an array of objects corresponding to points,
             * where each point has an `x` property and a `y` property. Polygons have an identically structured
             * array in their `polygon` property. Text objects have a `text` property with the text's properties.
             * 
             * Rectangles and ellipses have a `rectangle` or `ellipse` property set to `true`.
             */
            objects: Phaser.Types.Tilemaps.TiledObject[];

        }

        namespace Parsers {
            /**
             * Converts a Tilemap orientation string into the corresponding `Phaser.Tilemaps.OrientationType`
             * constant. Recognized values are `'isometric'`, `'staggered'`, and `'hexagonal'`. Any other
             * string, including `'orthogonal'`, will return the orthogonal orientation constant, which is
             * the default grid-based orientation used by most tilemaps.
             * 
             * The comparison is case-insensitive.
             * @param orientation The orientation type as a string.
             * @returns The Tilemap Orientation type.
             */
            function FromOrientationString(orientation?: string): Phaser.Tilemaps.OrientationType;

            /**
             * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format
             * is found, returns `null`. When loading from CSV or a 2D array, you should specify the tileWidth &
             * tileHeight. When parsing from a map from Tiled, the tileWidth & tileHeight will be pulled from
             * the map data.
             * @param name The name of the tilemap, used to set the name on the MapData.
             * @param mapFormat The format of the map data. Must be one of the `Phaser.Tilemaps.Formats` constants, such as `Phaser.Tilemaps.Formats.TILED_JSON`.
             * @param data The raw map data to parse. A 2D array of tile indices, a CSV string, or a Tiled JSON object, depending on the format.
             * @param tileWidth The width of a tile in pixels. Required for 2D array and CSV, but
             * ignored for Tiled JSON.
             * @param tileHeight The height of a tile in pixels. Required for 2D array and CSV, but
             * ignored for Tiled JSON.
             * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map
             * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty
             * location will get a Tile object with an index of -1. If you've a large sparsely populated map and
             * the tile data doesn't need to change then setting this value to `true` will help with memory
             * consumption. However if your map is small or you need to update the tiles dynamically, then leave
             * the default value set.
             * @returns The created `MapData` object, or `null` if the map format was not recognized.
             */
            function Parse(name: string, mapFormat: number, data: number[][] | string | object, tileWidth: number, tileHeight: number, insertNull: boolean): Phaser.Tilemaps.MapData;

            /**
             * Parses a 2D array of tile indexes into a new MapData object with a single layer.
             * @param name The name of the tilemap, used to set the name on the MapData.
             * @param data A 2D array of tile indexes.
             * @param tileWidth The width of a tile in pixels.
             * @param tileHeight The height of a tile in pixels.
             * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map
             * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty
             * locations will get a Tile object with an index of -1. If you have a large sparsely populated map and
             * the tile data doesn't need to change then setting this value to `true` will help with memory
             * consumption. However if your map is small or you need to update the tiles dynamically, then leave
             * the default value set.
             * @returns The MapData object.
             */
            function Parse2DArray(name: string, data: number[][], tileWidth: number, tileHeight: number, insertNull: boolean): Phaser.Tilemaps.MapData;

            /**
             * Parses a CSV string of tile indexes into a new MapData object with a single layer.
             * @param name The name of the tilemap, used to set the name on the MapData.
             * @param data CSV string of tile indexes.
             * @param tileWidth The width of a tile in pixels.
             * @param tileHeight The height of a tile in pixels.
             * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map
             * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty
             * location will get a Tile object with an index of -1. If you've a large sparsely populated map and
             * the tile data doesn't need to change then setting this value to `true` will help with memory
             * consumption. However if your map is small or you need to update the tiles dynamically, then leave
             * the default value set.
             * @returns The resulting MapData object.
             */
            function ParseCSV(name: string, data: string, tileWidth: number, tileHeight: number, insertNull: boolean): Phaser.Tilemaps.MapData;

            namespace Impact {
                /**
                 * Parses all tilemap layers in an Impact JSON object into new LayerData objects.
                 * @param json The Impact JSON object.
                 * @param insertNull Controls how empty tiles (those with an index of -1) are stored in
                 * the LayerData. If `true`, empty tile positions are stored as `null`. If `false`, a Tile object
                 * with an index of -1 is created for each empty position instead.
                 * @returns - An array of LayerData objects, one for each entry injson.layer.
                 */
                function ParseTileLayers(json: object, insertNull: boolean): Phaser.Tilemaps.LayerData[];

                /**
                 * Parses all unique tilesets from an Impact (Weltmeister) tilemap JSON object and returns them as
                 * an array of Tileset instances. Each layer in the JSON is inspected for a tileset name; duplicate
                 * names and collision layers (which have a blank tileset name) are ignored. Tile IDs within Impact
                 * tilesets are relative to the tileset rather than globally unique, and tilesets have no margin or
                 * padding, so each Tileset is created with those values set to zero.
                 * @param json The Impact JSON data.
                 * @returns An array of Tilesets.
                 */
                function ParseTilesets(json: object): any[];

                /**
                 * Parses a Weltmeister JSON object into a new MapData object.
                 * @param name The name of the tilemap, used to set the name on the MapData.
                 * @param json The Weltmeister JSON object.
                 * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map
                 * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty
                 * location will get a Tile object with an index of -1. If you've a large sparsely populated map and
                 * the tile data doesn't need to change then setting this value to `true` will help with memory
                 * consumption. However if your map is small or you need to update the tiles dynamically, then leave
                 * the default value set.
                 * @returns The created MapData object, or `null` if the data can't be parsed.
                 */
                function ParseWeltmeister(name: string, json: object, insertNull: boolean): Phaser.Tilemaps.MapData | null;

            }

            namespace Tiled {
                /**
                 * Iterates over all tiles in every layer of the given MapData and synchronizes each tile with its
                 * parent tileset. For each valid tile, this function ensures the tile's dimensions match those
                 * defined by its tileset (which is important for maps that use multiple tilesets with different
                 * tile sizes), and then merges any custom properties defined for that tile type in the tileset
                 * onto the tile instance. This is called as part of the Tiled map parsing pipeline to ensure that
                 * per-tile-type metadata exported from the Tiled editor is available on the individual tile objects
                 * at runtime.
                 * @param mapData The Map Data object.
                 */
                function AssignTileProperties(mapData: Phaser.Tilemaps.MapData): void;

                /**
                 * Decodes a base-64 encoded string, as used by Tiled when exporting tilemap layer data
                 * with base-64 encoding. The binary data is interpreted as a sequence of little-endian
                 * unsigned 32-bit integers, each representing a tile GID (Global Tile ID) in the layer.
                 * @param data The base-64 encoded string to decode.
                 * @returns Array of unsigned 32-bit integers representing the decoded tile GIDs.
                 */
                function Base64Decode(data: object): any[];

                /**
                 * Builds a lookup index that maps each global tile ID (GID) to its pixel position within its
                 * tileset image and the index of that tileset within the map data. The returned array is sparse,
                 * keyed by GID, where each entry is a three-element array of the form `[x, y, tilesetIndex]`.
                 * The x and y values are the pixel coordinates of the top-left corner of the tile within its
                 * tileset image, accounting for tile margin and spacing. Any image collections in the map data
                 * are also converted into Tileset objects and added to `mapData.tilesets` before the index is built.
                 * @param mapData The Map Data object.
                 * @returns A sparse array keyed by global tile ID (GID), where each entry is `[x, y, tilesetIndex]`.
                 */
                function BuildTilesetIndex(mapData: Phaser.Tilemaps.MapData | Phaser.Tilemaps.Tilemap): any[];

                /**
                 * Parses a Tiled group layer and builds an inherited state object for use when processing
                 * its child layers. Group layers in Tiled can nest other layers and accumulate properties
                 * such as name prefix, opacity, visibility, and positional offset. This function combines
                 * the given group's own properties with those of its parent state to produce a new state
                 * that child layers will inherit.
                 * 
                 * If no group is provided, a default root state is returned with neutral values (full opacity,
                 * visible, zero offset), suitable for use at the top level of the layer hierarchy.
                 * @param json The Tiled JSON object.
                 * @param group The current group layer from the Tiled JSON file.
                 * @param parentState The inherited state of the parent group, as returned by a previous call to this function. Required when `group` is provided.
                 * @returns A group state object containing the accumulated name prefix, opacity, visibility, and x/y position offsets for use when parsing child layers.
                 */
                function CreateGroupLayer(json: object, group?: object, parentState?: object): object;

                /**
                 * Parses a Tiled Global Tile ID (GID), extracting the tile index and any flip flags encoded
                 * in the high bits of the value. In the Tiled TMX format, the top three bits of a GID are used
                 * to indicate horizontal flip, vertical flip, and anti-diagonal flip (i.e. 90-degree rotation).
                 * 
                 * This function strips those flag bits from the GID to recover the raw tile index, then
                 * interprets all eight possible combinations of the three flags and converts them into a
                 * rotation value (in radians) and a boolean `flipped` state that Phaser can apply directly
                 * to a tile when rendering.
                 * 
                 * See the Tiled documentation on tile flipping for the full flag specification:
                 * http://docs.mapeditor.org/en/latest/reference/tmx-map-format/
                 * @param gid A Tiled GID, potentially with flip flags encoded in the high bits.
                 * @returns A GIDData object containing the raw tile index, the three individual flip flags, and the derived rotation (in radians) and flipped state.
                 */
                function ParseGID(gid: number): Phaser.Types.Tilemaps.GIDData;

                /**
                 * Parses a Tiled JSON object and extracts all image layers, including those nested inside
                 * group layers. Each image layer is returned as a plain object with its name, image source,
                 * computed position (accounting for group and layer offsets), combined opacity, visibility, and
                 * custom properties inherited from the Tiled layer definition.
                 * @param json The Tiled JSON object.
                 * @returns An array of objects, one per image layer, each containing `name`, `image`, `x`, `y`, `alpha`, `visible`, and `properties` fields.
                 */
                function ParseImageLayers(json: object): any[];

                /**
                 * Parses a Tiled JSON object into a new MapData object. The source JSON is deep copied before
                 * processing. This function handles orthogonal, isometric, staggered, and hexagonal map
                 * orientations. For hexagonal maps it also calculates the pixel dimensions based on the hex side
                 * length and stagger axis. It parses all tile layers, image layers, object layers, and tilesets
                 * found in the JSON, builds the tileset index, and assigns custom tile properties before returning
                 * the fully populated MapData instance.
                 * @param name The name of the tilemap, used to set the name on the MapData.
                 * @param source The original Tiled JSON object. This is deep copied by this function.
                 * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map
                 * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty
                 * location will get a Tile object with an index of -1. If you have a large sparsely populated map and
                 * the tile data doesn't need to change then setting this value to `true` will help with memory
                 * consumption. However if your map is small or you need to update the tiles dynamically, then leave
                 * the default value set.
                 * @returns The created MapData object, or `null` if the data can't be parsed.
                 */
                function ParseJSONTiled(name: string, source: object, insertNull: boolean): Phaser.Tilemaps.MapData | null;

                /**
                 * Convert a Tiled object to an internal parsed object normalising and copying properties over, while applying optional x and y offsets. The parsed object will always have the properties `id`, `name`, `type`, `rotation`, `properties`, `visible`, `x`, `y`, `width` and `height`. Other properties will be added according to the object type (such as text, polyline, gid etc.)
                 * @param tiledObject The raw Tiled object data, as exported from the Tiled map editor.
                 * @param offsetX Optional additional offset to apply to the object's x property. Defaults to 0. Default 0.
                 * @param offsetY Optional additional offset to apply to the object's y property. Defaults to 0. Default 0.
                 * @returns The parsed object containing properties read from the Tiled object according to its type with x and y values updated according to the given offsets.
                 */
                function ParseObject(tiledObject: object, offsetX?: number, offsetY?: number): object;

                /**
                 * Parses all object layers from a Tiled JSON tilemap into an array of `ObjectLayer` objects.
                 * 
                 * Iterates through every layer in the map, including layers nested inside Tiled group layers,
                 * and converts each `objectgroup` type layer into an `ObjectLayer` instance. Opacity and
                 * visibility values are inherited from parent group layers and multiplied down to their children.
                 * Non-object layers (tile layers, image layers, etc.) and non-objectgroup group members are
                 * skipped. The resulting array contains one entry per object layer found at any depth of nesting.
                 * @param json The Tiled JSON object.
                 * @returns An array of all object layers in the tilemap as `ObjectLayer`s.
                 */
                function ParseObjectLayers(json: object): any[];

                /**
                 * Parses all tile layers from a Tiled JSON object and returns them as an array of LayerData
                 * objects. Each tile layer in the JSON becomes one LayerData instance populated with Tile objects.
                 * 
                 * The function walks the full layer hierarchy, descending into Tiled group layers so that nested
                 * tile layers are included. Group transform properties (offset, opacity, visibility) are
                 * accumulated and applied to every child layer. Compressed tile data is not supported and any
                 * compressed layer will be skipped with a console warning. Layers encoded as uncompressed Base64
                 * are decoded automatically before processing.
                 * 
                 * Both finite and infinite (chunked) Tiled maps are handled. For hexagonal maps the stagger axis,
                 * stagger index, and hex side length are read from the JSON and stored on each LayerData, and the
                 * pixel dimensions of the layer are calculated accordingly.
                 * 
                 * Each tile's flip flags and rotation are derived from the GID bit-packing that Tiled uses, so
                 * FlippedHorizontal, FlippedVertical, and FlippedAntiDiagonal are translated into the tile's
                 * `flipX` and `rotation` properties.
                 * @param json The Tiled JSON object.
                 * @param insertNull Controls how empty tiles, tiles with an index of -1, in the map
                 * data are handled (see {@link Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled}).
                 * @returns - An array of LayerData objects, one for each entry injson.layers with the type 'tilelayer'.
                 */
                function ParseTileLayers(json: object, insertNull: boolean): Phaser.Tilemaps.LayerData[];

                /**
                 * Parses the tilesets and image collections from a Tiled JSON map, converting them into
                 * Phaser `Tileset` and `ImageCollection` instances. Handles both Tiled 1.x and Tiled 2.x
                 * formats, including per-tile properties, object groups, animation data, Wang sets, and
                 * typed tiles. External tilesets (those with a `source` property) are not supported and
                 * will produce a warning.
                 * @param json The Tiled JSON data.
                 * @returns An object containing the tileset and image collection data.
                 */
                function ParseTilesets(json: object): object;

                /**
                 * Parses out the Wangset information from Tiled 1.1.5+ map data, if present.
                 * 
                 * Since a given tile can be in more than one wangset, the resulting properties
                 * are nested. `tile.data.wangid[someWangsetName]` will return the array-based wang id in
                 * this implementation.
                 * 
                 * Note that we're not guaranteed that there will be any 'normal' tiles if the only
                 * things in the tileset are wangtile definitions, so this has to be parsed separately.
                 * 
                 * See https://doc.mapeditor.org/en/latest/manual/using-wang-tiles/ for more information.
                 * @param wangsets The array of wangset objects (parsed from JSON)
                 * @param datas The object into which wangset data from Tiled is stored, keyed by tile ID.
                 */
                function ParseWangsets(wangsets: object[], datas: object): void;

            }

        }

        /**
         * Orthogonal Tilemap orientation constant.
         */
        const ORTHOGONAL: number;

        /**
         * Isometric Tilemap orientation constant.
         */
        const ISOMETRIC: number;

        /**
         * Staggered Tilemap orientation constant.
         */
        const STAGGERED: number;

        /**
         * Hexagonal Tilemap orientation constant.
         */
        const HEXAGONAL: number;

    }

    namespace Time {
        /**
         * The Clock is a Scene plugin that manages time and schedules Timer Events for its parent Scene.
         * 
         * You can use it to run callbacks after a delay, on a repeating interval, or in a loop, all
         * governed by the Scene's time rather than the system clock. This means the Clock respects
         * Scene pausing, time scaling, and shutdown lifecycle automatically.
         * 
         * Access it via `this.time` inside a Scene. For example:
         * 
         * ```javascript
         * this.time.delayedCall(1000, this.onTimer, [], this);
         * ```
         * 
         * The Clock's `timeScale` property allows you to speed up or slow down all Timer Events
         * belonging to it independently of the rest of the game.
         */
        class Clock {
            /**
             * 
             * @param scene The Scene which owns this Clock.
             */
            constructor(scene: Phaser.Scene);

            /**
             * The Scene which owns this Clock.
             */
            scene: Phaser.Scene;

            /**
             * The Scene Systems object of the Scene which owns this Clock.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * The current time of the Clock, in milliseconds.
             * 
             * If accessed externally, this is equivalent to the `time` parameter normally passed to a Scene's `update` method.
             */
            now: number;

            /**
             * The time the Clock (and Scene) started, in milliseconds.
             * 
             * This can be compared to the `time` parameter passed to a Scene's `update` method.
             */
            startTime: number;

            /**
             * The scale of the Clock's time delta.
             * 
             * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Clock and anything which uses it, such as its Timer Events. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing the Clock.
             */
            timeScale: number;

            /**
             * Whether the Clock is paused (`true`) or active (`false`).
             * 
             * When paused, the Clock will not update any of its Timer Events, thus freezing time.
             */
            paused: boolean;

            /**
             * Creates a Timer Event and adds it to this Clock at the start of the next frame.
             * 
             * You can pass in either a `TimerEventConfig` object, from which a new `TimerEvent` will
             * be created, or you can pass in a `TimerEvent` instance.
             * 
             * If passing an instance please make sure that this instance hasn't been used before.
             * If it has ever entered a 'completed' state then it will no longer be suitable to
             * run again.
             * 
             * Also, if the `TimerEvent` instance is being used by _another_ Clock (in another Scene)
             * it will still be updated by that Clock as well, so be careful when using this feature.
             * @param config The configuration for the Timer Event, or an existing Timer Event object.
             * @returns The Timer Event which was created, or passed in.
             */
            addEvent(config: Phaser.Time.TimerEvent | Phaser.Types.Time.TimerEventConfig): Phaser.Time.TimerEvent;

            /**
             * Creates a Timer Event and adds it to the Clock at the start of the frame.
             * 
             * This is a shortcut for {@link #addEvent} which can be shorter and is compatible with the syntax of the GreenSock Animation Platform (GSAP).
             * @param delay The delay of the function call, in milliseconds.
             * @param callback The function to call after the delay expires.
             * @param args The arguments to call the function with.
             * @param callbackScope The scope (`this` object) to call the function with.
             * @returns The Timer Event which was created.
             */
            delayedCall(delay: number, callback: Function, args?: any[], callbackScope?: any): Phaser.Time.TimerEvent;

            /**
             * Clears and recreates the array of pending Timer Events.undefined
             * @returns - This Clock instance.
             */
            clearPendingEvents(): this;

            /**
             * Removes the given Timer Event, or an array of Timer Events, from this Clock.
             * 
             * The events are removed from all internal lists (active, pending and removal),
             * freeing the event up to be re-used.
             * @param events The Timer Event, or an array of Timer Events, to remove from this Clock.
             * @returns - This Clock instance.
             */
            removeEvent(events: Phaser.Time.TimerEvent | Phaser.Time.TimerEvent[]): this;

            /**
             * Schedules all active Timer Events for removal at the start of the frame.undefined
             * @returns - This Clock instance.
             */
            removeAllEvents(): this;

            /**
             * Updates the arrays of active and pending Timer Events. Called at the start of the frame.
             */
            preUpdate(): void;

            /**
             * Updates the Clock's internal time and all of its Timer Events.
             * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
             * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
             */
            update(time: number, delta: number): void;

        }

        /**
         * A Timeline is a way to schedule events to happen at specific times in the future.
         * 
         * You can think of it as an event sequencer for your game, allowing you to schedule the
         * running of callbacks, events and other actions at specific times in the future.
         * 
         * A Timeline is a Scene level system, meaning you can have as many Timelines as you like, each
         * belonging to a different Scene. You can also have multiple Timelines running at the same time.
         * 
         * If the Scene is paused, the Timeline will also pause. If the Scene is destroyed, the Timeline
         * will be automatically destroyed. However, you can control the Timeline directly, pausing,
         * resuming and stopping it at any time.
         * 
         * Create an instance of a Timeline via the Game Object Factory:
         * 
         * ```js
         * const timeline = this.add.timeline();
         * ```
         * 
         * The Timeline always starts paused. You must call `play` on it to start it running.
         * 
         * You can also pass in a configuration object on creation, or an array of them:
         * 
         * ```js
         * const timeline = this.add.timeline({
         *     at: 1000,
         *     run: () => {
         *         this.add.sprite(400, 300, 'logo');
         *     }
         * });
         * 
         * timeline.play();
         * ```
         * 
         * In this example we sequence a few different events:
         * 
         * ```js
         * const timeline = this.add.timeline([
         *     {
         *         at: 1000,
         *         run: () => { this.logo = this.add.sprite(400, 300, 'logo'); },
         *         sound: 'TitleMusic'
         *     },
         *     {
         *         at: 2500,
         *         tween: {
         *             targets: this.logo,
         *             y: 600,
         *             yoyo: true
         *         },
         *         sound: 'Explode'
         *     },
         *     {
         *         at: 8000,
         *         event: 'HURRY_PLAYER',
         *         target: this.background,
         *         set: {
         *             tint: 0xff0000
         *         }
         *     }
         * ]);
         * 
         * timeline.play();
         * ```
         * 
         * The Timeline can also be looped with the repeat method:
         * 
         * ```js
         * timeline.repeat().play();
         * ```
         * 
         * There are lots of options available to you via the configuration object. See the
         * {@link Phaser.Types.Time.TimelineEventConfig} typedef for more details.
         */
        class Timeline extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param scene The Scene which owns this Timeline.
             * @param config The configuration object for this Timeline Event, or an array of them.
             */
            constructor(scene: Phaser.Scene, config?: Phaser.Types.Time.TimelineEventConfig | Phaser.Types.Time.TimelineEventConfig[]);

            /**
             * The Scene to which this Timeline belongs.
             */
            scene: Phaser.Scene;

            /**
             * A reference to the Scene Systems.
             */
            systems: Phaser.Scenes.Systems;

            /**
             * The elapsed time counter.
             * 
             * Treat this as read-only.
             */
            elapsed: number;

            /**
             * The Timeline's delta time scale.
             * 
             * Values higher than 1 increase the speed of time, while values smaller than 1 decrease it.
             * A value of 0 freezes time and is effectively equivalent to pausing the Timeline.
             * 
             * This doesn't affect the delta time scale of any Tweens created by the Timeline.
             * You will have to set the `timeScale` of each Tween or the Tween Manager if you want them to match.
             */
            timeScale: number;

            /**
             * Whether the Timeline is paused (`true`) or active (`false`).
             * 
             * When paused, the Timeline will not run any of its actions.
             * 
             * By default a Timeline is always paused and should be started by
             * calling the `Timeline.play` method.
             * 
             * You can use the `Timeline.pause` and `Timeline.resume` methods to control
             * this value in a chainable way.
             */
            paused: boolean;

            /**
             * Whether the Timeline is complete (`true`) or not (`false`).
             * 
             * A Timeline is considered complete when all of its events have been run.
             * 
             * If you wish to reset a Timeline after it has completed, you can do so
             * by calling the `Timeline.reset` method.
             * 
             * You can also use the `Timeline.stop` method to stop a running Timeline,
             * at any point, without resetting it.
             */
            complete: boolean;

            /**
             * The total number of events that have been run.
             * 
             * This value is reset to zero if the Timeline is restarted.
             * 
             * Treat this as read-only.
             */
            totalComplete: number;

            /**
             * The number of times this timeline should loop.
             * 
             * If this value is -1 or any negative number, this Timeline will loop indefinitely.
             */
            loop: number;

            /**
             * The number of times this Timeline has looped.
             * 
             * This value is incremented each loop if looping is enabled.
             */
            iteration: number;

            /**
             * An array of all the Timeline Events.
             */
            events: Phaser.Types.Time.TimelineEvent[];

            /**
             * Updates the elapsed time counter, if this Timeline is not paused.
             * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
             * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
             */
            preUpdate(time: number, delta: number): void;

            /**
             * Called automatically by the Scene update step.
             * 
             * Iterates through all of the Timeline Events and checks to see if they should be run.
             * 
             * If they should be run, then the event's callbacks and actions are invoked.
             * 
             * If the `TimelineEvent.once` property is `true` then the event is removed from the Timeline.
             * 
             * If the `TimelineEvent.event` property is set then the Timeline emits that event.
             * 
             * If the `TimelineEvent.run` property is set then the Timeline invokes that method.
             * 
             * If the `TimelineEvent.loop` property is set then the Timeline invokes that method when repeated.
             * 
             * If the `TimelineEvent.target` property is set then the Timeline invokes the `run` method on that target.
             * @param time The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
             * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
             */
            update(time: number, delta: number): void;

            /**
             * Starts this Timeline running.
             * 
             * If the Timeline is already running and the `fromStart` parameter is `true`,
             * then calling this method will reset the Timeline events as incomplete.
             * 
             * If you wish to resume a paused Timeline, then use the `Timeline.resume` method instead.
             * @param fromStart Reset this Timeline back to the start before playing. Default true.
             * @returns This Timeline instance.
             */
            play(fromStart?: boolean): this;

            /**
             * Pauses this Timeline.
             * 
             * To resume it again, call the `Timeline.resume` method or set the `Timeline.paused` property to `false`.
             * 
             * If the Timeline is paused while processing the current game step, then it
             * will carry on with all events that are due to run during that step and pause
             * from the next game step.
             * 
             * Note that if any Tweens have been started prior to calling this method, they will **not** be paused as well.undefined
             * @returns This Timeline instance.
             */
            pause(): this;

            /**
             * Repeats this Timeline.
             * 
             * If the value for `amount` is positive, the Timeline will repeat that many additional times.
             * For example a value of 1 will actually run this Timeline twice.
             * 
             * Passing `false` is equivalent to 0 (no additional repeats). Passing `true`, `undefined`, or a negative number will repeat indefinitely.
             * 
             * If this Timeline had any events set to `once` that have already been removed,
             * they will **not** be repeated each loop.
             * @param amount Amount of times to repeat, if `true` or negative it will be infinite. Default -1.
             * @returns This Timeline instance.
             */
            repeat(amount?: number | boolean): this;

            /**
             * Resumes this Timeline from a paused state.
             * 
             * The Timeline will carry on from where it left off.
             * 
             * If you need to reset the Timeline to the start, then call the `Timeline.reset` method.undefined
             * @returns This Timeline instance.
             */
            resume(): this;

            /**
             * Stops this Timeline.
             * 
             * This will set the `paused` and `complete` properties to `true`.
             * 
             * If you wish to reset the Timeline to the start, then call the `Timeline.reset` method.undefined
             * @returns This Timeline instance.
             */
            stop(): this;

            /**
             * Resets this Timeline back to the start.
             * 
             * This will set the elapsed time to zero and set all events to be incomplete.
             * 
             * If the Timeline had any events that were set to `once` that have already
             * been removed, they will **not** be present again after calling this method.
             * 
             * If the Timeline isn't currently running (i.e. it's paused or complete) then
             * calling this method resets those states, the same as calling `Timeline.play(true)`.
             * 
             * Any Tweens that were currently running as a result of this Timeline will be stopped.
             * @param loop Set to `true` to preserve the loop iteration counters. Used internally when the Timeline auto-repeats. Leave as `false` to perform a full reset. Default false.
             * @returns This Timeline instance.
             */
            reset(loop?: boolean): this;

            /**
             * Adds one or more events to this Timeline.
             * 
             * You can pass in a single configuration object, or an array of them:
             * 
             * ```js
             * const timeline = this.add.timeline({
             *     at: 1000,
             *     run: () => {
             *         this.add.sprite(400, 300, 'logo');
             *     }
             * });
             * ```
             * @param config The configuration object for this Timeline Event, or an array of them.
             * @returns This Timeline instance.
             */
            add(config: Phaser.Types.Time.TimelineEventConfig | Phaser.Types.Time.TimelineEventConfig[]): this;

            /**
             * Removes all events from this Timeline, resets the elapsed time to zero
             * and pauses the Timeline.
             * 
             * Any Tweens that were currently running as a result of this Timeline will be stopped.undefined
             * @returns This Timeline instance.
             */
            clear(): this;

            /**
             * Returns `true` if this Timeline is currently playing.
             * 
             * A Timeline is playing if it is not paused and not complete.undefined
             * @returns `true` if this Timeline is playing, otherwise `false`.
             */
            isPlaying(): boolean;

            /**
             * Returns a number between 0 and 1 representing the progress of this Timeline.
             * 
             * A value of 0 means the Timeline has just started, 0.5 means it's half way through,
             * and 1 means it's complete.
             * 
             * If the Timeline has no events, or all events have been removed, this will return `NaN`.
             * 
             * If the Timeline is paused, this will return the progress value at the time it was paused.
             * 
             * Note that the value returned is based on the number of events that have been completed,
             * not the 'duration' of the events (as this is unknown to the Timeline).undefined
             * @returns A number between 0 and 1 representing the progress of this Timeline.
             */
            getProgress(): number;

            /**
             * Destroys this Timeline.
             * 
             * This will remove all events from the Timeline and stop it from processing.
             * 
             * Any Tweens that were currently running as a result of this Timeline will be stopped.
             * 
             * This method is called automatically when the Scene shuts down, but you may
             * also call it directly should you need to destroy the Timeline earlier.
             */
            destroy(): void;

        }

        /**
         * A Timer Event represents a delayed function call. It's managed by a Scene's {@link Clock} and will call its function after a set amount of time has passed. The Timer Event can optionally repeat - i.e. call its function multiple times before finishing, or loop indefinitely.
         * 
         * Because it's managed by a Clock, a Timer Event is based on game time, will be affected by its Clock's time scale, and will pause if its Clock pauses.
         */
        class TimerEvent {
            /**
             * 
             * @param config The configuration for the Timer Event, including its delay and callback.
             */
            constructor(config: Phaser.Types.Time.TimerEventConfig);

            /**
             * The delay in ms at which this TimerEvent fires.
             */
            readonly delay: number;

            /**
             * The total number of times this TimerEvent will repeat before finishing.
             */
            readonly repeat: number;

            /**
             * If repeating, this value contains the current countdown of how many repeats are still to come. It starts at the value of {@link #repeat} and counts down to zero each time the Timer Event fires.
             */
            repeatCount: number;

            /**
             * True if this TimerEvent loops, otherwise false.
             */
            readonly loop: boolean;

            /**
             * The callback that will be called when the TimerEvent occurs.
             */
            callback: Function;

            /**
             * The scope in which the callback will be called.
             */
            callbackScope: object;

            /**
             * Additional arguments to be passed to the callback.
             */
            args: any[];

            /**
             * A time scale factor applied to the elapsed time used to update this Timer Event. Values greater than 1 will cause the event to fire sooner, while values less than 1 will delay it. This is independent of, and multiplied with, the Clock's own time scale.
             */
            timeScale: number;

            /**
             * The number of milliseconds into the elapsed time to start the Timer Event from. This allows a long-duration repeating Timer Event to fire sooner on its first iteration without affecting the duration of subsequent repeats.
             */
            startAt: number;

            /**
             * The time in milliseconds which has elapsed since the Timer Event's creation.
             * 
             * This value is local for the Timer Event and is relative to its Clock. As such, it's influenced by the Clock's time scale and paused state, the Timer Event's initial {@link #startAt} property, and the Timer Event's {@link #timeScale} and {@link #paused} state.
             */
            elapsed: number;

            /**
             * Whether or not this timer is paused.
             */
            paused: boolean;

            /**
             * Whether the Timer Event's function has been called.
             * 
             * When the Timer Event fires, this property will be set to `true` before the callback function is invoked and will be reset immediately afterward if the Timer Event should repeat. The value of this property does not directly influence whether the Timer Event will be removed from its Clock, but can prevent it from firing.
             */
            hasDispatched: boolean;

            /**
             * Completely reinitializes the Timer Event, regardless of its current state, according to a configuration object.
             * @param config The new state for the Timer Event.
             * @returns This TimerEvent object.
             */
            reset(config: Phaser.Types.Time.TimerEventConfig): Phaser.Time.TimerEvent;

            /**
             * Gets the progress of the current iteration, not factoring in repeats.undefined
             * @returns A number between 0 and 1 representing the current progress.
             */
            getProgress(): number;

            /**
             * Gets the progress of the timer overall, factoring in repeats.undefined
             * @returns The overall progress of the Timer Event, between 0 and 1.
             */
            getOverallProgress(): number;

            /**
             * Returns the number of times this Timer Event will repeat before finishing.
             * 
             * This should not be confused with the number of times the Timer Event will fire before finishing. A return value of 0 doesn't indicate that the Timer Event has finished running - it indicates that it will not repeat after the next time it fires.undefined
             * @returns How many times the Timer Event will repeat.
             */
            getRepeatCount(): number;

            /**
             * Returns the local elapsed time for the current iteration of the Timer Event.undefined
             * @returns The local elapsed time in milliseconds.
             */
            getElapsed(): number;

            /**
             * Returns the local elapsed time for the current iteration of the Timer Event in seconds.undefined
             * @returns The local elapsed time in seconds.
             */
            getElapsedSeconds(): number;

            /**
             * Returns the time interval until the next iteration of the Timer Event.undefined
             * @returns The time interval in milliseconds.
             */
            getRemaining(): number;

            /**
             * Returns the time interval until the next iteration of the Timer Event in seconds.undefined
             * @returns The time interval in seconds.
             */
            getRemainingSeconds(): number;

            /**
             * Returns the time interval until the last iteration of the Timer Event.undefined
             * @returns The time interval in milliseconds.
             */
            getOverallRemaining(): number;

            /**
             * Returns the time interval until the last iteration of the Timer Event in seconds.undefined
             * @returns The time interval in seconds.
             */
            getOverallRemainingSeconds(): number;

            /**
             * Forces the Timer Event to immediately expire, thus scheduling its removal in the next frame.
             * @param dispatchCallback If `true`, the function of the Timer Event will be called before its removal. Default false.
             */
            remove(dispatchCallback?: boolean): void;

            /**
             * Destroys all object references in the Timer Event, i.e. its callback, scope, and arguments.
             * 
             * Normally, this method is only called by the Clock when it shuts down. As such, it doesn't stop the Timer Event. If called manually, the Timer Event will still be updated by the Clock, but it won't do anything when it fires.
             */
            destroy(): void;

        }

        namespace Events {
            /**
             * The Timeline Complete Event.
             * 
             * This event is dispatched by a timeline when all of its events have been run.
             * 
             * Listen to it from a Timeline instance using `Timeline.on('complete', listener)`, i.e.:
             * 
             * ```javascript
             * const timeline = this.add.timeline();
             * timeline.on('complete', listener);
             * timeline.play();
             * ```
             */
            const COMPLETE: string;

        }

    }

    namespace Tweens {
        /**
         * The Tween Manager is a default Scene Plugin which controls and updates Tweens.
         * 
         * A tween is a way to alter one or more properties of a target object over a defined period of time.
         * 
         * Tweens are created by calling the `add` method and passing in the configuration object.
         * 
         * ```js
         * const logo = this.add.image(100, 100, 'logo');
         * 
         * this.tweens.add({
         *   targets: logo,
         *   x: 600,
         *   ease: 'Power1',
         *   duration: 2000
         * });
         * ```
         * 
         * See the `TweenBuilderConfig` for all of the options you have available.
         * 
         * Playback will start immediately unless the tween has been configured to be paused.
         * 
         * Please note that a Tween will not manipulate any target property that begins with an underscore.
         * 
         * Tweens are designed to be 'fire-and-forget'. They automatically destroy themselves once playback
         * is complete, to free-up memory and resources. If you wish to keep a tween after playback, i.e. to
         * play it again at a later time, then you should set the `persist` property to `true` in the config.
         * However, doing so means it's entirely up to _you_ to destroy the tween when you're finished with it,
         * otherwise it will linger in memory forever.
         * 
         * A tween will complete early if its target has `isDestroyed` set to `true`.
         * This avoids bugs caused by calling methods on a destroyed Game Object,
         * or any other object with an `isDestroyed` property.
         * You can still cause bugs when targeting other objects which may change
         * in the future, so be careful.
         * 
         * If you wish to chain Tweens together for sequential playback, see the `TweenManager.chain` method.
         */
        class TweenManager {
            /**
             * 
             * @param scene The Scene which owns this Tween Manager.
             */
            constructor(scene: Phaser.Scene);

            /**
             * The Scene which owns this Tween Manager.
             */
            scene: Phaser.Scene;

            /**
             * The Scene Systems Event Emitter.
             */
            events: Phaser.Events.EventEmitter;

            /**
             * The time scale of the Tween Manager.
             * 
             * This value scales the time delta between two frames, thus influencing the speed of time for all Tweens owned by this Tween Manager.
             */
            timeScale: number;

            /**
             * This toggles the updating state of this Tween Manager.
             * 
             * Setting `paused` to `true` (or calling the `pauseAll` method) will
             * stop this Tween Manager from updating any of its tweens, including
             * newly created ones. Set back to `false` to resume playback.
             */
            paused: boolean;

            /**
             * Is this Tween Manager currently processing the tweens as part of
             * its 'update' loop? This is set to 'true' at the start of 'update'
             * and reset to 'false' at the end of the function. Allows you to trap
             * Tween Manager status during tween callbacks.
             */
            processing: boolean;

            /**
             * An array of Tweens which are actively being processed by the Tween Manager.
             */
            tweens: Phaser.Tweens.Tween[];

            /**
             * The time the Tween Manager was updated.
             */
            time: number;

            /**
             * The time the Tween Manager was started.
             */
            startTime: number;

            /**
             * The time the Tween Manager should next update.
             */
            nextTime: number;

            /**
             * The time the Tween Manager previously updated.
             */
            prevTime: number;

            /**
             * The maximum amount of time, in milliseconds, the browser can
             * lag for, before lag smoothing is applied.
             * 
             * See the `TweenManager.setLagSmooth` method for further details.
             */
            maxLag: number;

            /**
             * The amount of time, in milliseconds, that is used to set the
             * delta when lag smoothing is applied.
             * 
             * See the `TweenManager.setLagSmooth` method for further details.
             */
            lagSkip: number;

            /**
             * An internal value that holds the minimum elapsed time between updates, in milliseconds, derived from the target frame rate.
             */
            gap: number;

            /**
             * Create a Tween and return it, but does not add it to this Tween Manager.
             * 
             * Please note that a Tween will not manipulate any target property that begins with an underscore.
             * 
             * In order to play this tween, you'll need to add it to a Tween Manager via
             * the `TweenManager.existing` method.
             * 
             * You can optionally pass an **array** of Tween Configuration objects to this method and it will create
             * one Tween per entry in the array. If an array is given, an array of tweens is returned.
             * @param config A Tween Configuration object. Or an array of Tween Configuration objects.
             * @returns The created Tween, or an array of Tweens if an array of tween configs was provided.
             */
            create(config: Phaser.Types.Tweens.TweenBuilderConfig | Phaser.Types.Tweens.TweenBuilderConfig[] | object | object[]): Phaser.Tweens.Tween | Phaser.Tweens.Tween[];

            /**
             * Create a Tween and add it to this Tween Manager by passing a Tween Configuration object.
             * 
             * Example, run from within a Scene:
             * 
             * ```js
             * const logo = this.add.image(100, 100, 'logo');
             * 
             * this.tweens.add({
             *   targets: logo,
             *   x: 600,
             *   ease: 'Power1',
             *   duration: 2000
             * });
             * ```
             * 
             * See the `TweenBuilderConfig` for all of the options you have available.
             * 
             * Playback will start immediately unless the tween has been configured to be paused.
             * 
             * Please note that a Tween will not manipulate any target property that begins with an underscore.
             * 
             * Tweens are designed to be 'fire-and-forget'. They automatically destroy themselves once playback
             * is complete, to free-up memory and resources. If you wish to keep a tween after playback, i.e. to
             * play it again at a later time, then you should set the `persist` property to `true` in the config.
             * However, doing so means it's entirely up to _you_ to destroy the tween when you're finished with it,
             * otherwise it will linger in memory forever.
             * 
             * If you wish to chain Tweens together for sequential playback, see the `TweenManager.chain` method.
             * @param config A Tween Configuration object, or a Tween or TweenChain instance.
             * @returns The created Tween.
             */
            add(config: Phaser.Types.Tweens.TweenBuilderConfig | Phaser.Types.Tweens.TweenChainBuilderConfig | Phaser.Tweens.Tween | Phaser.Tweens.TweenChain): Phaser.Tweens.Tween;

            /**
             * Create multiple Tweens and add them all to this Tween Manager, by passing an array of Tween Configuration objects.
             * 
             * See the `TweenBuilderConfig` for all of the options you have available.
             * 
             * Playback will start immediately unless the tweens have been configured to be paused.
             * 
             * Please note that a Tween will not manipulate any target property that begins with an underscore.
             * 
             * Tweens are designed to be 'fire-and-forget'. They automatically destroy themselves once playback
             * is complete, to free-up memory and resources. If you wish to keep a tween after playback, i.e. to
             * play it again at a later time, then you should set the `persist` property to `true` in the config.
             * However, doing so means it's entirely up to _you_ to destroy the tween when you're finished with it,
             * otherwise it will linger in memory forever.
             * 
             * If you wish to chain Tweens together for sequential playback, see the `TweenManager.chain` method.
             * @param configs An array of Tween Configuration objects.
             * @returns An array of created Tweens.
             */
            addMultiple(configs: Phaser.Types.Tweens.TweenBuilderConfig[] | object[]): Phaser.Tweens.Tween[];

            /**
             * Create a sequence of Tweens, chained to one another, and add them to this Tween Manager.
             * 
             * The tweens are played in order, from start to finish. You can optionally set the chain
             * to repeat as many times as you like. Once the chain has finished playing, or repeating if set,
             * all tweens in the chain will be destroyed automatically. To override this, set the `persist`
             * argument to 'true'.
             * 
             * Playback will start immediately unless the _first_ Tween has been configured to be paused.
             * 
             * Please note that Tweens will not manipulate any target property that begins with an underscore.
             * @param tweens A Tween Chain configuration object.
             * @returns The Tween Chain instance.
             */
            chain(tweens: Phaser.Types.Tweens.TweenChainBuilderConfig | object): Phaser.Tweens.TweenChain;

            /**
             * Returns an array containing the given Tween and all Tweens chained to it,
             * in the order in which they will be played.
             * 
             * If there are no chained Tweens, an empty array is returned.
             * @param tween The Tween to return the chain from.
             * @returns An array of the chained tweens, or an empty array if there aren't any.
             */
            getChainedTweens(tween: Phaser.Tweens.Tween): Phaser.Tweens.Tween[];

            /**
             * Check to see if the given Tween instance exists within this Tween Manager.
             * 
             * Will return `true` as long as the Tween is being processed by this Tween Manager.
             * 
             * Will return `false` if not present, or has a state of `REMOVED` or `DESTROYED`.
             * @param tween The Tween instance to check.
             * @returns `true` if the Tween exists within this Tween Manager, otherwise `false`.
             */
            has(tween: Phaser.Tweens.Tween): boolean;

            /**
             * Add an existing Tween to this Tween Manager.
             * 
             * Playback will start immediately unless the tween has been configured to be paused.
             * @param tween The Tween to add.
             * @returns This Tween Manager instance.
             */
            existing(tween: Phaser.Tweens.Tween): this;

            /**
             * Create a Number Tween and add it to the active Tween list.
             * 
             * A Number Tween is a special kind of tween that doesn't have a target. Instead,
             * it allows you to tween between 2 numeric values. The default values are
             * `0` and `1`, but you can change them via the `from` and `to` properties.
             * 
             * You can get the current tweened value via the `Tween.getValue()` method.
             * 
             * Playback will start immediately unless the tween has been configured to be paused.
             * 
             * Please note that a Tween will not manipulate any target property that begins with an underscore.
             * @param config The configuration object for the Number Tween.
             * @returns The created Number Tween.
             */
            addCounter(config: Phaser.Types.Tweens.NumberTweenBuilderConfig): Phaser.Tweens.Tween;

            /**
             * Creates a Stagger function to be used by a Tween property.
             * 
             * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.
             * 
             * This is only worth using if the tween has multiple targets.
             * 
             * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2
             * over the duration specified:
             * 
             * ```javascript
             * this.tweens.add({
             *     targets: [ ... ],
             *     scale: 0.2,
             *     ease: 'linear',
             *     duration: 1000,
             *     delay: this.tweens.stagger(100)
             * });
             * ```
             * 
             * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering
             * from the center out, using a cubic ease.
             * 
             * ```javascript
             * this.tweens.add({
             *     targets: [ ... ],
             *     scale: 0.2,
             *     ease: 'linear',
             *     duration: 1000,
             *     delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })
             * });
             * ```
             * @param value The amount to stagger by, or an array containing two elements representing the min and max values to stagger between.
             * @param config The configuration object for the Stagger function.
             * @returns The stagger function.
             */
            stagger(value: number | number[], config?: Phaser.Types.Tweens.StaggerConfig): Function;

            /**
             * Set the limits that are used when a browser encounters lag, or delays that cause the elapsed
             * time between two frames to exceed the expected amount. If this occurs, the Tween Manager will
             * act as if the 'skip' amount of time has passed, in order to maintain strict tween sequencing.
             * 
             * This is enabled by default with the values 500ms for the lag limit and 33ms for the skip.
             * 
             * You should not set these to low values, as it won't give time for the browser to ever
             * catch-up with itself and reclaim sync.
             * 
             * Call this method with no arguments to disable smoothing.
             * 
             * Call it with the arguments `500` and `33` to reset to the defaults.
             * @param limit If the browser exceeds this amount, in milliseconds, it will act as if the 'skip' amount has elapsed instead. Default 0.
             * @param skip The amount, in milliseconds, to use as the step delta should the browser lag beyond the 'limit'. Default 0.
             * @returns This Tween Manager instance.
             */
            setLagSmooth(limit?: number, skip?: number): this;

            /**
             * Limits the Tween system to run at a particular frame rate.
             * 
             * You should not set this _above_ the frequency of the browser,
             * but instead can use it to throttle the frame rate lower, should
             * you need to in certain situations.
             * @param fps The frame rate to tick at. Default 240.
             * @returns This Tween Manager instance.
             */
            setFps(fps?: number): this;

            /**
             * Internal method that calculates the delta value, along with the other timing values,
             * and returns the new delta.
             * 
             * You should not typically call this method directly.
             * @param tick Is this a manual tick, or an automated tick? Default false.
             * @returns The new delta value.
             */
            getDelta(tick?: boolean): number;

            /**
             * Manually advance the Tween system by one step.
             * 
             * This will update all Tweens even if the Tween Manager is currently
             * paused.undefined
             * @returns This Tween Manager instance.
             */
            tick(): this;

            /**
             * Internal update handler.
             * 
             * Calls `TweenManager.step` as long as the Tween Manager has not
             * been paused.
             */
            update(): void;

            /**
             * Updates all Tweens belonging to this Tween Manager.
             * 
             * Called automatically by `update` and `tick`.
             * @param tick Is this a manual tick, or an automated tick? Default false.
             */
            step(tick?: boolean): void;

            /**
             * Removes the given Tween from this Tween Manager, even if it hasn't started
             * playback yet. If this method is called while the Tween Manager is processing
             * an update loop, then the tween will be flagged for removal at the start of
             * the next frame. Otherwise, it is removed immediately.
             * 
             * The removed tween is _not_ destroyed. It is just removed from this Tween Manager.
             * @param tween The Tween to be removed.
             * @returns This Tween Manager instance.
             */
            remove(tween: Phaser.Tweens.Tween): this;

            /**
             * Resets the given Tween.
             * 
             * If the Tween does not belong to this Tween Manager, it will first be added.
             * 
             * Then it will seek to position 0 and playback will start on the next frame.
             * @param tween The Tween to be reset.
             * @returns This Tween Manager instance.
             */
            reset(tween: Phaser.Tweens.Tween): this;

            /**
             * Checks if a Tween is active and adds it to the Tween Manager at the start of the frame if it isn't.
             * @param tween The Tween to check.
             * @returns This Tween Manager instance.
             */
            makeActive(tween: Phaser.Tweens.Tween): this;

            /**
             * Passes all Tweens to the given callback.
             * @param callback The function to call.
             * @param scope The scope (`this` object) to call the function with.
             * @param args The arguments to pass into the function. Its first argument will always be the Tween currently being iterated.
             * @returns This Tween Manager instance.
             */
            each(callback: Function, scope?: object, ...args: any[]): this;

            /**
             * Returns an array containing references to all Tweens in this Tween Manager.
             * 
             * It is safe to mutate the returned array. However, acting upon any of the Tweens
             * within it, will adjust those stored in this Tween Manager, as they are passed
             * by reference and not cloned.
             * 
             * If you wish to get tweens for a specific target, see `getTweensOf`.undefined
             * @returns A new array containing references to all Tweens.
             */
            getTweens(): Phaser.Tweens.Tween[];

            /**
             * Returns an array of all Tweens in the Tween Manager which affect the given target, or array of targets.
             * 
             * It's possible for this method to return tweens that are about to be removed from
             * the Tween Manager. You should check the state of the returned tween before acting
             * upon it.
             * @param target The target to look for. Provide an array to look for multiple targets.
             * @returns A new array containing all Tweens which affect the given target(s).
             */
            getTweensOf(target: object | object[]): Phaser.Tweens.Tween[];

            /**
             * Returns the scale of the time delta for all Tweens owned by this Tween Manager.undefined
             * @returns The scale of the time delta, usually 1.
             */
            getGlobalTimeScale(): number;

            /**
             * Sets a new scale of the time delta for this Tween Manager.
             * 
             * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Tween Manager and all Tweens it owns. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing all Tweens.
             * @param value The new scale of the time delta, where 1 is the normal speed.
             * @returns This Tween Manager instance.
             */
            setGlobalTimeScale(value: number): this;

            /**
             * Checks if the given object is being affected by a _playing_ Tween.
             * 
             * If the Tween is paused, this method will return false.
             * @param target The object to check if a tween is active for it, or not.
             * @returns Returns `true` if a tween is active on the given target, otherwise `false`.
             */
            isTweening(target: object): boolean;

            /**
             * Destroys all Tweens in this Tween Manager.
             * 
             * The tweens will erase all references to any targets they hold
             * and be stopped immediately.
             * 
             * If this method is called while the Tween Manager is running its
             * update process, then the tweens will be removed at the start of
             * the next frame. Outside of this, they are removed immediately.undefined
             * @returns This Tween Manager instance.
             */
            killAll(): this;

            /**
             * Stops all Tweens which affect the given target or array of targets.
             * 
             * The tweens will erase all references to any targets they hold
             * and be stopped immediately.
             * 
             * If this method is called while the Tween Manager is running its
             * update process, then the tweens will be removed at the start of
             * the next frame. Outside of this, they are removed immediately.
             * @param target The target to kill the tweens of. Provide an array to use multiple targets.
             * @returns This Tween Manager instance.
             */
            killTweensOf(target: object | any[]): this;

            /**
             * Pauses this Tween Manager. No Tweens will update while paused.
             * 
             * This includes tweens created after this method was called.
             * 
             * See `TweenManager#resumeAll` to resume the playback.
             * 
             * As of Phaser 3.60 you can also toggle the boolean property `TweenManager.paused`.undefined
             * @returns This Tween Manager instance.
             */
            pauseAll(): this;

            /**
             * Resumes playback of this Tween Manager.
             * 
             * All active Tweens will continue updating.
             * 
             * See `TweenManager#pauseAll` to pause the playback.
             * 
             * As of Phaser 3.60 you can also toggle the boolean property `TweenManager.paused`.undefined
             * @returns This Tween Manager instance.
             */
            resumeAll(): this;

            /**
             * The Scene that owns this plugin is shutting down.
             * 
             * We need to kill and reset all internal properties as well as stop listening to Scene events.
             */
            shutdown(): void;

            /**
             * The Scene that owns this plugin is being destroyed.
             * We need to shutdown and then kill off all external references.
             */
            destroy(): void;

        }

        namespace Builders {
            /**
             * Retrieves the boolean value of the given key from a source object, returning a default value if the key is missing or no source object is provided.
             * @param source The object to retrieve the value from.
             * @param key The key to look for in the `source` object.
             * @param defaultValue The default value to return if the `key` doesn't exist or if no `source` object is provided.
             * @returns The boolean value associated with the key, or `defaultValue` if the key does not exist or no source object was provided.
             */
            function GetBoolean(source: object, key: string, defaultValue: boolean): boolean;

            /**
             * Returns the easing function corresponding to the given `ease` value for use in a Tween.
             * 
             * The `ease` argument can be an exact key from the EaseMap (e.g. `'Power2'`, `'Quad.easeIn'`),
             * a shorthand dot-notation string (e.g. `'quad.in'`, `'cubic.inout'`), or a custom easing function.
             * If the string cannot be resolved, the function falls back to `Power0` (linear easing).
             * 
             * When `easeParams` is provided, the returned function is a wrapper that forwards those extra
             * arguments to the resolved ease function on every call, enabling parameterised easings such as
             * Stepped or Back easing.
             * @param ease The ease to resolve. Accepts an EaseMap key, a dot-notation shorthand (e.g. `'quad.in'`), or a custom easing function.
             * @param easeParams An optional array of additional parameters to pass to the ease function on each call.
             * @returns The resolved ease function, or a wrapper function that applies the resolved ease with the provided parameters.
             */
            function GetEaseFunction(ease: string | Function, easeParams?: number[]): Function;

            /**
             * Returns the interpolation function to be used by a Tween for multi-value properties.
             * 
             * The `interpolation` argument can be a string key, a custom function, or `null`.
             * Valid string keys are `'linear'`, `'bezier'`, `'catmull'`, and `'catmullrom'`.
             * If a string is provided but not recognised, the function falls back to linear interpolation.
             * If `null` is passed, `null` is returned, indicating no interpolation should be applied.
             * If a custom function is passed, it is returned directly and used as the interpolator.
             * @param interpolation The interpolation function to resolve. Can be a string key (`'linear'`, `'bezier'`, `'catmull'`, `'catmullrom'`), a custom interpolation function, or `null`.
             * @returns The resolved interpolation function, or `null` if `null` was passed in.
             */
            function GetInterpolationFunction(interpolation: string | Function | null): Function | null;

            /**
             * Internal function used by the Tween Builder to create a value resolver callback for a tween
             * property. It inspects the given `source` object for the specified `key` and returns a wrapper
             * function suitable for use during tween interpolation. If the property exists on the source and
             * is itself a function, it is wrapped so it receives the full tween context (target, targetKey,
             * value, targetIndex, totalTargets, tween) on each call. If the property is a static value, a
             * function that always returns that value is created instead. If the source does not have the
             * property, the `defaultValue` is used — either directly (if it is already a function) or wrapped
             * in a function that returns it.
             * @param source The source object to get the value from.
             * @param key The property to get from the source.
             * @param defaultValue A default value to use should the source not have the property set. May itself be a function.
             * @returns A function which, when called, returns the resolved property value from the source, or the default value if the property is not present.
             */
            function GetNewValue(source: any, key: string, defaultValue: any): Function;

            /**
             * Internal function used by the Tween Builder to extract the list of properties
             * that the Tween will animate. It takes a Tween configuration object and follows
             * one of two paths: if the config contains a `props` object, it iterates its keys
             * and skips any that begin with an underscore; otherwise, it iterates the top-level
             * config keys directly, skipping both any that begin with an underscore and any that
             * appear on the Reserved Properties list (e.g. `targets`, `delay`, `duration`).
             * @param config The configuration object of the Tween to get the properties from.
             * @returns An array of `{ key, value }` objects representing each property the tween will animate.
             */
            function GetProps(config: Phaser.Types.Tweens.TweenBuilderConfig): string[];

            /**
             * Extracts an array of targets from a Tween configuration object.
             * 
             * The targets will be looked for in a `targets` property. If it's a function, its return value will be used as the result.
             * @param config The Tween configuration object containing the `targets` property to extract.
             * @returns An array of targets (may contain only one element), or `null` if no targets were specified.
             */
            function GetTargets(config: object): any[];

            /**
             * Returns `getActive`, `getStart` and `getEnd` functions for a TweenData based on a target property and end value.
             * 
             * `getActive` if not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.
             * `getEnd` is invoked once any start delays have expired and returns what the value should tween to.
             * `getStart` is invoked when the tween reaches the end and needs to either repeat or yoyo, it returns the value to go back to.
             * 
             * If the end value is a number, it will be treated as an absolute value and the property will be tweened to it.
             * A string can be provided to specify a relative end value which consists of an operation
             * (`+=` to add to the current value, `-=` to subtract from the current value, `*=` to multiply the current
             * value, or `/=` to divide the current value) followed by its operand.
             * 
             * A function can be provided to allow greater control over the end value; it will receive the target
             * object being tweened, the name of the property being tweened, and the current value of the property
             * as its arguments and must return a value.
             * 
             * If both the starting and the ending values need to be controlled, an object with `getStart` and `getEnd`
             * callbacks, which will receive the same arguments, can be provided instead. If an object with a `value`
             * property is provided, the property will be used as the effective value under the same rules described here.
             * @param key The name of the property to modify.
             * @param propertyValue The ending value of the property, as described above.
             * @returns An object containing `getActive`, `getStart`, and `getEnd` functions, which return the active, starting, and ending values of the property based on the provided value.
             */
            function GetValueOp(key: string, propertyValue: any): Function;

            /**
             * Creates a new Number Tween, also known as a counter tween.
             * 
             * Unlike a standard tween, a Number Tween does not target a Game Object's properties.
             * Instead, it interpolates a plain numeric value between a `from` and a `to` value over
             * the course of the tween. The current interpolated value can be read at any time via
             * `tween.getValue()`. This makes Number Tweens ideal for driving custom animations,
             * UI counters, shader uniforms, or any other value that needs to change smoothly over
             * time without being tied directly to a Game Object property.
             * @param parent The owner of the new Tween.
             * @param config Configuration for the new Tween.
             * @param defaults Tween configuration defaults.
             * @returns The new tween.
             */
            function NumberTweenBuilder(parent: Phaser.Tweens.TweenManager, config: Phaser.Types.Tweens.NumberTweenBuilderConfig, defaults: Phaser.Types.Tweens.TweenConfigDefaults): Phaser.Tweens.Tween;

            /**
             * Creates a Stagger function to be used by a Tween property.
             * 
             * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.
             * 
             * This is only worth using if the tween has multiple targets.
             * 
             * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2
             * over the duration specified:
             * 
             * ```javascript
             * this.tweens.add({
             *     targets: [ ... ],
             *     scale: 0.2,
             *     ease: 'linear',
             *     duration: 1000,
             *     delay: this.tweens.stagger(100)
             * });
             * ```
             * 
             * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering
             * from the center out, using a cubic ease.
             * 
             * ```javascript
             * this.tweens.add({
             *     targets: [ ... ],
             *     scale: 0.2,
             *     ease: 'linear',
             *     duration: 1000,
             *     delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })
             * });
             * ```
             * @param value The amount to stagger by, or an array containing two elements representing the min and max values to stagger between.
             * @param options A Stagger Configuration object.
             * @returns A stagger function that, when invoked by the Tween system for each target, calculates and returns the staggered property value for that target based on its index, the total number of targets, and the stagger configuration provided.
             */
            function StaggerBuilder(value: number | number[], options?: Phaser.Types.Tweens.StaggerConfig): Function;

            /**
             * Parses a Tween configuration object and constructs a fully initialized `Tween` instance
             * ready to be added to the Tween Manager.
             * 
             * This builder resolves the list of targets and properties from the config, creates a
             * `TweenData` entry for every target/property combination, and applies default values for
             * easing, duration, delay, hold, repeat, yoyo, flip, and interpolation. A special `scale`
             * shortcut is supported: if a target does not have a native `scale` property, the builder
             * automatically expands it into separate `scaleX` and `scaleY` TweenData entries. Texture
             * tweening (changing a target's texture and frame over time) is also handled as a distinct
             * code path.
             * 
             * After building the TweenData entries, the builder configures top-level Tween properties
             * such as `loop`, `loopDelay`, `completeDelay`, `paused`, `persist`, and any callbacks
             * defined in the config (e.g. `onStart`, `onUpdate`, `onComplete`).
             * 
             * If `config` is already a `Tween` instance, its `parent` is updated and it is returned
             * as-is without further processing.
             * @param parent The owner of the new Tween.
             * @param config Configuration for the new Tween.
             * @param defaults Tween configuration defaults.
             * @returns The new tween.
             */
            function TweenBuilder(parent: Phaser.Tweens.TweenManager, config: Phaser.Types.Tweens.TweenBuilderConfig | object, defaults: Phaser.Types.Tweens.TweenConfigDefaults): Phaser.Tweens.Tween;

            /**
             * Creates a new TweenChain instance from the given configuration object. A TweenChain is a
             * sequence of Tweens that play one after another in order, rather than all at once. This makes
             * it useful for creating multi-step animations where each step must complete before the next begins.
             * 
             * This builder is called internally by the TweenManager when you use `scene.tweens.chain()`.
             * It processes the config object to set up the chain's start delay, loop count, loop delay,
             * completion delay, paused state, lifecycle callbacks, and the individual Tweens that make up
             * the chain. If any top-level `targets` are defined in the config, they are passed as defaults
             * to each child Tween that does not specify its own targets.
             * 
             * If the `config` argument is already a TweenChain instance, its parent is updated and it is
             * returned as-is without rebuilding.
             * @param parent The owner of the new Tween.
             * @param config Configuration for the new Tween.
             * @returns The new Tween Chain.
             */
            function TweenChainBuilder(parent: Phaser.Tweens.TweenManager, config: Phaser.Types.Tweens.TweenChainBuilderConfig | object): Phaser.Tweens.TweenChain;

        }

        namespace Events {
            /**
             * The Tween Active Event.
             * 
             * This event is dispatched by a Tween when it becomes active within the Tween Manager.
             * 
             * An 'active' Tween is one that is now progressing, although it may not yet be updating
             * any target properties, due to settings such as `delay`. If you need an event for when
             * the Tween starts actually updating its first property, see `TWEEN_START`.
             * 
             * Listen to it from a Tween instance using `Tween.on('active', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.create({
             *     targets: image,
             *     x: 500,
             *     ease: 'Power1',
             *     duration: 3000
             * });
             * tween.on('active', listener);
             * this.tweens.existing(tween);
             * ```
             * 
             * Note that this event is usually dispatched already by the time you call `this.tweens.add()`, and is
             * meant for use with `tweens.create()` and/or `tweens.existing()`.
             */
            const TWEEN_ACTIVE: string;

            /**
             * The Tween Complete Event.
             * 
             * This event is dispatched by a Tween when it completes playback entirely, factoring in repeats and loops.
             * 
             * If the Tween has been set to loop or repeat infinitely, this event will not be dispatched
             * unless the `Tween.stop` method is called.
             * 
             * If a Tween has a `completeDelay` set, this event will fire after that delay expires.
             * 
             * Listen to it from a Tween instance using `Tween.on('complete', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.add({
             *     targets: image,
             *     x: 500,
             *     ease: 'Power1',
             *     duration: 3000
             * });
             * tween.on('complete', listener);
             * ```
             */
            const TWEEN_COMPLETE: string;

            /**
             * The Tween Loop Event.
             * 
             * This event is dispatched by a Tween when it loops.
             * 
             * This event will only be dispatched if the Tween has a loop count set.
             * 
             * If a Tween has a `loopDelay` set, this event will fire after that delay expires.
             * 
             * The difference between `loop` and `repeat` is that `repeat` is a property setting,
             * where-as `loop` applies to the entire Tween.
             * 
             * Listen to it from a Tween instance using `Tween.on('loop', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.add({
             *     targets: image,
             *     x: 500,
             *     ease: 'Power1',
             *     duration: 3000,
             *     loop: 6
             * });
             * tween.on('loop', listener);
             * ```
             */
            const TWEEN_LOOP: string;

            /**
             * The Tween Pause Event.
             * 
             * This event is dispatched by a Tween when it is paused.
             * 
             * Listen to it from a Tween instance using `Tween.on('pause', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.add({
             *     targets: image,
             *     ease: 'Power1',
             *     duration: 3000,
             *     x: 600
             * });
             * tween.on('pause', listener);
             * // At some point later ...
             * tween.pause();
             * ```
             */
            const TWEEN_PAUSE: string;

            /**
             * The Tween Repeat Event.
             * 
             * This event is dispatched by a Tween when one of the properties it is tweening repeats.
             * 
             * This event will only be dispatched if the Tween has a property with a repeat count set.
             * 
             * If a Tween has a `repeatDelay` set, this event will fire after that delay expires.
             * 
             * The difference between `loop` and `repeat` is that `repeat` is a property setting,
             * where-as `loop` applies to the entire Tween.
             * 
             * Listen to it from a Tween instance using `Tween.on('repeat', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.add({
             *     targets: image,
             *     x: 500,
             *     ease: 'Power1',
             *     duration: 3000,
             *     repeat: 4
             * });
             * tween.on('repeat', listener);
             * ```
             */
            const TWEEN_REPEAT: string;

            /**
             * The Tween Resume Event.
             * 
             * This event is dispatched by a Tween when it is resumed from a paused state.
             * 
             * Listen to it from a Tween instance using `Tween.on('resume', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.add({
             *     targets: image,
             *     ease: 'Power1',
             *     duration: 3000,
             *     x: 600
             * });
             * tween.on('resume', listener);
             * // At some point later ...
             * tween.resume();
             * ```
             */
            const TWEEN_RESUME: string;

            /**
             * The Tween Start Event.
             * 
             * This event is dispatched by a Tween when it starts tweening its first property.
             * 
             * A Tween will only emit this event once, as it can only start once.
             * 
             * If a Tween has a `delay` set, this event will fire after that delay expires.
             * 
             * Listen to it from a Tween instance using `Tween.on('start', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.add({
             *     targets: image,
             *     x: 500,
             *     ease: 'Power1',
             *     duration: 3000
             * });
             * tween.on('start', listener);
             * ```
             */
            const TWEEN_START: string;

            /**
             * The Tween Stop Event.
             * 
             * This event is dispatched by a Tween when it is stopped.
             * 
             * Listen to it from a Tween instance using `Tween.on('stop', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.add({
             *     targets: image,
             *     x: 500,
             *     ease: 'Power1',
             *     duration: 3000
             * });
             * tween.on('stop', listener);
             * ```
             */
            const TWEEN_STOP: string;

            /**
             * The Tween Update Event.
             * 
             * This event is dispatched by a Tween every time it updates _any_ of the properties it is tweening.
             * 
             * A Tween that is changing 3 properties of a target will emit this event 3 times per change, once per property.
             * 
             * **Note:** This is a very high frequency event and may be dispatched multiple times, every single frame.
             * 
             * Listen to it from a Tween instance using `Tween.on('update', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.add({
             *     targets: image,
             *     x: 500,
             *     ease: 'Power1',
             *     duration: 3000,
             * });
             * tween.on('update', listener);
             * ```
             */
            const TWEEN_UPDATE: string;

            /**
             * The Tween Yoyo Event.
             * 
             * This event is dispatched by a Tween whenever a property it is tweening yoyos.
             * 
             * This event will only be dispatched if the Tween has a property with `yoyo` set.
             * 
             * If the Tween has a `hold` value, this event is dispatched when the hold expires.
             * 
             * This event is dispatched for every property, and for every target, that yoyos.
             * For example, if a Tween was updating 2 properties and had 10 targets, this event
             * would be dispatched 20 times (twice per target). So be careful how you use it!
             * 
             * Listen to it from a Tween instance using `Tween.on('yoyo', listener)`, i.e.:
             * 
             * ```javascript
             * var tween = this.tweens.add({
             *     targets: image,
             *     x: 500,
             *     ease: 'Power1',
             *     duration: 3000,
             *     yoyo: true
             * });
             * tween.on('yoyo', listener);
             * ```
             */
            const TWEEN_YOYO: string;

        }

        /**
         * As the name implies, this is the base Tween class that both the Tween and TweenChain
         * inherit from. It contains shared properties and methods common to both types of Tween.
         * 
         * Typically you would never instantiate this class directly, although you could certainly
         * use it to create your own variation of Tweens from.
         */
        class BaseTween extends Phaser.Events.EventEmitter {
            /**
             * 
             * @param parent A reference to the Tween Manager, or Tween Chain, that owns this Tween.
             */
            constructor(parent: Phaser.Tweens.TweenManager | Phaser.Tweens.TweenChain);

            /**
             * A reference to the Tween Manager, or Tween Chain, that owns this Tween.
             */
            parent: Phaser.Tweens.TweenManager | Phaser.Tweens.TweenChain;

            /**
             * The main data array. For a Tween, this contains all of the `TweenData` objects, each
             * containing a unique property and target that is being tweened.
             * 
             * For a TweenChain, this contains an array of `Tween` instances, which are being played
             * through in sequence.
             */
            data: Phaser.Tweens.TweenData[] | Phaser.Tweens.Tween[];

            /**
             * The cached size of the data array.
             */
            totalData: number;

            /**
             * The time in milliseconds before the 'onStart' event fires.
             * 
             * For a Tween, this is the shortest `delay` value across all of the TweenDatas it owns.
             * For a TweenChain, it is whatever delay value was given in the configuration.
             */
            startDelay: number;

            /**
             * Has this Tween started playback yet?
             * 
             * This boolean is toggled when the Tween leaves the 'start delayed' state and begins running.
             */
            readonly hasStarted: boolean;

            /**
             * Scales the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.
             * 
             * The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only.
             * 
             * This value is multiplied by the `TweenManager.timeScale`.
             */
            timeScale: number;

            /**
             * The number of times this Tween will loop.
             * 
             * Can be -1 for an infinite loop, zero for none, or a positive integer.
             * 
             * Typically this is set in the configuration object, but can also be set directly
             * as long as this Tween is paused and hasn't started playback.
             * 
             * When enabled it will play through ALL Tweens again.
             * 
             * Use TweenData.repeat to loop a single element.
             */
            loop: number;

            /**
             * The time in milliseconds before the Tween loops.
             * 
             * Only used if `loop` is > 0.
             */
            loopDelay: number;

            /**
             * Internal counter recording how many loops are left to run.
             */
            loopCounter: number;

            /**
             * The time in milliseconds before the 'onComplete' event fires.
             * 
             * This never fires if `loop = -1` as it never completes because it has been
             * set to loop forever.
             */
            completeDelay: number;

            /**
             * An internal countdown timer (used by loopDelay and completeDelay)
             */
            countdown: number;

            /**
             * The current state of the Tween.
             */
            state: Phaser.Tweens.StateType;

            /**
             * Is the Tween currently paused?
             * 
             * A paused Tween needs to be started with the `play` method, or resumed with the `resume` method.
             * 
             * This property can be toggled at runtime if required.
             */
            paused: boolean;

            /**
             * An object containing the different Tween callback functions.
             * 
             * You can either set these in the Tween config, or by calling the `Tween.setCallback` method.
             * 
             * The types available are:
             * 
             * `onActive` - When the Tween is first created it moves to an 'active' state when added to the Tween Manager. 'Active' does not mean 'playing'.
             * `onStart` - When the Tween starts playing after a delayed or paused state. This will happen at the same time as `onActive` if the tween has no delay and isn't paused.
             * `onLoop` - When a Tween loops, if it has been set to do so. This happens _after_ the `loopDelay` expires, if set.
             * `onComplete` - When the Tween finishes playback fully. Never invoked if the Tween is set to repeat infinitely.
             * `onStop` - Invoked only if the `Tween.stop` method is called.
             * `onPause` - Invoked only if the `Tween.pause` method is called. Not invoked if the Tween Manager is paused.
             * `onResume` - Invoked only if the `Tween.resume` method is called. Not invoked if the Tween Manager is resumed.
             * 
             * The following types are also available and are invoked on a `TweenData` level - that is per-object, per-property, being tweened.
             * 
             * `onYoyo` - When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.
             * `onRepeat` - When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.
             * `onUpdate` - When a TweenData updates a property on a source target during playback.
             */
            callbacks: Phaser.Types.Tweens.TweenCallbacks;

            /**
             * The scope (or context) in which all of the callbacks are invoked.
             * 
             * This defaults to be this Tween, but you can override this property
             * to set it to whatever object you require.
             */
            callbackScope: any;

            /**
             * Will this Tween persist after playback? A Tween that persists will _not_ be destroyed by the
             * Tween Manager, or when calling `Tween.stop`, and can be re-played as required. You can either
             * set this property when creating the tween in the tween config, or set it _prior_ to playback.
             * 
             * However, it's up to you to ensure you destroy persistent tweens when you are finished with them,
             * or they will retain references you may no longer require and waste memory.
             * 
             * By default, `Tweens` are set to _not_ persist, so they are automatically cleaned-up by
             * the Tween Manager.
             */
            persist: boolean;

            /**
             * Sets the value of the time scale applied to this Tween. A value of 1 runs in real-time.
             * A value of 0.5 runs 50% slower, and so on.
             * 
             * The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only.
             * 
             * This value is multiplied by the `TweenManager.timeScale`.
             * @param value The time scale value to set.
             * @returns This Tween instance.
             */
            setTimeScale(value: number): this;

            /**
             * Gets the value of the time scale applied to this Tween. A value of 1 runs in real-time.
             * A value of 0.5 runs 50% slower, and so on.undefined
             * @returns The value of the time scale applied to this Tween.
             */
            getTimeScale(): number;

            /**
             * Checks if this Tween is currently playing.
             * 
             * If this Tween is paused, or not active, this method will return false.undefined
             * @returns `true` if the Tween is playing, otherwise `false`.
             */
            isPlaying(): boolean;

            /**
             * Checks if the Tween is currently paused.
             * 
             * This is the same as inspecting the `BaseTween.paused` property directly.undefined
             * @returns `true` if the Tween is paused, otherwise `false`.
             */
            isPaused(): boolean;

            /**
             * Pauses the Tween immediately. Use `resume` to continue playback.
             * 
             * You can also toggle the `Tween.paused` boolean property, but doing so will not trigger the PAUSE event.undefined
             * @returns This Tween instance.
             */
            pause(): this;

            /**
             * Resumes the playback of a previously paused Tween.
             * 
             * You can also toggle the `Tween.paused` boolean property, but doing so will not trigger the RESUME event.undefined
             * @returns This Tween instance.
             */
            resume(): this;

            /**
             * Internal method that makes this Tween active within the TweenManager
             * and emits the onActive event and callback.
             */
            makeActive(): void;

            /**
             * Internal method that handles this tween completing and emitting the onComplete event
             * and callback.
             */
            onCompleteHandler(): void;

            /**
             * Flags the Tween as being complete, whatever stage of progress it is at.
             * 
             * If an `onComplete` callback has been defined it will automatically invoke it, unless a `delay`
             * argument is provided, in which case the Tween will delay for that period of time before calling the callback.
             * 
             * If you don't need a delay or don't have an `onComplete` callback then call `Tween.stop` instead.
             * @param delay The time to wait before invoking the complete callback. If zero it will fire immediately. Default 0.
             * @returns This Tween instance.
             */
            complete(delay?: number): this;

            /**
             * Flags the Tween as being complete only once the current loop has finished.
             * 
             * This is a useful way to stop an infinitely looping tween once a complete cycle is over,
             * rather than abruptly.
             * 
             * If you don't have a loop then call `Tween.stop` instead.
             * @param loops The number of loops that should finish before this tween completes. Zero means complete just the current loop. Default 0.
             * @returns This Tween instance.
             */
            completeAfterLoop(loops?: number): this;

            /**
             * Immediately removes this Tween from the TweenManager and all of its internal arrays,
             * no matter what stage it is at. Then sets the tween state to `REMOVED`.
             * 
             * You should dispose of your reference to this tween after calling this method, to
             * free it from memory. If you no longer require it, call `Tween.destroy()` on it.undefined
             * @returns This Tween instance.
             */
            remove(): this;

            /**
             * Stops the Tween immediately, whatever stage of progress it is at.
             * 
             * If not a part of a Tween Chain it is also flagged for removal by the Tween Manager.
             * 
             * If an `onStop` callback has been defined it will automatically invoke it.
             * 
             * The Tween will be removed during the next game frame, but should be considered 'destroyed' from this point on.
             * 
             * Typically, you cannot play a Tween that has been stopped. If you just wish to pause the tween, not destroy it,
             * then call the `pause` method instead and use `resume` to continue playback. If you wish to restart the Tween,
             * use the `restart` or `seek` methods.undefined
             * @returns This Tween instance.
             */
            stop(): this;

            /**
             * Internal method that handles the processing of the loop delay countdown timer and
             * the dispatch of related events. Called automatically by `Tween.update`.
             * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
             */
            updateLoopCountdown(delta: number): void;

            /**
             * Internal method that handles the processing of the start delay countdown timer and
             * the dispatch of related events. Called automatically by `Tween.update`.
             * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
             */
            updateStartCountdown(delta: number): void;

            /**
             * Internal method that handles the processing of the complete delay countdown timer and
             * the dispatch of related events. Called automatically by `Tween.update`.
             * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
             */
            updateCompleteDelay(delta: number): void;

            /**
             * Sets an event based callback to be invoked during playback.
             * 
             * Calling this method will replace a previously set callback for the given type, if any exists.
             * 
             * The types available are:
             * 
             * `onActive` - When the Tween is first created it moves to an 'active' state when added to the Tween Manager. 'Active' does not mean 'playing'.
             * `onStart` - When the Tween starts playing after a delayed or paused state. This will happen at the same time as `onActive` if the tween has no delay and isn't paused.
             * `onLoop` - When a Tween loops, if it has been set to do so. This happens _after_ the `loopDelay` expires, if set.
             * `onComplete` - When the Tween finishes playback fully. Never invoked if the Tween is set to repeat infinitely.
             * `onStop` - Invoked only if the `Tween.stop` method is called.
             * `onPause` - Invoked only if the `Tween.pause` method is called. Not invoked if the Tween Manager is paused.
             * `onResume` - Invoked only if the `Tween.resume` method is called. Not invoked if the Tween Manager is resumed.
             * 
             * The following types are also available and are invoked on a `TweenData` level - that is per-object, per-property, being tweened.
             * 
             * `onYoyo` - When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.
             * `onRepeat` - When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.
             * `onUpdate` - When a TweenData updates a property on a source target during playback.
             * @param type The type of callback to set. One of: `onActive`, `onComplete`, `onLoop`, `onPause`, `onRepeat`, `onResume`, `onStart`, `onStop`, `onUpdate` or `onYoyo`.
             * @param callback Your callback that will be invoked.
             * @param params The parameters to pass to the callback. Pass an empty array if you don't want to define any, but do wish to set the scope.
             * @returns This Tween instance.
             */
            setCallback(type: Phaser.Types.Tweens.TweenCallbackTypes, callback: Function, params?: any[]): this;

            /**
             * Sets this Tween state to PENDING.
             */
            setPendingState(): void;

            /**
             * Sets this Tween state to ACTIVE.
             */
            setActiveState(): void;

            /**
             * Sets this Tween state to LOOP_DELAY.
             */
            setLoopDelayState(): void;

            /**
             * Sets this Tween state to COMPLETE_DELAY.
             */
            setCompleteDelayState(): void;

            /**
             * Sets this Tween state to START_DELAY.
             */
            setStartDelayState(): void;

            /**
             * Sets this Tween state to PENDING_REMOVE.
             */
            setPendingRemoveState(): void;

            /**
             * Sets this Tween state to REMOVED.
             */
            setRemovedState(): void;

            /**
             * Sets this Tween state to FINISHED.
             */
            setFinishedState(): void;

            /**
             * Sets this Tween state to DESTROYED.
             */
            setDestroyedState(): void;

            /**
             * Returns `true` if this Tween has a _current_ state of PENDING, otherwise `false`.undefined
             * @returns `true` if this Tween has a _current_ state of PENDING, otherwise `false`.
             */
            isPending(): boolean;

            /**
             * Returns `true` if this Tween has a _current_ state of ACTIVE, otherwise `false`.undefined
             * @returns `true` if this Tween has a _current_ state of ACTIVE, otherwise `false`.
             */
            isActive(): boolean;

            /**
             * Returns `true` if this Tween has a _current_ state of LOOP_DELAY, otherwise `false`.undefined
             * @returns `true` if this Tween has a _current_ state of LOOP_DELAY, otherwise `false`.
             */
            isLoopDelayed(): boolean;

            /**
             * Returns `true` if this Tween has a _current_ state of COMPLETE_DELAY, otherwise `false`.undefined
             * @returns `true` if this Tween has a _current_ state of COMPLETE_DELAY, otherwise `false`.
             */
            isCompleteDelayed(): boolean;

            /**
             * Returns `true` if this Tween has a _current_ state of START_DELAY, otherwise `false`.undefined
             * @returns `true` if this Tween has a _current_ state of START_DELAY, otherwise `false`.
             */
            isStartDelayed(): boolean;

            /**
             * Returns `true` if this Tween has a _current_ state of PENDING_REMOVE, otherwise `false`.undefined
             * @returns `true` if this Tween has a _current_ state of PENDING_REMOVE, otherwise `false`.
             */
            isPendingRemove(): boolean;

            /**
             * Returns `true` if this Tween has a _current_ state of REMOVED, otherwise `false`.undefined
             * @returns `true` if this Tween has a _current_ state of REMOVED, otherwise `false`.
             */
            isRemoved(): boolean;

            /**
             * Returns `true` if this Tween has a _current_ state of FINISHED, otherwise `false`.undefined
             * @returns `true` if this Tween has a _current_ state of FINISHED, otherwise `false`.
             */
            isFinished(): boolean;

            /**
             * Returns `true` if this Tween has a _current_ state of DESTROYED, otherwise `false`.undefined
             * @returns `true` if this Tween has a _current_ state of DESTROYED, otherwise `false`.
             */
            isDestroyed(): boolean;

            /**
             * Handles the destroy process of this Tween, destroying all TweenData
             * objects, removing all event listeners, and nulling out internal references.
             * A Tween that has been destroyed cannot ever be played or used again.
             */
            destroy(): void;

        }

        /**
         * BaseTweenData is the class that the TweenData and TweenFrameData classes
         * extend from. You should not typically instantiate this class directly, but instead
         * use it to form your own tween data classes from, should you require it.
         * 
         * Prior to Phaser 3.60 the TweenData was just an object, but was refactored to a class,
         * to make it responsible for its own state and updating.
         */
        class BaseTweenData {
            /**
             * 
             * @param tween The tween this TweenData instance belongs to.
             * @param targetIndex The target index within the Tween targets array.
             * @param delay Function that returns the time in milliseconds before tween will start.
             * @param duration The duration of the tween in milliseconds.
             * @param yoyo Determines whether the tween should return back to its start value after hold has expired.
             * @param hold The time in milliseconds the tween will pause before repeating or returning to its starting value if yoyo is set to true.
             * @param repeat The number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.
             * @param repeatDelay The time in milliseconds before the repeat will start.
             * @param flipX Should toggleFlipX be called when yoyo or repeat happens?
             * @param flipY Should toggleFlipY be called when yoyo or repeat happens?
             */
            constructor(tween: Phaser.Tweens.Tween, targetIndex: number, delay: Function, duration: number, yoyo: boolean, hold: number, repeat: number, repeatDelay: number, flipX: boolean, flipY: boolean);

            /**
             * A reference to the Tween that this TweenData instance belongs to.
             */
            tween: Phaser.Tweens.Tween;

            /**
             * The index of the target within the Tween `targets` array.
             */
            targetIndex: number;

            /**
             * The duration of the tween in milliseconds, excluding any time required
             * for yoyo or repeats. A tween can never have a duration of zero, so this
             * will be set to 0.01 if the value is incorrectly less than or equal to zero.
             */
            duration: number;

            /**
             * The total calculated duration, in milliseconds, of this TweenData.
             * Factoring in the duration, repeats, delays and yoyos.
             */
            totalDuration: number;

            /**
             * The time, in milliseconds, before this tween will start playing.
             * 
             * This value is generated by the `getDelay` function.
             */
            delay: number;

            /**
             * This function returns the value to be used for `TweenData.delay`.
             */
            getDelay: Function;

            /**
             * Will the Tween ease back to its starting values, after reaching the end
             * and any `hold` value that may be set?
             */
            yoyo: boolean;

            /**
             * The time, in milliseconds, before this tween will start a yoyo to repeat.
             */
            hold: number;

            /**
             * The number of times this tween will repeat.
             * 
             * The tween will always run once regardless of this value,
             * so a repeat value of '1' will play the tween twice: I.e. the original
             * play-through and then it repeats that once (1).
             * 
             * If this value is set to -1 this tween will repeat forever.
             */
            repeat: number;

            /**
             * The time, in milliseconds, before the repeat will start.
             */
            repeatDelay: number;

            /**
             * How many repeats are left to run?
             */
            repeatCounter: number;

            /**
             * If `true` this Tween will call `toggleFlipX` on the Tween target
             * whenever it yoyo's or repeats. It will only be called if the target
             * has a function matching this name, like most Phaser GameObjects do.
             */
            flipX: boolean;

            /**
             * If `true` this Tween will call `toggleFlipY` on the Tween target
             * whenever it yoyo's or repeats. It will only be called if the target
             * has a function matching this name, like most Phaser GameObjects do.
             */
            flipY: boolean;

            /**
             * A value between 0 and 1 holding the progress of this TweenData.
             */
            progress: number;

            /**
             * The amount of time, in milliseconds, that has elapsed since this
             * TweenData was made active.
             */
            elapsed: number;

            /**
             * The state of this TweenData.
             */
            state: Phaser.Tweens.StateType;

            /**
             * Is this Tween Data currently waiting for a countdown to elapse, or not?
             */
            isCountdown: boolean;

            /**
             * Returns a reference to the target object belonging to this TweenData.undefined
             * @returns The target object. Can be any JavaScript object, but is typically a Game Object.
             */
            getTarget(): object;

            /**
             * Sets this TweenData's target object property to be the given value.
             * @param value The value to set on the target. If not given, sets it to the last `current` value.
             */
            setTargetValue(value?: number): void;

            /**
             * Sets this TweenData state to CREATED.
             */
            setCreatedState(): void;

            /**
             * Sets this TweenData state to DELAY.
             */
            setDelayState(): void;

            /**
             * Sets this TweenData state to PENDING_RENDER.
             */
            setPendingRenderState(): void;

            /**
             * Sets this TweenData state to PLAYING_FORWARD.
             */
            setPlayingForwardState(): void;

            /**
             * Sets this TweenData state to PLAYING_BACKWARD.
             */
            setPlayingBackwardState(): void;

            /**
             * Sets this TweenData state to HOLD_DELAY.
             */
            setHoldState(): void;

            /**
             * Sets this TweenData state to REPEAT_DELAY.
             */
            setRepeatState(): void;

            /**
             * Sets this TweenData state to COMPLETE.
             */
            setCompleteState(): void;

            /**
             * Returns `true` if this TweenData has a _current_ state of CREATED, otherwise `false`.undefined
             * @returns `true` if this TweenData has a _current_ state of CREATED, otherwise `false`.
             */
            isCreated(): boolean;

            /**
             * Returns `true` if this TweenData has a _current_ state of DELAY, otherwise `false`.undefined
             * @returns `true` if this TweenData has a _current_ state of DELAY, otherwise `false`.
             */
            isDelayed(): boolean;

            /**
             * Returns `true` if this TweenData has a _current_ state of PENDING_RENDER, otherwise `false`.undefined
             * @returns `true` if this TweenData has a _current_ state of PENDING_RENDER, otherwise `false`.
             */
            isPendingRender(): boolean;

            /**
             * Returns `true` if this TweenData has a _current_ state of PLAYING_FORWARD, otherwise `false`.undefined
             * @returns `true` if this TweenData has a _current_ state of PLAYING_FORWARD, otherwise `false`.
             */
            isPlayingForward(): boolean;

            /**
             * Returns `true` if this TweenData has a _current_ state of PLAYING_BACKWARD, otherwise `false`.undefined
             * @returns `true` if this TweenData has a _current_ state of PLAYING_BACKWARD, otherwise `false`.
             */
            isPlayingBackward(): boolean;

            /**
             * Returns `true` if this TweenData has a _current_ state of HOLD_DELAY, otherwise `false`.undefined
             * @returns `true` if this TweenData has a _current_ state of HOLD_DELAY, otherwise `false`.
             */
            isHolding(): boolean;

            /**
             * Returns `true` if this TweenData has a _current_ state of REPEAT_DELAY, otherwise `false`.undefined
             * @returns `true` if this TweenData has a _current_ state of REPEAT_DELAY, otherwise `false`.
             */
            isRepeating(): boolean;

            /**
             * Returns `true` if this TweenData has a _current_ state of COMPLETE, otherwise `false`.undefined
             * @returns `true` if this TweenData has a _current_ state of COMPLETE, otherwise `false`.
             */
            isComplete(): boolean;

            /**
             * Internal method used as part of the playback process that checks if this
             * TweenData should yoyo, repeat, or has completed.
             * @param diff Any extra time that needs to be accounted for in the elapsed and progress values.
             */
            setStateFromEnd(diff: number): void;

            /**
             * Internal method used as part of the playback process that checks if this
             * TweenData should repeat or has completed.
             * @param diff Any extra time that needs to be accounted for in the elapsed and progress values.
             */
            setStateFromStart(diff: number): void;

            /**
             * Internal method that resets this Tween Data entirely, including the progress and elapsed values.
             * 
             * Called automatically by the parent Tween. Should not be called directly.
             */
            reset(): void;

            /**
             * Internal method that handles repeating or yoyo'ing this TweenData.
             * 
             * Called automatically by `setStateFromStart` and `setStateFromEnd`.
             * @param diff Any extra time that needs to be accounted for in the elapsed and progress values.
             * @param setStart Set the TweenData start values?
             * @param isYoyo Is this call a Yoyo check?
             */
            onRepeat(diff: number, setStart: boolean, isYoyo: boolean): void;

            /**
             * Immediately destroys this TweenData, nulling of all its references.
             */
            destroy(): void;

        }

        /**
         * A Tween is able to manipulate the properties of one or more objects to any given value, based
         * on a duration and type of ease. They are rarely instantiated directly and instead should be
         * created via the TweenManager.
         * 
         * Please note that a Tween will not manipulate any property that begins with an underscore.
         */
        class Tween extends Phaser.Tweens.BaseTween {
            /**
             * 
             * @param parent A reference to the Tween Manager that owns this Tween.
             * @param targets An array of targets to be tweened. This array should not be manipulated outside of this Tween.
             */
            constructor(parent: Phaser.Tweens.TweenManager, targets: object[]);

            /**
             * An array of references to the target/s this Tween is operating on.
             * 
             * This array should not be manipulated outside of this Tween.
             */
            targets: object[];

            /**
             * Cached target total.
             * 
             * Used internally and should be treated as read-only.
             * 
             * This is not necessarily the same as the data total.
             */
            totalTargets: number;

            /**
             * Is this Tween currently seeking?
             * 
             * This boolean is toggled in the `Tween.seek` method.
             * 
             * When a tween is seeking, by default it will not dispatch any events or callbacks.
             */
            readonly isSeeking: boolean;

            /**
             * Does this Tween loop or repeat infinitely?
             */
            readonly isInfinite: boolean;

            /**
             * Elapsed time in milliseconds of this run through of the Tween.
             */
            elapsed: number;

            /**
             * Total elapsed time in milliseconds of the entire Tween, including looping.
             */
            totalElapsed: number;

            /**
             * Time in milliseconds for the whole Tween to play through once, excluding loop amounts and loop delays.
             * 
             * This value is set in the `Tween.initTweenData` method and is zero before that point.
             */
            duration: number;

            /**
             * Value between 0 and 1. The amount of progress through the Tween, excluding loops.
             */
            progress: number;

            /**
             * Time in milliseconds it takes for the Tween to complete a full playthrough (including looping)
             * 
             * For an infinite Tween, this value is a very large integer.
             */
            totalDuration: number;

            /**
             * The amount of progress that has been made through the entire Tween, including looping.
             * 
             * A value between 0 and 1.
             */
            totalProgress: number;

            /**
             * Is this Tween a Number Tween? Number Tweens are a special kind of tween that don't have a target.
             */
            isNumberTween: boolean;

            /**
             * Adds a new TweenData to this Tween. Typically, this method is called
             * automatically by the TweenBuilder, however you can also invoke it
             * yourself.
             * @param targetIndex The target index within the Tween targets array.
             * @param key The property of the target to tween.
             * @param getEnd What the property will be at the END of the Tween.
             * @param getStart What the property will be at the START of the Tween.
             * @param getActive If not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.
             * @param ease The ease function this tween uses.
             * @param delay Function that returns the time in milliseconds before tween will start.
             * @param duration The duration of the tween in milliseconds.
             * @param yoyo Determines whether the tween should return back to its start value after hold has expired.
             * @param hold The time in milliseconds the tween will pause before repeating or returning to its starting value if yoyo is set to true.
             * @param repeat The number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.
             * @param repeatDelay The time in milliseconds before the repeat will start.
             * @param flipX Should toggleFlipX be called when yoyo or repeat happens?
             * @param flipY Should toggleFlipY be called when yoyo or repeat happens?
             * @param interpolation The interpolation function to be used for arrays of data. Defaults to 'null'.
             * @param interpolationData The array of interpolation data to be set. Defaults to 'null'.
             * @returns The TweenData instance that was added.
             */
            add(targetIndex: number, key: string, getEnd: Phaser.Types.Tweens.GetEndCallback, getStart: Phaser.Types.Tweens.GetStartCallback, getActive: Phaser.Types.Tweens.GetActiveCallback | undefined, ease: Function, delay: Function, duration: number, yoyo: boolean, hold: number, repeat: number, repeatDelay: number, flipX: boolean, flipY: boolean, interpolation: Function | undefined, interpolationData: number[] | undefined): Phaser.Tweens.TweenData;

            /**
             * Adds a new TweenFrameData to this Tween. Typically, this method is called
             * automatically by the TweenBuilder, however you can also invoke it
             * yourself.
             * @param targetIndex The target index within the Tween targets array.
             * @param texture The texture to set on the target at the end of the tween.
             * @param frame The texture frame to set on the target at the end of the tween.
             * @param delay Function that returns the time in milliseconds before tween will start.
             * @param duration The duration of the tween in milliseconds.
             * @param hold The time in milliseconds the tween will pause before repeating or returning to its starting value if yoyo is set to true.
             * @param repeat The number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.
             * @param repeatDelay The time in milliseconds before the repeat will start.
             * @param flipX Should toggleFlipX be called when yoyo or repeat happens?
             * @param flipY Should toggleFlipY be called when yoyo or repeat happens?
             * @returns The TweenFrameData instance that was added.
             */
            addFrame(targetIndex: number, texture: string, frame: string | number, delay: Function, duration: number, hold: number, repeat: number, repeatDelay: number, flipX: boolean, flipY: boolean): Phaser.Tweens.TweenFrameData;

            /**
             * Returns the current value of the specified Tween Data.
             * 
             * If this Tween has been destroyed, it will return `null`.
             * @param index The Tween Data to return the value from. Default 0.
             * @returns The value of the requested Tween Data, or `null` if this Tween has been destroyed.
             */
            getValue(index?: number): number | null;

            /**
             * See if this Tween is currently acting upon the given target.
             * @param target The target to check against this Tween.
             * @returns `true` if the given target is a target of this Tween, otherwise `false`.
             */
            hasTarget(target: object): boolean;

            /**
             * Updates the 'end' value of the given property across all matching targets, as long
             * as this Tween is currently playing (either forwards or backwards).
             * 
             * Calling this does not adjust the duration of the Tween, or the current progress.
             * 
             * You can optionally tell it to set the 'start' value to be the current value.
             * 
             * If this Tween is in any other state other than playing then calling this method has no effect.
             * 
             * Additionally, if the Tween repeats, is reset, or is seeked, it will revert to the original
             * starting and ending values.
             * @param key The property to set the new value for. You cannot update the 'texture' property via this method.
             * @param value The new value of the property.
             * @param startToCurrent Should this change set the start value to be the current value? Default false.
             * @returns This Tween instance.
             */
            updateTo(key: string, value: number, startToCurrent?: boolean): this;

            /**
             * Restarts the Tween from the beginning.
             * 
             * If the Tween has already finished and been destroyed, restarting it will throw an error.
             * 
             * If you wish to restart the Tween from a specific point, use the `Tween.seek` method instead.undefined
             * @returns This Tween instance.
             */
            restart(): this;

            /**
             * Internal method that advances to the next state of the Tween during playback.undefined
             * @returns `true` if this Tween has completed, otherwise `false`.
             */
            nextState(): boolean;

            /**
             * Internal method that handles this tween completing and starting
             * the next tween in the chain, if any.
             */
            onCompleteHandler(): void;

            /**
             * Starts a Tween playing.
             * 
             * You only need to call this method if you have configured the tween to be paused on creation.
             * 
             * If the Tween is already playing, calling this method again will have no effect. If you wish to
             * restart the Tween, use `Tween.restart` instead.
             * 
             * Calling this method after the Tween has completed will start the Tween playing again from the beginning.
             * This is the same as calling `Tween.seek(0)` and then `Tween.play()`.undefined
             * @returns This Tween instance.
             */
            play(): this;

            /**
             * Seeks to a specific point in the Tween.
             * 
             * The given amount is a value in milliseconds that represents how far into the Tween
             * you wish to seek, based on the start of the Tween.
             * 
             * Note that the seek amount takes the entire duration of the Tween into account, including delays, loops and repeats.
             * For example, a Tween that lasts for 2 seconds, but that loops 3 times, would have a total duration of 6 seconds,
             * so seeking to 3000 ms would seek to the Tweens half-way point based on its _entire_ duration.
             * 
             * Prior to Phaser 3.60 this value was given as a number between 0 and 1 and didn't
             * work for Tweens that had an infinite repeat. This new method works for all Tweens.
             * 
             * Seeking works by resetting the Tween to its initial values and then iterating through the Tween at `delta`
             * jumps per step. The longer the Tween, the longer this can take. If you need more precision you can
             * reduce the delta value. If you need a faster seek, you can increase it. When the Tween is
             * reset it will refresh the starting and ending values. If these are coming from a dynamic function,
             * or a random array, it will be called for each seek.
             * 
             * While seeking the Tween will _not_ emit any of its events or callbacks unless
             * the 3rd parameter is set to `true`.
             * 
             * If this Tween is paused, seeking will not change this fact. It will advance the Tween
             * to the desired point and then pause it again.
             * @param amount The number of milliseconds to seek into the Tween from the beginning. Default 0.
             * @param delta The size of each step when seeking through the Tween. A higher value completes faster but at the cost of less precision. Default 16.6.
             * @param emit While seeking, should the Tween emit any of its events or callbacks? The default is 'false', i.e. to seek silently. Default false.
             * @returns This Tween instance.
             */
            seek(amount?: number, delta?: number, emit?: boolean): this;

            /**
             * Initialises all of the Tween Data and Tween values.
             * 
             * This is called automatically and should not typically be invoked directly.
             * @param isSeeking Is the Tween Data being reset as part of a seek? Default false.
             */
            initTweenData(isSeeking?: boolean): void;

            /**
             * Resets this Tween ready for another play-through.
             * 
             * This is called automatically from the Tween Manager, or from the parent TweenChain,
             * and should not typically be invoked directly.
             * 
             * If you wish to restart this Tween, use the `Tween.restart` or `Tween.seek` methods instead.
             * @param skipInit Skip resetting the TweenData and Active State? Default false.
             * @returns This Tween instance.
             */
            reset(skipInit?: boolean): this;

            /**
             * Internal method that advances the Tween based on the time values.
             * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
             * @returns Returns `true` if this Tween has finished and should be removed from the Tween Manager, otherwise returns `false`.
             */
            update(delta: number): boolean;

            /**
             * Moves this Tween forward by the given amount of milliseconds.
             * 
             * It will only advance through the current loop of the Tween. For example, if the
             * Tween is set to repeat or yoyo, it can only fast forward through a single
             * section of the sequence. Use `Tween.seek` for more complex playhead control.
             * 
             * If the Tween is paused or has already finished, calling this will have no effect.
             * @param ms The number of milliseconds to advance this Tween by.
             * @returns This Tween instance.
             */
            forward(ms: number): this;

            /**
             * Moves this Tween backward by the given amount of milliseconds.
             * 
             * It will only rewind through the current loop of the Tween. For example, if the
             * Tween is set to repeat or yoyo, it can only rewind through a single
             * section of the sequence. Use `Tween.seek` for more complex playhead control.
             * 
             * If the Tween is paused or has already finished, calling this will have no effect.
             * @param ms The number of milliseconds to rewind this Tween by.
             * @returns This Tween instance.
             */
            rewind(ms: number): this;

            /**
             * Internal method that will emit a Tween based Event and invoke the given callback.
             * @param event The Event to be dispatched.
             * @param callback The name of the callback to be invoked. Can be `null` or `undefined` to skip invocation.
             */
            dispatchEvent(event: Phaser.Types.Tweens.Event, callback?: Phaser.Types.Tweens.TweenCallbackTypes): void;

            /**
             * Handles the destroy process of this Tween, clearing out the
             * Tween Data and resetting the targets. A Tween that has been
             * destroyed cannot ever be played or used again.
             */
            destroy(): void;

        }

        /**
         * A TweenChain is a special type of Tween that allows you to create a sequence of Tweens, chained to one-another,
         * and add them to the Tween Manager.
         * 
         * The tweens are played in order, from start to finish. You can optionally set the chain
         * to repeat as many times as you like. Once the chain has finished playing, or repeating if set,
         * all tweens in the chain will be destroyed automatically. To override this, set the 'persist'
         * argument to 'true'.
         * 
         * Playback will start immediately unless the _first_ Tween has been configured to be paused.
         * 
         * Please note that Tweens will not manipulate any target property that begins with an underscore.
         */
        class TweenChain extends Phaser.Tweens.BaseTween {
            /**
             * 
             * @param parent A reference to the Tween Manager, or TweenChain, that owns this TweenChain.
             */
            constructor(parent: Phaser.Tweens.TweenManager | Phaser.Tweens.TweenChain);

            /**
             * A reference to the Tween that this TweenChain is currently playing.
             */
            currentTween: Phaser.Tweens.Tween;

            /**
             * A reference to the data array index of the currently playing tween.
             */
            currentIndex: number;

            /**
             * Prepares this TweenChain for playback.
             * 
             * Called automatically by the TweenManager. Should not be called directly.undefined
             * @returns This TweenChain instance.
             */
            init(): this;

            /**
             * Create a sequence of Tweens, chained to one-another, and add them to this TweenChain.
             * 
             * The tweens are played in order, from start to finish. You can optionally set the chain
             * to repeat as many times as you like. Once the chain has finished playing, or repeating if set,
             * all tweens in the chain will be destroyed automatically. To override this, set the 'persist'
             * argument to 'true'.
             * 
             * Playback will start immediately unless the _first_ Tween has been configured to be paused.
             * 
             * Please note that Tweens will not manipulate any target property that begins with an underscore.
             * @param tweens An array of Tween configuration objects for the Tweens in this chain.
             * @returns This TweenChain instance.
             */
            add(tweens: Phaser.Types.Tweens.TweenBuilderConfig[] | object[]): this;

            /**
             * See if any of the tweens in this Tween Chain is currently acting upon the given target.
             * @param target The target to check against this TweenChain.
             * @returns `true` if the given target is a target of this TweenChain, otherwise `false`.
             */
            hasTarget(target: object): boolean;

            /**
             * Restarts the TweenChain from the beginning.
             * 
             * If this TweenChain was configured to have a loop, or start delay, those
             * are reset to their initial values as well. It will also dispatch the
             * `onActive` callback and event again.undefined
             * @returns This TweenChain instance.
             */
            restart(): this;

            /**
             * Resets the given Tween.
             * 
             * It will seek to position 0 and playback will start on the next frame.
             * @param tween The Tween to be reset.
             * @returns This TweenChain instance.
             */
            reset(tween: Phaser.Tweens.Tween): this;

            /**
             * Internal method that advances to the next state of the TweenChain playback.undefined
             * @returns `true` if this TweenChain has completed, otherwise `false`.
             */
            nextState(): boolean;

            /**
             * Starts this TweenChain playing.
             * 
             * You only need to call this method if you have configured this TweenChain to be paused on creation.
             * 
             * If the TweenChain is already playing, calling this method again will have no effect. If you wish to
             * restart the chain, use `TweenChain.restart` instead.
             * 
             * Calling this method after the TweenChain has completed will start the chain playing again from the beginning.undefined
             * @returns This TweenChain instance.
             */
            play(): this;

            /**
             * Internal method that resets all of the Tweens and the current index pointer.
             */
            resetTweens(): void;

            /**
             * Internal method that advances the TweenChain based on the time values.
             * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.
             * @returns Returns `true` if this TweenChain has finished and should be removed from the Tween Manager, otherwise returns `false`.
             */
            update(delta: number): boolean;

            /**
             * Immediately advances to the next Tween in the chain.
             * 
             * This is typically called internally, but can be used if you need to
             * advance playback for some reason.undefined
             * @returns `true` if there are no more Tweens in the chain, otherwise `false`.
             */
            nextTween(): boolean;

            /**
             * Sets the current active Tween to the given index, based on its
             * entry in the TweenChain data array.
             * @param index The index of the Tween to be made current.
             */
            setCurrentTween(index: number): void;

            /**
             * Internal method that will emit a TweenChain based Event and invoke the given callback.
             * @param event The Event to be dispatched.
             * @param callback The name of the callback to be invoked. Can be `null` or `undefined` to skip invocation.
             */
            dispatchEvent(event: Phaser.Types.Tweens.Event, callback?: Phaser.Types.Tweens.TweenCallbackTypes): void;

            /**
             * Immediately destroys this TweenChain, nulling out all of its references.
             */
            destroy(): void;

        }

        /**
         * The TweenData is a class that contains a single target and property that is being tweened.
         * 
         * Tweens create TweenData instances when they are created, with one TweenData instance per
         * target, per property. A Tween can own multiple TweenData instances, but a TweenData only
         * ever belongs to a single Tween.
         * 
         * You should not typically create these yourself, but rather use the TweenBuilder,
         * or the `Tween.add` method.
         * 
         * Prior to Phaser 3.60 the TweenData was just an object, but was refactored to a class,
         * to make it responsible for its own state and updating.
         */
        class TweenData extends Phaser.Tweens.BaseTweenData {
            /**
             * 
             * @param tween The tween this TweenData instance belongs to.
             * @param targetIndex The target index within the Tween targets array.
             * @param key The property of the target to tween.
             * @param getEnd What the property will be at the END of the Tween.
             * @param getStart What the property will be at the START of the Tween.
             * @param getActive If not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.
             * @param ease The ease function this tween uses.
             * @param delay Function that returns the time in milliseconds before tween will start.
             * @param duration The duration of the tween in milliseconds.
             * @param yoyo Determines whether the tween should return back to its start value after hold has expired.
             * @param hold The time in milliseconds the tween will pause before repeating or returning to its starting value if yoyo is set to true.
             * @param repeat The number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.
             * @param repeatDelay The time in milliseconds before the repeat will start.
             * @param flipX Should toggleFlipX be called when yoyo or repeat happens?
             * @param flipY Should toggleFlipY be called when yoyo or repeat happens?
             * @param interpolation The interpolation function to be used for arrays of data. Defaults to 'null'.
             * @param interpolationData The array of interpolation data to be set. Defaults to 'null'.
             */
            constructor(tween: Phaser.Tweens.Tween, targetIndex: number, key: string, getEnd: Phaser.Types.Tweens.GetEndCallback, getStart: Phaser.Types.Tweens.GetStartCallback, getActive: Phaser.Types.Tweens.GetActiveCallback | undefined, ease: Function, delay: Function, duration: number, yoyo: boolean, hold: number, repeat: number, repeatDelay: number, flipX: boolean, flipY: boolean, interpolation: Function | undefined, interpolationData: number[] | undefined);

            /**
             * The property of the target to be tweened.
             */
            readonly key: string;

            /**
             * A function that returns what to set the target property to,
             * the moment the TweenData is invoked.
             * 
             * This is called when this TweenData is initialised or reset.
             */
            getActiveValue: Phaser.Types.Tweens.GetActiveCallback | null;

            /**
             * A function that returns what to set the target property to
             * at the end of the tween.
             * 
             * This is called when the tween starts playing, after any initial
             * start delay, or if the tween is reset, or is set to repeat.
             */
            getEndValue: Phaser.Types.Tweens.GetEndCallback;

            /**
             * A function that returns what to set the target property to
             * at the start of the tween.
             * 
             * This is called when the tween starts playing, after any initial
             * start delay, or if the tween is reset, or is set to repeat.
             */
            getStartValue: Phaser.Types.Tweens.GetStartCallback;

            /**
             * The ease function this Tween uses to calculate the target value.
             */
            ease: Function;

            /**
             * The target's starting value, as returned by `getStartValue`.
             */
            start: number;

            /**
             * The target's value from the previous step.
             */
            previous: number;

            /**
             * The target's current value, as recorded in the most recent step.
             */
            current: number;

            /**
             * The target's ending value, as returned by `getEndValue`.
             */
            end: number;

            /**
             * The interpolation function to be used for arrays of data.
             */
            interpolation: Function | null;

            /**
             * The array of data to interpolate, if interpolation is being used.
             */
            interpolationData: number[] | null;

            /**
             * Internal method that resets this Tween Data entirely, including the progress and elapsed values.
             * 
             * Called automatically by the parent Tween. Should not be called directly.
             * @param isSeeking Is the Tween Data being reset as part of a Tween seek? Default false.
             */
            reset(isSeeking?: boolean): void;

            /**
             * Internal method that advances this TweenData based on the delta value given.
             * @param delta The elapsed delta time in ms.
             * @returns `true` if this TweenData is still playing, or `false` if it has finished entirely.
             */
            update(delta: number): boolean;

            /**
             * Internal method that will emit a TweenData based Event on the
             * parent Tween and also invoke the given callback, if provided.
             * @param event The Event to be dispatched.
             * @param callback The name of the callback to be invoked. Can be `null` or `undefined` to skip invocation.
             */
            dispatchEvent(event: Phaser.Types.Tweens.Event, callback?: Phaser.Types.Tweens.TweenCallbackTypes): void;

            /**
             * Immediately destroys this TweenData, nulling out all of its references.
             */
            destroy(): void;

        }

        /**
         * The TweenFrameData is a class that contains a single target that will change the texture frame
         * at the conclusion of the Tween.
         * 
         * TweenFrameData instances are typically created by the TweenBuilder automatically, when it
         * detects the presence of a 'texture' property as the key being tweened.
         * 
         * A Tween can own multiple TweenFrameData instances, but a TweenFrameData only
         * ever belongs to a single Tween.
         * 
         * You should not typically create these yourself, but rather use the TweenBuilder,
         * or the `Tween.addFrame` method.
         */
        class TweenFrameData extends Phaser.Tweens.BaseTweenData {
            /**
             * 
             * @param tween The tween this TweenData instance belongs to.
             * @param targetIndex The target index within the Tween targets array.
             * @param texture The texture key to set at the end of this tween.
             * @param frame The texture frame to set at the end of this tween.
             * @param delay Function that returns the time in milliseconds before tween will start.
             * @param duration The duration of the tween in milliseconds.
             * @param hold The time in milliseconds the tween will pause before repeating or returning to its starting texture and frame if yoyo is set to true.
             * @param repeat The number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.
             * @param repeatDelay The time in milliseconds before the repeat will start.
             * @param flipX Should toggleFlipX be called when yoyo or repeat happens?
             * @param flipY Should toggleFlipY be called when yoyo or repeat happens?
             */
            constructor(tween: Phaser.Tweens.Tween, targetIndex: number, texture: string, frame: string | number, delay: Function, duration: number, hold: number, repeat: number, repeatDelay: number, flipX: boolean, flipY: boolean);

            /**
             * The property of the target to be tweened.
             * 
             * Always 'texture' for a TweenFrameData object.
             */
            readonly key: string;

            /**
             * The texture to be set at the start of the tween.
             */
            startTexture: string;

            /**
             * The texture to be set at the end of the tween.
             */
            endTexture: string;

            /**
             * The frame to be set at the start of the tween.
             */
            startFrame: string | number;

            /**
             * The frame to be set at the end of the tween.
             */
            endFrame: string | number;

            /**
             * Will the Tween revert back to its starting texture and frame, after reaching the end
             * and any `hold` value that may be set?
             */
            yoyo: boolean;

            /**
             * Internal method that resets this Tween Data entirely, including the progress and elapsed values.
             * 
             * Called automatically by the parent Tween. Should not be called directly.
             * @param isSeeking Is the Tween Data being reset as part of a Tween seek? Default false.
             */
            reset(isSeeking?: boolean): void;

            /**
             * Internal method that advances this TweenData based on the delta value given.
             * @param delta The elapsed delta time in ms.
             * @returns `true` if this TweenData is still playing, or `false` if it has finished entirely.
             */
            update(delta: number): boolean;

            /**
             * Internal method that will emit a TweenData based Event on the
             * parent Tween and also invoke the given callback, if provided.
             * @param event The Event to be dispatched.
             * @param callback The name of the callback to be invoked. Can be `null` or `undefined` to skip invocation.
             */
            dispatchEvent(event: Phaser.Types.Tweens.Event, callback?: Phaser.Types.Tweens.TweenCallbackTypes): void;

            /**
             * Immediately destroys this TweenData, nulling of all its references.
             */
            destroy(): void;

        }

        /**
         * Phaser Tween States.
         */
        enum States {
            /**
             * TweenData state. The TweenData has been created but has not yet started processing.
             */
            CREATED,
            /**
             * TweenData state. The TweenData is waiting for its initial delay to elapse before it begins playing.
             */
            DELAY,
            /**
             * TweenData state. The TweenData is waiting for its target Game Object to be rendered before it begins playing.
             */
            PENDING_RENDER,
            /**
             * TweenData state. The TweenData is actively interpolating its properties in the forward direction, from start value to end value.
             */
            PLAYING_FORWARD,
            /**
             * TweenData state. The TweenData is actively interpolating its properties in the backward direction, from end value back to start value.
             */
            PLAYING_BACKWARD,
            /**
             * TweenData state. The TweenData has reached its end value and is waiting for a hold delay to elapse before reversing or repeating.
             */
            HOLD_DELAY,
            /**
             * TweenData state. The TweenData has completed a playthrough and is waiting for a repeat delay to elapse before starting the next repeat.
             */
            REPEAT_DELAY,
            /**
             * TweenData state. The TweenData has finished all of its repeats and its playback is complete.
             */
            COMPLETE,
            /**
             * Tween state. The Tween has been created but has not yet been added to the Tween Manager.
             */
            PENDING,
            /**
             * Tween state. The Tween is active within the Tween Manager. This means it is either playing,
             * or was playing and is currently paused, but in both cases it's still being processed by
             * the Tween Manager, so is considered 'active'.
             */
            ACTIVE,
            /**
             * Tween state. The Tween is waiting for a loop countdown to elapse.
             */
            LOOP_DELAY,
            /**
             * Tween state. The Tween is waiting for a complete delay to elapse.
             */
            COMPLETE_DELAY,
            /**
             * Tween state. The Tween is waiting for a starting delay to elapse.
             */
            START_DELAY,
            /**
             * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.
             */
            PENDING_REMOVE,
            /**
             * Tween state. The Tween has been removed from the Tween Manager.
             */
            REMOVED,
            /**
             * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,
             * so will not be automatically removed by the Tween Manager.
             */
            FINISHED,
            /**
             * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.
             */
            DESTROYED,
            /**
             * A large integer value used for 'infinite' style countdowns.
             * 
             * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not
             * supported on IE.
             */
            MAX,
        }

        /**
         * Phaser Tween state constants.
         */
        type StateType = Phaser.Tweens.States;

    }

    namespace Utils {
        /**
         * A NOOP (No Operation) callback function.
         * 
         * Used internally by Phaser when it's more expensive to determine if a callback exists
         * than it is to just invoke an empty function.
         */
        function NOOP(): void;

        /**
         * A NULL OP callback function.
         * 
         * This function always returns `null`.
         * 
         * Used internally by Phaser when it's more expensive to determine if a callback exists
         * than it is to just invoke an empty function.
         */
        function NULL(): void;

        namespace Array {
            /**
             * Adds the given item, or array of items, to the array.
             * 
             * Each item must be unique within the array.
             * 
             * The array is modified in-place. The added item, or array of added items, is returned. Returns `null` if no items were added (e.g. the array is already at the limit, or all items already exist in the array).
             * 
             * You can optionally specify a limit to the maximum size of the array. If the quantity of items being
             * added will take the array length over this limit, it will stop adding once the limit is reached.
             * 
             * You can optionally specify a callback to be invoked for each item successfully added to the array.
             * @param array The array to be added to.
             * @param item The item, or array of items, to add to the array. Each item must be unique within the array.
             * @param limit Optional limit which caps the size of the array.
             * @param callback A callback to be invoked for each item successfully added to the array.
             * @param context The context in which the callback is invoked.
             * @returns The item, or array of items, that were successfully added to the array, or `null` if nothing was added.
             */
            function Add(array: any[], item: any | any[], limit?: number, callback?: Function, context?: object): any[];

            /**
             * Adds the given item, or array of items, to the array starting at the index specified.
             * 
             * Each item must be unique within the array.
             * 
             * Existing elements in the array are shifted up.
             * 
             * The array is modified in-place. The inserted item, or array of inserted items, is returned. Returns `null` if no items were added (e.g. the array is full, or all items were already present).
             * 
             * You can optionally specify a limit to the maximum size of the array. If the quantity of items being
             * added will take the array length over this limit, it will stop adding once the limit is reached.
             * 
             * You can optionally specify a callback to be invoked for each item successfully added to the array.
             * @param array The array to be added to.
             * @param item The item, or array of items, to add to the array.
             * @param index The index in the array where the item will be inserted. Default 0.
             * @param limit Optional limit which caps the size of the array.
             * @param callback A callback to be invoked for each item successfully added to the array.
             * @param context The context in which the callback is invoked.
             * @returns The item, or array of items, that were successfully inserted, or `null` if nothing was added.
             */
            function AddAt(array: any[], item: any | any[], index?: number, limit?: number, callback?: Function, context?: object): any[];

            /**
             * Moves the given element to the top of the array.
             * The array is modified in-place.
             * @param array The array to modify.
             * @param item The element to move to the top of the array.
             * @returns The element that was moved.
             */
            function BringToTop(array: any[], item: any): any;

            /**
             * Returns the total number of elements in the array which have a property matching the given value.
             * @param array The array to search.
             * @param property The property to test on each array element.
             * @param value The value to test the property against. Must pass a strict (`===`) comparison check.
             * @param startIndex An optional start index to search from.
             * @param endIndex An optional end index to search to.
             * @returns The total number of elements with properties matching the given value.
             */
            function CountAllMatching(array: any[], property: string, value: any, startIndex?: number, endIndex?: number): number;

            /**
             * Passes each element in the array to the given callback.
             * @param array The array to iterate over.
             * @param callback A callback to be invoked for each item in the array.
             * @param context The context in which the callback is invoked.
             * @param args Additional arguments that will be passed to the callback, after the current array item.
             * @returns The input array.
             */
            function Each(array: any[], callback: Function, context: object, ...args: any[]): any[];

            /**
             * Passes each element in the array, between the start and end indexes, to the given callback.
             * @param array The array to iterate over.
             * @param callback A callback to be invoked for each item in the array.
             * @param context The context in which the callback is invoked.
             * @param startIndex The start index to iterate from.
             * @param endIndex The end index to iterate to.
             * @param args Additional arguments that will be passed to the callback, after the child.
             * @returns The input array.
             */
            function EachInRange(array: any[], callback: Function, context: object, startIndex: number, endIndex: number, ...args: any[]): any[];

            /**
             * Searches a pre-sorted array for the closest value to the given number.
             * 
             * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,
             * and will check for the closest value of those to the given number.
             * @param value The value to search for in the array.
             * @param array The array to search, which must be sorted.
             * @param key An optional property key. If specified the array element's property will be checked against value.
             * @returns The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.
             */
            function FindClosestInSorted(value: number, array: any[], key?: string): number | any;

            /**
             * Takes an array and deeply flattens it, recursively unpacking any nested arrays into
             * a single flat array. The original array is not modified. An optional output array
             * can be provided to collect the results, which is useful when calling this function
             * recursively or when appending to an existing array.
             * @param array The array to flatten.
             * @param output An array to hold the results in.
             * @returns The flattened output array.
             */
            function Flatten(array: any[], output?: any[]): any[];

            /**
             * Returns all elements in the array.
             * 
             * You can optionally specify a matching criteria using the `property` and `value` arguments.
             * 
             * For example: `GetAll('visible', true)` would return only elements that have their visible property set to `true`.
             * 
             * Optionally you can specify a start and end index. For example if the array had 100 elements,
             * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only
             * the first 50 elements.
             * @param array The array to search.
             * @param property The property to test on each array element.
             * @param value The value to test the property against. Must pass a strict (`===`) comparison check.
             * @param startIndex An optional start index to search from.
             * @param endIndex An optional end index to search to.
             * @returns All matching elements from the array.
             */
            function GetAll(array: any[], property?: string, value?: any, startIndex?: number, endIndex?: number): any[];

            /**
             * Returns the first element in the array.
             * 
             * You can optionally specify a matching criteria using the `property` and `value` arguments.
             * 
             * For example: `GetFirst('visible', true)` would return the first element that had its `visible` property set to `true`.
             * 
             * Optionally you can specify a start and end index. For example if the array had 100 elements,
             * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.
             * 
             * You can also specify a negative `startIndex`, such as `-1`, which would start the search at the end of the array
             * 
             * You can also specify a negative `startIndex`, such as `-1`, which would start the search at the end of the array
             * @param array The array to search.
             * @param property The property to test on each array element.
             * @param value The value to test the property against. Must pass a strict (`===`) comparison check.
             * @param startIndex An optional start index to search from. You can also set `startIndex` to -1 to start the search from the end of the array. Default 0.
             * @param endIndex An optional end index to search up to (but not included) Default array.length.
             * @returns The first matching element from the array, or `null` if no element could be found in the range given.
             */
            function GetFirst(array: any[], property?: string, value?: any, startIndex?: number, endIndex?: number): object | null;

            /**
             * Returns a Random element from the array.
             * @param array The array to select the random entry from.
             * @param startIndex An optional start index. Default 0.
             * @param length An optional length, the total number of elements (from the startIndex) to choose from. Default array.length.
             * @returns A random element from the array, or `null` if no element could be found in the range given.
             */
            function GetRandom<T>(array: T[], startIndex?: number, length?: number): T;

            /**
             * Moves the given array element above another one in the array.
             * If the given element is already above the other, it isn't moved.
             * Above means toward the end of the array.
             * The array is modified in-place.
             * @param array The input array.
             * @param item1 The element to move above the base element.
             * @param item2 The base element.
             * @returns The input array.
             */
            function MoveAbove(array: any[], item1: any, item2: any): any[];

            /**
             * Moves the given array element below another one in the array.
             * If the given element is already below the other, it isn't moved.
             * Below means toward the start of the array.
             * The array is modified in-place.
             * @param array The input array.
             * @param item1 The element to move below the base element.
             * @param item2 The base element.
             * @returns The input array.
             */
            function MoveBelow(array: any[], item1: any, item2: any): any[];

            /**
             * Moves the given array element down one place in the array.
             * The array is modified in-place.
             * @param array The input array.
             * @param item The element to move down the array.
             * @returns The input array, with the item moved down one place.
             */
            function MoveDown(array: any[], item: any): any[];

            /**
             * Moves an element in an array to a new position within the same array.
             * The array is modified in-place.
             * @param array The array.
             * @param item The element to move.
             * @param index The new index that the element will be moved to.
             * @returns The element that was moved.
             */
            function MoveTo(array: any[], item: any, index: number): any;

            /**
             * Moves the given array element up one place in the array.
             * The array is modified in-place.
             * @param array The input array.
             * @param item The element to move up the array.
             * @returns The input array.
             */
            function MoveUp(array: any[], item: any): any[];

            /**
             * Create an array representing the range of numbers (usually integers), between, and inclusive of,
             * the given `start` and `end` arguments. For example:
             * 
             * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`
             * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`
             * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`
             * 
             * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.
             * 
             * You can optionally provide a prefix and / or suffix string. If given the array will contain
             * strings, not integers. For example:
             * 
             * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]`
             * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]`
             * @param start The minimum value the array starts with.
             * @param end The maximum value the array contains.
             * @param prefix Optional prefix to place before the number. If provided the array will contain strings, not integers.
             * @param suffix Optional suffix to place after the number. If provided the array will contain strings, not integers.
             * @returns The array of number values, or strings if a prefix or suffix was provided.
             */
            function NumberArray(start: number, end: number, prefix?: string, suffix?: string): number[] | string[];

            /**
             * Create an array of numbers (positive and/or negative) progressing from `start`
             * up to but not including `end` by advancing by `step`.
             * 
             * If `start` is greater than `end` a zero-length range is created unless a negative `step` is specified.
             * 
             * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;
             * for forward compatibility make sure to pass in actual numbers.
             * @param start The start of the range. Default 0.
             * @param end The end of the range. Default null.
             * @param step The value to increment or decrement by. Default 1.
             * @returns The array of number values.
             */
            function NumberArrayStep(start?: number, end?: number, step?: number): number[];

            /**
             * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.
             * 
             * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];
             * The k-th element will have the (k - left + 1)th smallest value in [left, right].
             * 
             * The array is modified in-place.
             * 
             * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)
             * @param arr The array to rearrange in-place.
             * @param k The k-th element index.
             * @param left The index of the left part of the range. Default 0.
             * @param right The index of the right part of the range.
             * @param compare An optional comparison function. Is passed two elements and should return a negative number if the first is less than the second, zero if they are equal, or a positive number if the first is greater.
             */
            function QuickSelect(arr: any[], k: number, left?: number, right?: number, compare?: Function): void;

            /**
             * Creates an array populated with a range of values, based on the given arguments and configuration object.
             * 
             * Range ([a,b,c], [1,2,3]) =
             * a1, a2, a3, b1, b2, b3, c1, c2, c3
             * 
             * Range ([a,b], [1,2,3], qty = 3) =
             * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3
             * 
             * Range ([a,b,c], [1,2,3], repeat x1) =
             * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3
             * 
             * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =
             * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)
             * 
             * Range ([a], [1,2,3,4,5], random = true) =
             * a4, a1, a5, a2, a3
             * 
             * Range ([a, b], [1,2,3], random = true) =
             * b3, a2, a1, b1, a3, b2
             * 
             * Range ([a, b, c], [1,2,3], randomB = true) =
             * a3, a1, a2, b2, b3, b1, c1, c3, c2
             * 
             * Range ([a], [1,2,3,4,5], yoyo = true) =
             * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1
             * 
             * Range ([a, b], [1,2,3], yoyo = true) =
             * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1
             * @param a The first array of range elements.
             * @param b The second array of range elements.
             * @param options A range configuration object. Supports the following properties: `qty` (number of times each pair is duplicated, default 1), `repeat` (number of times the entire range is repeated, use -1 for endless), `random` (shuffle the full output array), `randomB` (shuffle array `b` before building pairs), `yoyo` (append the range in reverse after the forward pass), `max` (cap the total number of elements in the output).
             * @returns An array of `{ a, b }` pair objects built from the cartesian product of the two input arrays, arranged according to the given options.
             */
            function Range(a: any[], b: any[], options?: object): any[];

            /**
             * Removes the given item, or array of items, from the array.
             * 
             * The array is modified in-place.
             * 
             * You can optionally specify a callback to be invoked for each item successfully removed from the array.
             * @param array The array to be modified.
             * @param item The item, or array of items, to be removed from the array.
             * @param callback A callback to be invoked for each item successfully removed from the array.
             * @param context The context in which the callback is invoked.
             * @returns The item, or array of items, that were successfully removed from the array.
             */
            function Remove(array: any[], item: any | any[], callback?: Function, context?: object): any | any[];

            /**
             * Removes the item from the given position in the array.
             * 
             * The array is modified in-place.
             * 
             * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.
             * @param array The array to be modified.
             * @param index The array index to remove the item from. The index must be in bounds or it will throw an error.
             * @param callback A callback to be invoked for the item removed from the array.
             * @param context The context in which the callback is invoked.
             * @returns The item that was removed.
             */
            function RemoveAt(array: any[], index: number, callback?: Function, context?: object): any;

            /**
             * Removes all items within the given index range from the array.
             * 
             * The array is modified in-place.
             * 
             * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.
             * @param array The array to be modified.
             * @param startIndex The start index to remove from.
             * @param endIndex The end index to remove up to (exclusive).
             * @param callback A callback to be invoked for each item successfully removed from the array.
             * @param context The context in which the callback is invoked.
             * @returns An array of items that were removed.
             */
            function RemoveBetween(array: any[], startIndex: number, endIndex: number, callback?: Function, context?: object): any[];

            /**
             * Removes a random object from the given array and returns it.
             * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.
             * @param array The array to remove a random element from.
             * @param start The array index to start the search from. Default 0.
             * @param length Optional restriction on the number of elements to randomly select from. Default array.length.
             * @returns The random element that was removed, or `null` if there were no array elements that fell within the given range.
             */
            function RemoveRandomElement(array: any[], start?: number, length?: number): object;

            /**
             * Replaces an element of the array with the new element.
             * The new element cannot already be a member of the array.
             * The array is modified in-place.
             * @param array The array to search within.
             * @param oldChild The element in the array that will be replaced.
             * @param newChild The element to be inserted into the array at the position of `oldChild`.
             * @returns Returns true if the oldChild was successfully replaced, otherwise returns false.
             */
            function Replace(array: any[], oldChild: any, newChild: any): boolean;

            /**
             * Moves the element at the start of the array to the end, shifting all items in the process.
             * The "rotation" happens to the left.
             * @param array The array to shift to the left. This array is modified in place.
             * @param total The number of times to shift the array. Default 1.
             * @returns The most recently shifted element.
             */
            function RotateLeft(array: any[], total?: number): any;

            /**
             * Moves the element at the end of the array to the start, shifting all items in the process.
             * The "rotation" happens to the right.
             * @param array The array to shift to the right. This array is modified in place.
             * @param total The number of times to shift the array. Default 1.
             * @returns The most recently shifted element.
             */
            function RotateRight(array: any[], total?: number): any;

            /**
             * Tests if the start and end indexes define a valid, safe range within the given array.
             * 
             * A range is considered safe when `startIndex` is zero or greater, `startIndex` is less
             * than `endIndex`, and `endIndex` does not exceed the length of the array.
             * @param array The array to check.
             * @param startIndex The inclusive start index of the range. Must be zero or greater and less than `endIndex`.
             * @param endIndex The exclusive end index of the range. Must be greater than `startIndex` and no greater than the array length.
             * @param throwError If `true`, a `Range Error` is thrown when the range is out of bounds instead of returning `false`. Default false.
             * @returns True if the range is safe, otherwise false.
             */
            function SafeRange(array: any[], startIndex: number, endIndex: number, throwError?: boolean): boolean;

            /**
             * Moves the given element to the bottom of the array (index 0), shifting all other
             * elements up by one position. The array is modified in-place. If the element is not
             * found in the array, or is already at index 0, the array is left unchanged.
             * @param array The array to search and modify.
             * @param item The element to move to the bottom of the array.
             * @returns The element that was moved.
             */
            function SendToBack(array: any[], item: any): any;

            /**
             * Scans the array for elements with the given property. If found, the property is set to the `value`.
             * 
             * For example: `SetAll(array, 'visible', true)` would set all elements that have a `visible` property to `true`.
             * 
             * Optionally you can specify a start and end index. For example if the array had 100 elements,
             * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.
             * @param array The array to search.
             * @param property The property to test for on each array element.
             * @param value The value to set the property to.
             * @param startIndex An optional start index to search from.
             * @param endIndex An optional end index to search to.
             * @returns The input array.
             */
            function SetAll(array: any[], property: string, value: any, startIndex?: number, endIndex?: number): any[];

            /**
             * Shuffles the contents of the given array using the Fisher-Yates implementation.
             * 
             * The original array is modified directly and returned.
             * @param array The array to shuffle. This array is modified in place.
             * @returns The shuffled array.
             */
            function Shuffle<T>(array: T[]): T[];

            /**
             * Takes the given array and runs a numeric sort on it, ignoring any non-digits that
             * may be in the entries.
             * 
             * You should only run this on arrays containing strings.
             * @param array The input array of strings.
             * @returns The sorted input array.
             */
            function SortByDigits(array: string[]): string[];

            /**
             * Removes a single item from an array and returns it without creating gc, like the native splice does.
             * Based on code by Mike Reinstein.
             * @param array The array to splice from.
             * @param index The index of the item which should be spliced.
             * @returns The item which was spliced (removed).
             */
            function SpliceOne(array: any[], index: number): any;

            /**
             * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.
             * 
             * This is an implementation of merge sort, without recursion.
             * 
             * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable
             * @param array The input array to be sorted.
             * @param compare The comparison function.
             * @returns The sorted result.
             */
            function StableSort(array: any[], compare?: Function): any[];

            /**
             * Swaps the position of two elements in the given array.
             * The elements must exist in the same array.
             * The array is modified in-place.
             * @param array The input array.
             * @param item1 The first element to swap.
             * @param item2 The second element to swap.
             * @returns The input array.
             */
            function Swap(array: any[], item1: any, item2: any): any[];

            namespace Matrix {
                /**
                 * Checks if an array can be used as a matrix.
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param matrix The array to check.
                 * @returns `true` if the given `matrix` array is a valid matrix.
                 */
                function CheckMatrix<T>(matrix?: T[][]): boolean;

                /**
                 * Generates a formatted string representation of the given Array Matrix, suitable for
                 * logging to the console via `console.log`. Each row is rendered on its own line with
                 * cell values separated by ` |`, and rows are divided by a `---+` separator line.
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. There must be at least two rows. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param matrix A 2-dimensional array representing the matrix to convert.
                 * @returns A formatted string representing the matrix, with columns separated by ` |` and rows separated by `---+` divider lines. Returns an empty string if the matrix is invalid.
                 */
                function MatrixToString<T>(matrix?: T[][]): string;

                /**
                 * Reverses the row order of the given Array Matrix, which has the effect of reversing
                 * the sequence of values within each column from top to bottom.
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. There must be at least two rows. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param matrix The array matrix whose row order will be reversed.
                 * @returns The column reversed matrix.
                 */
                function ReverseColumns<T>(matrix?: T[][]): T[][];

                /**
                 * Reverses the order of elements in each row of the given Array Matrix.
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. There must be at least two rows. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param matrix The array matrix to reverse the elements of each row for.
                 * @returns The matrix with each row's elements reversed in place.
                 */
                function ReverseRows<T>(matrix?: T[][]): T[][];

                /**
                 * Rotates the array matrix 180 degrees.
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. There must be at least two rows. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param matrix The array to rotate.
                 * @returns The rotated matrix array. The source matrix should be discarded for the returned matrix.
                 */
                function Rotate180<T>(matrix?: T[][]): T[][];

                /**
                 * Rotates the array matrix to the left (counter-clockwise) by 90 degrees per step.
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. There must be at least two rows. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param matrix The array to rotate.
                 * @param amount The number of times to rotate the matrix 90 degrees to the left. Default 1.
                 * @returns The rotated matrix array. The source matrix should be discarded for the returned matrix.
                 */
                function RotateLeft<T>(matrix?: T[][], amount?: number): T[][];

                /**
                 * Rotates the array matrix based on the given rotation value.
                 * 
                 * The value can be given in degrees: 90, -90, 270, -270, 180 or -180,
                 * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.
                 * 
                 * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. There must be at least two rows. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param matrix The array to rotate.
                 * @param direction The amount to rotate the matrix by. Must be a degree value of 90, -90, 270, -270, 180 or -180, or a string command of `rotateLeft`, `rotateRight` or `rotate180`. If an unrecognized value is given the matrix will not be rotated. Default 90.
                 * @returns The rotated matrix array. The source matrix should be discarded for the returned matrix.
                 */
                function RotateMatrix<T>(matrix?: T[][], direction?: number | string): T[][];

                /**
                 * Rotates the array matrix 90 degrees to the right (clockwise).
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. There must be at least two rows. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param matrix The array to rotate.
                 * @param amount The number of times to rotate the matrix 90 degrees clockwise. Default 1.
                 * @returns The rotated matrix array. The source matrix should be discarded for the returned matrix.
                 */
                function RotateRight<T>(matrix?: T[][], amount?: number): T[][];

                /**
                 * Translates the given Array Matrix by shifting its rows and the elements within
                 * each row by the amounts specified. The translation wraps cyclically: elements
                 * shifted off one edge of the matrix reappear on the opposite edge.
                 * 
                 * A positive `x` value shifts elements within each row to the right, and a negative
                 * value shifts them to the left. A positive `y` value shifts rows downward, and a
                 * negative value shifts them upward.
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. There must be at least two rows. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param matrix The array matrix to translate.
                 * @param x The amount to horizontally translate the matrix by. Default 0.
                 * @param y The amount to vertically translate the matrix by. Default 0.
                 * @returns The translated matrix.
                 */
                function Translate<T>(matrix?: T[][], x?: number, y?: number): T[][];

                /**
                 * Transposes the elements of the given matrix (array of arrays).
                 * 
                 * The transpose of a matrix is a new matrix whose rows are the columns of the original.
                 * 
                 * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
                 * have the same length. There must be at least one row. This is an example matrix:
                 * 
                 * ```
                 * [
                 *    [ 1, 1, 1, 1, 1, 1 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 2, 0, 1, 2, 0, 4 ],
                 *    [ 2, 0, 3, 4, 0, 4 ],
                 *    [ 2, 0, 0, 0, 0, 4 ],
                 *    [ 3, 3, 3, 3, 3, 3 ]
                 * ]
                 * ```
                 * @param array The array matrix to transpose.
                 * @returns A new array matrix which is a transposed version of the given array.
                 */
                function TransposeMatrix<T>(array?: T[][]): T[][];

            }

        }

        namespace Base64 {
            /**
             * Converts an ArrayBuffer into a base64 string.
             * 
             * The resulting string can optionally be a data uri if the `mediaType` argument is provided.
             * 
             * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs for more details.
             * @param arrayBuffer The Array Buffer to encode.
             * @param mediaType An optional media type, i.e. `audio/ogg` or `image/jpeg`. If included the resulting string will be a data URI.
             * @returns The base64 encoded Array Buffer.
             */
            function ArrayBufferToBase64(arrayBuffer: ArrayBuffer, mediaType?: string): string;

            /**
             * Converts a base64 string, either with or without a data uri, into an Array Buffer.
             * @param base64 The base64 string to be decoded. Can optionally contain a data URI header, which will be stripped out prior to decoding.
             * @returns An ArrayBuffer decoded from the base64 data.
             */
            function Base64ToArrayBuffer(base64: string): ArrayBuffer;

        }

        namespace Objects {
            /**
             * Shallow Object Clone. Will not clone nested objects.
             * @param obj The object to clone.
             * @returns A new object with the same properties as the input object.
             */
            function Clone(obj: object): object;

            /**
             * Recursively deep copies the given object or array, returning a brand new instance with all
             * nested objects and arrays also cloned. The original object is not modified. If a non-object
             * value is passed (such as a string, number, boolean, or null), it is returned as-is.
             * @param inObject The object or array to deep copy.
             * @returns A deep copy of the original object or array.
             */
            function DeepCopy(inObject: object): object;

            /**
             * Merges the properties of one or more source objects into a target object, returning the modified target.
             * This is a slightly modified version of {@link http://api.jquery.com/jQuery.extend/ jQuery.extend}.
             * 
             * The function accepts a variadic argument list. If the first argument is a boolean `true`, a deep (recursive)
             * copy is performed, and the second argument is treated as the target. Otherwise, the first argument is the target
             * and all subsequent arguments are source objects. Properties from each source object are copied onto the target in
             * order; later sources overwrite earlier ones for the same key. Nested plain objects and arrays are cloned rather
             * than referenced during a deep copy, preventing mutation of the originals. `undefined` values on a source are
             * never copied to the target.
             * @param args An optional leading boolean for deep-copy mode, followed by the target object, then one or more source objects whose properties will be merged into the target.
             * @returns The extended object.
             */
            function Extend(...args: any[]): object;

            /**
             * Retrieves a value from an object. Extends `GetValue` with support for dynamic and randomized
             * value types, making it useful for configuration objects where values may be fixed, procedural,
             * or randomly selected at the point of use (for example, particle emitter configs or group configs).
             * 
             * The following value types are supported for the retrieved property:
             * 
             * Explicit value:
             * {
             *     x: 4
             * }
             * 
             * Function — invoked with the property key as its argument; its return value is used:
             * {
             *     x: function (key) { return 4; }
             * }
             * 
             * Array — one element is picked at random from the array:
             * {
             *     x: [a, b, c, d, e, f]
             * }
             * 
             * Random integer between min and max (inclusive):
             * {
             *     x: { randInt: [min, max] }
             * }
             * 
             * Random float between min and max:
             * {
             *     x: { randFloat: [min, max] }
             * }
             * @param source The object to retrieve the value from.
             * @param key The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.
             * @param defaultValue The value to return if the `key` isn't found in the `source` object.
             * @returns The value of the requested key.
             */
            function GetAdvancedValue(source: object, key: string, defaultValue: any): any;

            /**
             * Retrieves the value of the given key from the top level of the source object. If the source is not an object (i.e. it is falsy, a number, or a string), or if the key does not exist on the source, the defaultValue is returned instead.
             * @param source The object to search
             * @param key The key for the property on source. Must exist at the top level of the source object (no periods)
             * @param defaultValue The default value to use if the key does not exist.
             * @returns The value if found; otherwise, defaultValue (null if none provided)
             */
            function GetFastValue(source: object, key: string, defaultValue?: any): any;

            /**
             * Retrieves a numerical value from a source object using the given key, then clamps it to the
             * inclusive range defined by `min` and `max`. If the property does not exist on the source object,
             * the `defaultValue` is used instead. Nested properties can be accessed by separating key names
             * with a dot. The returned value is always within the specified bounds.
             * @param source The object to retrieve the value from.
             * @param key The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`).
             * @param min The minimum value which can be returned.
             * @param max The maximum value which can be returned.
             * @param defaultValue The value to return if the property doesn't exist. If not provided, defaults to `min`. It's also constrained to the given bounds.
             * @returns The clamped value from the `source` object.
             */
            function GetMinMaxValue(source: object, key: string, min: number, max: number, defaultValue: number): number;

            /**
             * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.
             * 
             * The key is a string, which can be split based on the use of the period character.
             * 
             * For example:
             * 
             * ```javascript
             * const source = {
             *   lives: 3,
             *   render: {
             *     screen: {
             *       width: 1024
             *     }
             *   }
             * }
             * 
             * const lives = GetValue(source, 'lives', 1);
             * const width = GetValue(source, 'render.screen.width', 800);
             * const height = GetValue(source, 'render.screen.height', 600);
             * ```
             * 
             * In the code above, `lives` will be 3 because it's defined at the top level of `source`.
             * The `width` value will be 1024 because it can be found inside the `render.screen` object.
             * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.
             * @param source The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.
             * @param key The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.
             * @param defaultValue The value to return if the `key` isn't found in the `source` object.
             * @param altSource An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.
             * @returns The value of the requested key.
             */
            function GetValue(source: object, key: string, defaultValue: any, altSource?: object): any;

            /**
             * Verifies that an object contains all requested keys
             * @param source An object on which to check for key existence.
             * @param keys An array of keys to ensure the source object contains.
             * @returns `true` if the source object contains all keys, `false` otherwise.
             */
            function HasAll(source: object, keys: string[]): boolean;

            /**
             * Verifies that an object contains at least one of the requested keys
             * @param source An object on which to check for key existence.
             * @param keys An array of keys to search the object for.
             * @returns `true` if the source object contains at least one of the keys, otherwise `false`.
             */
            function HasAny(source: object, keys: string[]): boolean;

            /**
             * Determine whether the source object has its own property with the specified key.
             * This uses `hasOwnProperty` internally, so only own (non-inherited) properties are checked.
             * @param source The source object to be checked.
             * @param key The property to check for within the object.
             * @returns `true` if the provided `key` exists on the `source` object, otherwise `false`.
             */
            function HasValue(source: object, key: string): boolean;

            /**
             * This is a slightly modified version of jQuery.isPlainObject.
             * A plain object is an object whose internal [[Class]] property is `[object Object]`,
             * meaning it was created via `{}`, `new Object()`, or `Object.create(null)`. Objects
             * such as DOM nodes, the `window` object, and instances of custom classes are not
             * considered plain objects and will cause this function to return `false`.
             * @param obj The object to inspect.
             * @returns `true` if the object is plain, otherwise `false`.
             */
            function IsPlainObject(obj: object): boolean;

            /**
             * Performs a shallow merge of two plain objects, returning a brand new object that contains all
             * properties from both. Neither input object is modified. When the same key exists in both objects,
             * the value from obj1 takes precedence over the value from obj2.
             * 
             * This is a shallow copy only. Deeply nested objects are not cloned, so be sure to only use this
             * function on objects with a single level of nesting.
             * @param obj1 The base object. Its properties take precedence in the event of a key conflict.
             * @param obj2 The secondary object. Properties unique to this object are added to the result.
             * @returns A new object containing the merged properties of obj1 and obj2.
             */
            function Merge(obj1: object, obj2: object): object;

            /**
             * Creates a new object by cloning `obj1`, then merging values from `obj2` into it using a "right wins" strategy.
             * 
             * Only keys that exist in `obj1` are considered. For each key in `obj2` that also exists in `obj1`, the value from `obj2` overwrites the cloned value. Keys present in `obj2` but absent from `obj1` are ignored entirely. This differs from a standard merge in that `obj2` cannot introduce new keys — it can only override existing ones.
             * @param obj1 The first object to merge.
             * @param obj2 The second object to merge. Keys from this object which also exist in `obj1` will be copied to `obj1`.
             * @returns The merged object. `obj1` and `obj2` are not modified.
             */
            function MergeRight(obj1: object, obj2: object): object;

            /**
             * Returns a new object that only contains the `keys` that were found on the object provided.
             * If no `keys` are found, an empty object is returned.
             * @param object The object to pick the provided keys from.
             * @param keys An array of properties to retrieve from the provided object.
             * @returns A new object that only contains the `keys` that were found on the provided object. If no `keys` were found, an empty object will be returned.
             */
            function Pick(object: object, keys: any[]): object;

            /**
             * Sets a value in an object, allowing for dot notation to control the depth of the property.
             * 
             * For example:
             * 
             * ```javascript
             * var data = {
             *   world: {
             *     position: {
             *       x: 200,
             *       y: 100
             *     }
             *   }
             * };
             * 
             * SetValue(data, 'world.position.y', 300);
             * 
             * console.log(data.world.position.y); // 300
             * ```
             * @param source The object to set the value in.
             * @param key The name of the property in the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`)
             * @param value The value to set into the property, if found in the source object.
             * @returns `true` if the property key was valid and the value was set, otherwise `false`.
             */
            function SetValue(source: object, key: string, value: any): boolean;

        }

        namespace String {
            /**
             * Takes a string and replaces instances of markers with values in the given array.
             * The markers take the form of `%1`, `%2`, etc. I.e.:
             * 
             * `Format("The %1 is worth %2 gold", [ 'Sword', 500 ])`
             * @param string The string containing the replacement markers.
             * @param values An array containing values that will replace the markers. If no value exists an empty string is inserted instead.
             * @returns The string containing replaced values.
             */
            function Format(string: string, values: any[]): string;

            /**
             * Takes the given string and pads it out, to the length required, using the character
             * specified. For example if you need a string to be 6 characters long, you can call:
             * 
             * `pad('bob', 6, '-', 2)`
             * 
             * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.
             * 
             * You can also use it to pad numbers (they are always returned as strings):
             * 
             * `pad(512, 6, '0', 1)`
             * 
             * Would return: `000512` with the string padded to the left.
             * 
             * If you don't specify a direction it'll pad to both sides:
             * 
             * `pad('c64', 7, '*')`
             * 
             * Would return: `**c64**`
             * @param str The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.
             * @param len The total length of the resulting padded string. Default 0.
             * @param pad The string to pad it out with (defaults to a space). Default " ".
             * @param dir The direction dir = 1 (left), 2 (right), 3 (both). Default 3.
             * @returns The padded string.
             */
            function Pad(str: string | number | object, len?: number, pad?: string, dir?: number): string;

            /**
             * Takes a string and removes the character at the given index.
             * 
             * The index is zero based.
             * @param string The string to be worked on.
             * @param index The index of the character to be removed. This value is zero-based.
             * @returns The modified string.
             */
            function RemoveAt(string: string, index: number): string;

            /**
             * Takes the given string and reverses it, returning the reversed string.
             * For example if given the string `Atari 520ST` it would return `TS025 iratA`.
             * @param string The string to be reversed.
             * @returns The reversed string.
             */
            function Reverse(string: string): string;

            /**
             * Creates and returns an RFC4122 version 4 compliant UUID.
             * 
             * The string is in the form: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx` where each `x` is replaced with a random
             * hexadecimal digit from 0 to f, and `y` is replaced with a random hexadecimal digit from 8 to b.undefined
             * @returns The UUID string.
             */
            function UUID(): string;

            /**
             * Capitalizes the first letter of a string if there is one.
             * @param str The string to capitalize.
             * @returns A new string, same as the first, but with the first letter capitalized.
             */
            function UppercaseFirst(str: string): string;

        }

    }

}

declare type BaseShaderConfig = {
    /**
     * The name of the shader program, used as a key.
     */
    name: string;
    /**
     * The vertex shader source code.
     */
    vertexShader: string;
    /**
     * The fragment shader source code.
     */
    fragmentShader: string;
};

declare type DebugGraphNode = {
    /**
     * The name of the node.
     */
    name: string;
    /**
     * The children of the node.
     */
    children: DebugGraphNode[];
    /**
     * The parent of the node.
     */
    parent: DebugGraphNode;
};

declare type Attachment = {
    /**
     * The attachment point for the attachment. This is a GLenum such as `gl.COLOR_ATTACHMENT0`, `gl.DEPTH_ATTACHMENT`, `gl.STENCIL_ATTACHMENT`, or `gl.DEPTH_STENCIL_ATTACHMENT`.
     */
    attachmentPoint: GLenum;
    /**
     * The texture for the attachment. Either a texture or a renderbuffer is required.
     */
    texture?: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper;
    /**
     * The renderbuffer for the attachment. Either a texture or a renderbuffer is required.
     */
    renderbuffer?: WebGLRenderbuffer;
    /**
     * The internal format for the renderbuffer. This is a GLenum such as `gl.DEPTH_STENCIL`.
     */
    internalFormat?: GLenum;
};

declare type EachListCallback<I> = (item: I, ...args: any[])=>void;

declare type EachMapCallback<E> = (key: string, entry: E)=>boolean | null;

declare type EachTextureCallback = (texture: Phaser.Textures.Texture, ...args: any[])=>void;

/**
 * A predicate, to test each element of the array.
 */
declare type TilemapFilterCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[])=>boolean;

declare type TilemapFindCallback = (value: Phaser.GameObjects.GameObject, index: number, array: Phaser.GameObjects.GameObject[])=>boolean;

declare type FindTileCallback = (value: Phaser.Tilemaps.Tile, index: number, array: Phaser.Tilemaps.Tile[])=>boolean;

declare type EachTileCallback = (value: Phaser.Tilemaps.Tile, index: number, array: Phaser.Tilemaps.Tile[])=>void;

/**
 * Phaser.Class
 */
declare class Class {
    /**
     * 
     * @param definition A dictionary of functions and properties for the class.
     */
    constructor(definition: Object);

}

declare type integer = number;

declare module 'phaser' {
    export = Phaser;

}

